Skip to content

WEB: Unpin pydata sphinx theme #48285

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
merged 11 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/_templates/sidebar-nav-bs.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation">
<div class="bd-toc-item active">
{% if pagename.startswith("reference") %}
{{ generate_nav_html("sidebar", maxdepth=4, collapse=True, includehidden=True, titles_only=True) }}
{{ generate_toctree_html("sidebar", maxdepth=4, collapse=True, includehidden=True, titles_only=True) }}
{% else %}
{{ generate_nav_html("sidebar", maxdepth=4, collapse=False, includehidden=True, titles_only=True) }}
{{ generate_toctree_html("sidebar", maxdepth=4, collapse=False, includehidden=True, titles_only=True) }}
{% endif %}
</div>
</nav>
1 change: 0 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@
"navbar_end": ["version-switcher", "navbar-icon-links"],
"switcher": {
"json_url": "https://pandas.pydata.org/versions.json",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"json_url": "https://pandas.pydata.org/versions.json",
"json_url": "/versions.json",

If you want to make this relative too, otherwise when testing the website locally, the version switcher fails due to a CORS error.

Copy link
Member Author

Choose a reason for hiding this comment

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

Would you mind adding the dark theme logo? Not really sure where to change the logo based on the theme

"url_template": "https://pandas.pydata.org/{version}/",
"version_match": switcher_version,
},
}
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ dependencies:
- natsort # DataFrame.sort_values doctest
- numpydoc
- pandas-dev-flaker=0.5.0
- pydata-sphinx-theme=0.8.0
- pydata-sphinx-theme
- pytest-cython # doctest
- sphinx
- sphinx-panels
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ gitdb
natsort
numpydoc
pandas-dev-flaker==0.5.0
pydata-sphinx-theme==0.8.0
pydata-sphinx-theme
pytest-cython
sphinx
sphinx-panels
Expand Down
21 changes: 14 additions & 7 deletions web/pandas/versions.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,37 @@
[
{
"name": "dev",
"version": "docs/dev"
"version": "dev",
"url": "docs/dev/"
Copy link
Member

Choose a reason for hiding this comment

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

Not sure how this is used, but if it's just added to the href attribite of the links, I think we want to have a heading slash in it.

Suggested change
"url": "docs/dev/"
"url": "/docs/dev/"

In html, a link that doesn't start with a slash is relative. So, if the user is in /docs/user-guide/ the address resolved with the url in your changes would be /docs/user-guide/docs/dev/. Starting it with the slash will resolve it to that absolute url for the current domain.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thx :)

},
{
"name": "1.4 (stable)",
"version": "docs"
"version": "1.4 (stable)",
"url": "docs/"
},
{
"name": "1.4",
"version": "pandas-docs/version/1.4"
"version": "1.4",
"url": "pandas-docs/version/1.4/"
},
{
"name": "1.3",
"version": "pandas-docs/version/1.3"
"version": "1.3",
"url": "pandas-docs/version/1.3/"
},
{
"name": "1.2",
"version": "pandas-docs/version/1.2"
"version": "1.2",
"url": "pandas-docs/version/1.2/"
},
{
"name": "1.1",
"version": "pandas-docs/version/1.1"
"version": "1.1",
"url": "pandas-docs/version/1.1/"
},
{
"name": "1.0",
"version": "pandas-docs/version/1.0"
"version": "1.0",
"url": "pandas-docs/version/1.0/"
}
]