Update to use HOSR
This commit is contained in:
12
lib/build.js
12
lib/build.js
@@ -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({
|
||||
|
Reference in New Issue
Block a user