Skip to content

Put example and tutorial pages in the docs navigation - #2968

Merged
pvcraven merged 1 commit into
developmentfrom
orphan-pages-nav
Oct 9, 2026
Merged

pvcraven merged 1 commit into
developmentfrom
orphan-pages-nav

Conversation

@pvcraven

@pvcraven pvcraven commented Oct 9, 2026

Copy link
Copy Markdown
Member

Closes #2274

Navigation

230 pages started with :orphan:, so they weren't in any table of contents: 125 example pages and 105 tutorial listing and diff pages. Sphinx didn't know where they belonged, and the sidebar showed the About section open instead of where the reader was.

Each parent page now lists its pages in a :hidden: toctree, and the :orphan: lines are gone. The parent pages look the same.

Parent page Pages
Examples gallery 125
GPU Particle Burst 23
Pymunk Platformer 22
Solitaire 21
Ray-casting Shadows 19
Menu 9
Views 7
Shader Toy Glow 4
  • Examples are listed in gallery order. Tutorial pages are listed in the order their tutorial first mentions them.
  • What readers get:
    • On an example page, the sidebar opens Getting Started → Examples and highlights the current example.
    • On a tutorial listing or diff page, it opens that tutorial.
    • These pages also get Previous/Next links; they had none before.
  • Tradeoffs:
    • While you're in the examples, the sidebar lists all of them.
    • Each HTML page is about 16 KB (10%) bigger before compression, because the theme puts the whole table of contents in every page.
    • A new example or tutorial page now has to be added to its parent's hidden toctree. Sphinx warns about unlisted pages, so the -W docs build catches a missing one.

The remaining four orphans are left as they are: 404.rst, _archive/diversity.rst (excluded from the build), api_docs/gl/utils.rst and community/games/game_jam_2020.rst.

Examples gallery fixes

  • Added four examples missing from the gallery:
    • controller, after the other controller example
    • gui_exp_scroll_area, gui_exp_animations and gui_exp_animations_2, under Experimental Widgets
  • Fixed thumbnail links that went to pages that don't exist:
    • performance_statistics_example.html and example-sprite-collect-coins-diff-levels.html used the page's label instead of its file name.
    • platformer_tutorial.html, gui_own_widgets.html, gui_own_layout.html and pymunk_platformer_tutorial.html pointed at pages that aren't in example_code/.
    • Six tutorial thumbnails used absolute links (/tutorials/...), which go to the domain root and 404 on the versioned site, for example https://api.arcade.academy/tutorials/card_game/index.html. All gallery links are now relative.

Testing

  • The docs build with -W passes.
  • All 284 links and 139 images in the built gallery point to files that exist.
  • I took Chrome screenshots of the sidebar on an example page and on Solitaire, GPU Particle Burst and Ray-casting pages. Each opens in the right place, and other pages such as Install look the same.

🤖 Generated with Claude Code

Example pages and tutorial listing/diff pages were marked :orphan:, so
the sidebar didn't know where they belong and showed the About section
instead. Each parent page now lists them in a hidden toctree.

The examples gallery also gets entries for four examples it was missing,
and six thumbnail links that pointed at pages that don't exist (four of
them absolute paths, which 404 on the versioned docs site) are fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pvcraven
pvcraven merged commit b8651a2 into development Oct 9, 2026
7 checks passed
@pvcraven
pvcraven deleted the orphan-pages-nav branch October 9, 2026 16:44
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.

Documentation: Hidden subpages lose user's location in page tree

1 participant