Skip to content

Use pydata theme and reorganize pages for sphinx docs #1173

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 16 commits into from
Dec 7, 2021
Merged
Show file tree
Hide file tree
Changes from all 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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ pvlib/spa_c_files/spa.h
pvlib/spa_c_files/spa_tester.c

# generated documentation
docs/sphinx/source/generated
docs/sphinx/source/reference/generated
docs/sphinx/source/savefig
docs/sphinx/source/auto_examples
docs/sphinx/source/gallery

# Installer logs
pip-log.txt
Expand Down
4 changes: 2 additions & 2 deletions docs/sphinx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ help:

clean:
rm -rf $(BUILDDIR)/*
rm -rf source/generated
rm -rf source/auto_examples
rm -rf source/reference/generated
rm -rf source/gallery
rm -rf source/savefig

html:
Expand Down
4 changes: 2 additions & 2 deletions docs/sphinx/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ if "%1" == "clean" (
REM override the default `make clean` behavior of sphinx-build;
REM this lets us clean out the various build files in sphinx/source/
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
rmdir /q /s %SOURCEDIR%\generated >nul 2>&1
rmdir /q /s %SOURCEDIR%\auto_examples >nul 2>&1
rmdir /q /s %SOURCEDIR%\reference\generated >nul 2>&1
rmdir /q /s %SOURCEDIR%\gallery >nul 2>&1
rmdir /q /s %SOURCEDIR%\savefig >nul 2>&1
goto end
)
Expand Down
Binary file added docs/sphinx/source/_static/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sphinx/source/_static/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 0 additions & 26 deletions docs/sphinx/source/_templates/breadcrumbs.html

This file was deleted.

19 changes: 19 additions & 0 deletions docs/sphinx/source/_templates/edit-this-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{#

Modify the "Edit on Github" links to handle auto-generated pages in the
example gallery and the API reference listings. The GH links that sphinx
generates by default make the assumption that an HTML file comes from an RST
file with the same filepath, which isn't the case for autogenerated files. The
logic to generate the correct URL is in conf.py, but we still have to modify
the template here to change the "Edit this page" text to "View on GitHub".

#}

{% if sourcename is defined and theme_use_edit_page_button==true and page_source_suffix %}
{% set src = sourcename.split('.') %}
<div class="tocsection editthispage">
<a href="{{ get_edit_url() }}">
<i class="fab fa-github-square"></i> {{ _("View on GitHub") }}
</a>
</div>
{% endif %}
Loading