@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
73 lines • 1.92 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Layout = void 0;
// Layout class implementation based on Go version
class Layout {
home() {
return [
"index.html",
"_default/index.html",
"_default/single.html",
];
}
homeList() {
return [
"index.html",
"_default/index.html",
"_default/list.html",
];
}
section(section) {
return [
`${section}/section.html`,
`${section}/list.html`,
"_default/section.html",
"_default/list.html",
"_default/index.html",
];
}
page(section, base) {
const basePath = section ? `${section}/${base}` : base;
const singlePath = section ? `${section}/single.html` : "single.html";
const layouts = [];
if (basePath !== "index") {
layouts.push(`${basePath}.html`);
}
layouts.push(singlePath);
if (base !== "index") {
layouts.push(`_default/${base}.html`);
}
layouts.push("_default/single.html");
layouts.push("index.html");
layouts.push("_default/index.html");
return layouts;
}
taxonomy() {
return [
"taxonomy/taxonomy.html",
"taxonomy/list.html",
"_default/list.html",
"_default/taxonomy.html",
];
}
term() {
return [
"taxonomy/tag.html",
"term/term.html",
"taxonomy/list.html",
"_default/list.html",
"_default/term.html",
];
}
standalone404() {
return ["404.html"];
}
standaloneSitemap() {
return [
"sitemap.xml",
"_default/sitemap.xml",
];
}
}
exports.Layout = Layout;
//# sourceMappingURL=pagelayout.js.map