Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for a feature to set the logo URL #325

Closed
rajk-cerebras opened this issue Apr 15, 2021 · 1 comment · Fixed by #677
Closed

Request for a feature to set the logo URL #325

rajk-cerebras opened this issue Apr 15, 2021 · 1 comment · Fixed by #677
Labels
enhancement New feature or request

Comments

@rajk-cerebras
Copy link

For the Sphinx Book Theme it would be very useful if I can set an arbitrary URL for the logo. For example, I would like to set something like "logo_url = "http://example.com" in my conf.py file. In the rendered docs, whenever I click on the logo or on the title on the top left, it will take me to example.com site.

Why: In my docs, in addition to the tutorials, getting-started guides and other such hand-written descriptive documents, I also have autodoc generated Python API documentation html files. However, it is always a two-step process to integrate these API doc files into my main docs site. This is because most developers, correctly, like to follow docs-as-code approach wherein the actual Python header files are located in the codebase.

Step 1: I use the Sphinx extension sphinx-apidoc + Sphinx builder (make html) to generate the Python API doc html files from these header files. Then,
Step 2: I bring in these html files into my main docs workflow. I place these html files in source/_static/html folder, and create either a left sidebar entry or an extra reStructureText file that contains a link to _static/html/index.html. However, whenever someone is on an API doc page, the top-left logo+title takes them to the _static/html/index.html page. If I had the option to set "logo_url = "http://main-docs-site.com" when I am building the API docs (in Step 1), then when I bring these API docs html files over into my main docs site, that will make sure that a reader is always taken to the home page whenever they click on the top-left logo or title, whether clicking from a tutorial page or from an API docs page.

Additionally, if there is a way I can, while using the Sphinx Book Theme, easily add a link in the left sidebar to the local "_static/html/index.html" then that would be a totally awesome user experience. Right now I can only add a URL link in the left sidebar and I have to add an extra page, add the link to the html in that page, and add that page in the left sidebar.

Thanks!

@choldgraf
Copy link
Member

I believe this is now supported in the latest Sphinx versions, and so will now be possible in #677

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants