Repository navigation
fix: list every page in the Wiki.js sidebar - #6
Merged
Merged
Conversation
The sidebar contained a single entry, Home. The other seven pages were served correctly and reachable by URL, but nothing in the interface linked to them, so a reader who did not already know the page names could not find them. Wiki.js seeds a static navigation list holding only Home at setup, and the bootstrap never replaced it. bootstrap.py now rebuilds the sidebar from the pages that actually exist, in a reading order rather than alphabetically, with the home page targeted at / and everything else at its own path. Pages outside NAV_ORDER are appended alphabetically, so a new page shows up without anyone maintaining a list. check_wikijs.py did not catch this, because it only asserted each page returns 200 anonymously — which was true. Reachable is not the same as discoverable. It now also decodes the base64 sidebar payload Wiki.js hands the theme and fails when a published page is missing from it. Against the reported bug it reports all seven missing pages; against the fix it passes. Closes #5 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YY1ekLLeFLkAU2kvdQ8Ey4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5
The sidebar showed only Home. The other seven pages were served correctly and reachable
by URL, but nothing linked to them — so unless you already knew a page's name, you could not
find it.
Wiki.js seeds a static navigation list holding only Home at setup, and the bootstrap never
replaced it.
The fix
bootstrap.pyrebuilds the sidebar from the pages that actually exist:mdi-home/mdi-rocket-launch-outline/Getting-Startedmdi-shield-key-outline/Authorizationmdi-api/API/Architecturemdi-database-outline/Database/Architecturemdi-truck-outline/Orders-and-Fulfillmentmdi-cog-outline/Configurationmdi-server/DeploymentOrdered for reading rather than alphabetically. Pages outside
NAV_ORDERare appendedalphabetically, so a new page appears without anyone maintaining a list — add it to
NAV_ORDERonly to place it deliberately.Navigation mode stays
MIXED, so the page browser remains available next to the list.Why the check missed it
check_wikijs.pyasserted each page returns 200 to an anonymous request. That was true —every page was reachable. Reachable is not the same as discoverable, and the check only
tested the first.
It now also decodes the base64 sidebar payload Wiki.js hands the theme on the page root and
fails when a published page is absent from it.
Against the reported bug — sidebar reset to Home only:
Against this branch, from a clean
docker compose down -v && docker compose up -d:The sidebar was decoded from what an anonymous request receives, not from the admin API,
so this verifies what a reader without an account actually gets.