Skip to content

Fix #7: Add self to toctree so homepage appears in sidebar#22

Open
suryakiranps1 wants to merge 1 commit into
reltrans:mainfrom
suryakiranps1:main
Open

Fix #7: Add self to toctree so homepage appears in sidebar#22
suryakiranps1 wants to merge 1 commit into
reltrans:mainfrom
suryakiranps1:main

Conversation

@suryakiranps1

Copy link
Copy Markdown

Fixes #7

Added self to the toctree directive in source/index.rst so the splash page appears in the sidebar navigation.
Before: Users could only reach the homepage by clicking the Reltrans logo at the top.
After: Homepage now appears directly in the sidebar as "Welcome to Reltrans's documentation!"
Known limitations:

  1. The homepage link only appears in the sidebar when on the homepage itself. On other pages (e.g. Installation), the link disappears. This is default Sphinx behavior with self in toctree.
  2. The sidebar label shows the full page title "Welcome to Reltrans's documentation!" rather than a shorter label like "Home" — this is also a Sphinx limitation with self.

A more complete fix would likely require modifying the global navigation configuration or the Sphinx theme settings, which is beyond the scope of this simple change. I'm happy to collaborate with the mentors on a more complete solution if needed!
!
reltrans_sidebar

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.

Link splash page to itself so it appears in the side bar

1 participant