Update to use HOSR

This commit is contained in:
2023-04-24 18:13:58 -04:00
parent ce4d2e27b5
commit aafcfe893c
191 changed files with 8147 additions and 691 deletions

View File

@@ -17,6 +17,8 @@ module.exports = async (config) => {
"/astral/adventuring.html#outposts": ["outpost", "outposts"],
"/astral/adventuring.html#fragments": ["island", "islands"],
},
{ build, isRebuild, logFunction: log = () => {}, site } = config || {},
{ outputPath, journalsPerPage = 5, srcPath } = build,
md = require("markdown-it")({
html: true,
linkify: true,
@@ -39,9 +41,15 @@ module.exports = async (config) => {
})
.use(require("markdown-it-emoji"))
.use(require("markdown-it-mark"))
.use(
require("markdown-it-include"),
path.join(srcPath, "assets", "fragments")
)
/*
.use(require("markdown-it-auto-crosslinker"), {
dictionary,
})
*/
.use(require("markdown-it-implicit-figures"), {
dataType: true,
figcaption: true,
@@ -49,9 +57,6 @@ module.exports = async (config) => {
lazyLoading: true,
link: true,
}),
{ build, isRebuild, logFunction: log = () => {} } = config || {},
{ outputPath, journalsPerPage = 5, srcPath } = build,
{ site } = config,
copyAssets = async (directory) => {
const assets = await fs.readdir(directory);
@@ -326,6 +331,7 @@ module.exports = async (config) => {
for (let i = 1; i <= pageCount; i++) {
const firstEntryIndex = journalsPerPage * (i - 1),
lastEntryIndex = journalsPerPage * i;
console.log("config", config);
// TODO: rethink the data passed in here - you're paging solution works (kinda), take it over the finish line!
renderFile({