Skip to content

docs: add version switcher to docs page#10135

Open
paulbalandan wants to merge 1 commit intocodeigniter4:developfrom
paulbalandan:docs-version-switcher
Open

docs: add version switcher to docs page#10135
paulbalandan wants to merge 1 commit intocodeigniter4:developfrom
paulbalandan:docs-version-switcher

Conversation

@paulbalandan
Copy link
Copy Markdown
Member

Description
Implements a switch in the documentation page to allow us to switch between the (1) stable version hosted at https://codeigniter.com/user_guide/ and (2) latest (in-progress) hosted at https://codeigniter4.github.io/userguide/. If a local build, another option will also be displayed. The CSS theme uses the already supplied CSS by RTD.

On load:
image

When clicked:
image

I'm not sure if this should be in develop or on 4.8. Happy to change if needed.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@github-actions github-actions Bot added the documentation Pull requests for documentation only label Apr 24, 2026
@patel-vansh
Copy link
Copy Markdown
Contributor

Since this is not any change to the framework code, I think develop is the right branch for this.

Just one thing that caught me was the text color of the selected item. As you can see in the On Load screenshot, the currently selected item is be kind of less visible than the above CodeIgniter logo. Idk how the theming works in the docs, but from a general viewer's perspective, it would be nicer if the Local build or any selected item's text color would be white.

Also, if possible, then maybe capitalize the first letter of each word?

@paulbalandan
Copy link
Copy Markdown
Member Author

The CSS used here is actually the one shipped from sphinx_rtd_theme, like in their docs:
image

If others agree as well, I can make it a bit more noticeable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Pull requests for documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants