mirror of
https://github.com/HeyPuter/puter.git
synced 2026-02-05 13:28:31 -06:00
doc: make first sidebar items make sense
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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`;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user