wikicite/wcite

View on GitHub
bin/wikicite-org

Summary

Maintainability
Test Coverage
#!/usr/bin/env node
/**
 * Enable wikicite.org homepage layout.
 */
const asset = require('../lib/util/asset')
const { filter, addMetaBlocks, RawBlock, metadata } = require('../lib/util/pandoc')
    
filter((root, format, meta) => {
  if (format.match(/^html/)) {
    addMetaBlocks(meta, 'include-before', [RawBlock('html', asset('wikicite-org-head.html'))])
    addMetaBlocks(meta, 'include-after', [RawBlock('html', asset('wikicite-org-foot.html'))])
    meta['css'] = metadata(['/assets/main.css', '/assets/wikicite.css'])
  }
  return root
}, process.argv.slice(2))