Skip to content

Conversation

@Andy-Grigg
Copy link
Contributor

Closes #16

Summary:

  • Enable breadcrumbs with the html_theme_option "show_breadcrumbs": True
  • The breadcrumbs appear on the page body itself as opposed to the navbar. I might have preferred to have them on the navbar so they are always visible, but I think that would require a major redesign of the theme
  • The new css overrides some bootstrap defaults, so it was necessary to ensure it is added after the bootstrap css
  • Additional 'root' breadcrumbs can be added, e.g. to the pyansys root page with the html_theme_option "additional_breadcrumbs": [("Link text", "href")]

Issues:

  • The breadcrumb that links to the module homepage has to be added manually when on a page within the docs. This is fine, but the problem is there's no way to get the title of the index.rst page. As a result, I'm relying on using the html_title as set in conf.py. The problem is that this isn't necessarily the same as the title of the index.rst page.

Todo:

Assuming the approach is accepted, the docs need to be updated to describe how to enable this functionality and how to correctly set the html_title as described above.

Screenshots

Docs without any changes to conf.py:

image

With breadcrumbs added: "show_breadcrumbs": True,

image

With additional root element linking to pyansys: "additional_breadcrumbs": [("PyAnsys Home", "https://docs.pyansys.com/")],

image

@Andy-Grigg Andy-Grigg self-assigned this Jan 28, 2022
Copy link
Contributor

@akaszynski akaszynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excellent work and solves the navigation problem.

@akaszynski akaszynski merged commit eb1b1f1 into main Jan 28, 2022
@akaszynski akaszynski deleted the feat/breadcrumbs branch January 28, 2022 19:59
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.

Add link to root of project documentation

3 participants