Skip to content

Request for a feature to set the logo URL  #325

Closed
@rajk-cerebras

Description

@rajk-cerebras

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions