Skip to content

PYDOC-6 [a]: Rebuild official docs using RTD theme #1

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

Merged

Conversation

python-sidebar
Copy link
Owner

@python-sidebar python-sidebar commented Feb 20, 2023

PYDOC-6 Ticket: https://trello.com/c/StGB3VAw/6-pydoc-6-change-theme-to-rtd-sphinx-rebuild-push-to-website

PYDOC-6 PR [a]: this
PYDOC-6 PR [b]: companion PR in the GitHub Pages repo

@python-sidebar
Copy link
Owner Author

Round 2 success.

What happened:

  • Accidentally opened a PR on the main repo instead of this fork.
  • Local remote in VSCode console looked fine so unsure how to even reproduce.
  • Best Guess: I think GitLens extension somehow pointed origin alias to the upstream repo instead. Push PR button in GitLens pushed branch and a PR to actual cpython repo.

Resolved now and lesson learned.

<div role="navigation" aria-label="{{ _('Page navigation') }}">
<ul class="wy-breadcrumbs">
{%- block breadcrumbs %}
<li><a href="{{ pathto('index') }}" class="icon icon-home" aria-label="Home"></a></li>
Copy link
Owner Author

Choose a reason for hiding this comment

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

Originally, w/o mod, this said

<a href="{{ pathto(master_doc) }}" 

which means the home button always takes you back to the ginormous TOC page (instead of the real "home" we think of at index.html from our beloved Pydocs).

So instead this is now:

<a href="{{ pathto('index') }}" 

{# the master_doc variable was renamed to root_doc in Sphinx 4 (master_doc still exists in later Sphinx versions) #}
{%- set _logo_url = logo_url|default(pathto('_static/' + (logo or ""), 1)) %}
{%- set _root_doc = root_doc|default('master_doc') %}
<a href="{{ pathto('index') }}"{% if not theme_logo_only %} class="icon icon-home"{% endif %}>
Copy link
Owner Author

Choose a reason for hiding this comment

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

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.

2 participants