From eda376b6cc1a4f8db035e54f79bb7c932ed6461c Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Tue, 25 Feb 2025 15:31:40 -0500 Subject: [PATCH] doc: make first sidebar items make sense --- .../backend/doc/features/batch-and-symlinks.md | 12 ++---------- tools/genwiki/main.js | 9 +++++++-- 2 files changed, 9 insertions(+), 12 deletions(-) rename doc/scratch.md => src/backend/doc/features/batch-and-symlinks.md (83%) diff --git a/doc/scratch.md b/src/backend/doc/features/batch-and-symlinks.md similarity index 83% rename from doc/scratch.md rename to src/backend/doc/features/batch-and-symlinks.md index 51d001c4b..ab8f11a42 100644 --- a/doc/scratch.md +++ b/src/backend/doc/features/batch-and-symlinks.md @@ -1,14 +1,6 @@ -# Documentation Scratchpad - -## 2024-10-08 - -This is place where any documentation can be written, and this documentation -may later be moved or reformatted. - -I added this file because I noticed sometimes I don't write documentation -simply because I don't yet know the best place to put the documentation, -which in retrospect seems incredibly silly so instead this file should exist. +# Batch and Symlinks +2024-10-08 ### Batch and Symlinks diff --git a/tools/genwiki/main.js b/tools/genwiki/main.js index 7800c0f9b..adcd225a0 100644 --- a/tools/genwiki/main.js +++ b/tools/genwiki/main.js @@ -133,8 +133,10 @@ const generate_sidebar = (documents) => { } // README.md always goes first - const isReadmeA = a.outputName.toLowerCase().includes('readme'); - const isReadmeB = b.outputName.toLowerCase().includes('readme'); + const isReadmeA = a.outputName.toLowerCase().includes('readme') || + a.outputName.toLowerCase().includes('home'); + const isReadmeB = b.outputName.toLowerCase().includes('readme') || + b.outputName.toLowerCase().includes('home'); if (isReadmeA) return -1; if (isReadmeB) return 1; @@ -147,6 +149,9 @@ const generate_sidebar = (documents) => { if ( document.outputName.split('-').slice(-1)[0].toLowerCase() === 'readme' ) { title = 'Index (README.md)'; } + if ( document.outputName.split('-').slice(-1)[0].toLowerCase() === 'home' ) { + title = `Home`; + } return `* [${title}](${document.outputName.replace('.md', '')})\n`; };