Add support for external bibtex files

This commit is contained in:
Ludwig Schubert
2017-09-01 16:11:27 -07:00
parent 31982778f8
commit c69f39e25a
9 changed files with 162 additions and 144 deletions
+4 -3
View File
@@ -22,10 +22,10 @@ import Meta from './transforms/meta';
import { makeStyleTag } from './styles/styles';
import TOC from './transforms/toc';
import Typeset from './transforms/typeset';
// import Bibliography from './transforms/bibliography';
import Bibliography from './transforms/bibliography';
const transforms = [
HTML, makeStyleTag, TOC, Byline, Polyfills, Mathematics, Meta, Typeset//, Bibliography
HTML, makeStyleTag, TOC, Byline, Polyfills, Mathematics, Meta, Typeset, Bibliography
];
/* Distill Transforms */
@@ -42,11 +42,12 @@ const distillTransforms = [
export function render(dom, data) {
// first, we collect static data from the dom
for (const extract of extractors) {
// console.warn('Running extractor: ', extract);
console.warn('Running extractor...');
extract(dom, data);
}
// secondly we use it to transform parts of the dom
for (const transform of transforms) {
console.warn('Running transform...');
// console.warn('Running transform: ', transform);
transform(dom, data);
}