UNPKG

@mdfriday/foundry

Version:

The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.

26 lines 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createContent = createContent; const index_1 = require("../index"); const markdown_1 = require("../../../domain/markdown"); async function createContent(services) { const converter = new index_1.MDConverter((0, markdown_1.createMarkdown)(services.markdown())); // Create page builder with all dependencies const pageBuilder = new index_1.PageBuilder(services, // langSvc services, // taxonomySvc null, // templateSvc - will be set when used null, new index_1.Taxonomy(services.views(), services), new index_1.Term(services), new index_1.Section(services), new index_1.Standalone(services), converter, // convertProvider null); // Create page map const pageMap = new index_1.PageMap(pageBuilder); // Set up cross-references pageBuilder.pageMapper = pageMap; // Setup reverse index pageMap.setupReverseIndex(); // Create content hub const contentHub = new index_1.Content(services, converter, pageMap); // Set final cross-reference pageBuilder.contentHub = contentHub; return contentHub; } //# sourceMappingURL=hub.js.map