From f5c6a6d56e4d189423cc9838fb5581f7937bb733 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Tue, 8 Oct 2024 14:56:30 -0400 Subject: [PATCH] fix --- lib/server/docs.plugin.js | 4 ++-- src/server/docs.plugin.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/server/docs.plugin.js b/lib/server/docs.plugin.js index 6f66583..9f6d058 100644 --- a/lib/server/docs.plugin.js +++ b/lib/server/docs.plugin.js @@ -51,8 +51,8 @@ class DocsPlugin { bar.start(this.docs.length, 0, { prefix: 'rendering images', suffix: '-' }); for (const doc of this.docs) { console.log("doc", doc); - if (!doc.metadata.permalink || !doc.metadata.permalink.length) { - continue; + if (doc.metadata.permalink === "/") { + doc.metadata.permalink = "/index"; } const document = new document_1.Document(this.getHtmlPath(doc)); bar.update({ suffix: doc.metadata.permalink }); diff --git a/src/server/docs.plugin.ts b/src/server/docs.plugin.ts index 96122d4..b33d357 100644 --- a/src/server/docs.plugin.ts +++ b/src/server/docs.plugin.ts @@ -69,8 +69,8 @@ export class DocsPlugin { bar.start(this.docs.length, 0, {prefix: 'rendering images', suffix: '-'}) for (const doc of this.docs) { console.log("doc", doc) - if (!doc.metadata.permalink || !doc.metadata.permalink.length) { - continue; + if (doc.metadata.permalink === "/") { + doc.metadata.permalink = "/index" } const document = new Document(this.getHtmlPath(doc)!) bar.update({ suffix: doc.metadata.permalink })