Skip to content

fix: list every page in the Wiki.js sidebar - #6

Merged
PhilippTheServer merged 1 commit into
mainfrom
fix/wikijs-navigation
Aug 26, 2026
Merged

PhilippTheServer merged 1 commit into
mainfrom
fix/wikijs-navigation

Conversation

@PhilippTheServer

Copy link
Copy Markdown
Contributor

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.py rebuilds the sidebar from the pages that actually exist:

[bootstrap] sidebar rebuilt with 8 entries
Icon Target Label
mdi-home / OpenTaberna
mdi-rocket-launch-outline /Getting-Started Getting Started
mdi-shield-key-outline /Authorization Authorization
mdi-api /API/Architecture API Architecture
mdi-database-outline /Database/Architecture Database Architecture
mdi-truck-outline /Orders-and-Fulfillment Orders and Fulfillment
mdi-cog-outline /Configuration Configuration
mdi-server /Deployment Production Deployment

Ordered for reading rather than alphabetically. Pages outside NAV_ORDER are appended
alphabetically, so a new page appears without anyone maintaining a list — add it to
NAV_ORDER only 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.py asserted 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:

$ python3 tools/check_wikijs.py
Checked 8 pages against http://localhost:3030.

7 problem(s):

  FAIL  'API Architecture' (/API/Architecture) is not in the sidebar — reachable by URL, but nothing links to it
  FAIL  'Authorization' (/Authorization) is not in the sidebar — reachable by URL, but nothing links to it
  FAIL  'Configuration' (/Configuration) is not in the sidebar — reachable by URL, but nothing links to it
  FAIL  'Database Architecture' (/Database/Architecture) is not in the sidebar — reachable by URL, but nothing links to it
  FAIL  'Production Deployment' (/Deployment) is not in the sidebar — reachable by URL, but nothing links to it
  FAIL  'Getting Started' (/Getting-Started) is not in the sidebar — reachable by URL, but nothing links to it
  FAIL  'Orders and Fulfillment' (/Orders-and-Fulfillment) is not in the sidebar — reachable by URL, but nothing links to it

Against this branch, from a clean docker compose down -v && docker compose up -d:

$ docker inspect -f '{{.State.ExitCode}}' opentaberna-wiki-bootstrap-1
0
[bootstrap] sidebar rebuilt with 8 entries
[bootstrap] guests can read without signing in
[bootstrap] ready — open the wiki, no login required

$ python3 tools/check_wikijs.py
Checked 8 pages against http://localhost:3030.
OK — every page is served, listed in the sidebar, and no page asks for a login.

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.

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
@PhilippTheServer
PhilippTheServer merged commit 78cbc25 into main Aug 26, 2026
2 checks passed
@PhilippTheServer
PhilippTheServer deleted the fix/wikijs-navigation branch August 26, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wiki.js sidebar lists only Home — the other seven pages are undiscoverable

1 participant