Skip to content

Commit db7e5d8

Browse files
authored
Use pydata theme and reorganize pages for sphinx docs (#1173)
* proof of concept * stickler * fix "view on github" links * misc edits * stickler * add favicons (!) * header icons for stackoverflow, google group, pypi * bump copyright year to 2021 * clean up left sidebar by breaking out api sections into separate files * rename auto_examples -> gallery * update gitignore
1 parent aba071f commit db7e5d8

37 files changed

+828
-790
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ pvlib/spa_c_files/spa.h
3939
pvlib/spa_c_files/spa_tester.c
4040

4141
# generated documentation
42-
docs/sphinx/source/generated
42+
docs/sphinx/source/reference/generated
4343
docs/sphinx/source/savefig
44-
docs/sphinx/source/auto_examples
44+
docs/sphinx/source/gallery
4545

4646
# Installer logs
4747
pip-log.txt

docs/sphinx/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ help:
4848

4949
clean:
5050
rm -rf $(BUILDDIR)/*
51-
rm -rf source/generated
52-
rm -rf source/auto_examples
51+
rm -rf source/reference/generated
52+
rm -rf source/gallery
5353
rm -rf source/savefig
5454

5555
html:

docs/sphinx/make.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ if "%1" == "clean" (
1717
REM override the default `make clean` behavior of sphinx-build;
1818
REM this lets us clean out the various build files in sphinx/source/
1919
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
20-
rmdir /q /s %SOURCEDIR%\generated >nul 2>&1
21-
rmdir /q /s %SOURCEDIR%\auto_examples >nul 2>&1
20+
rmdir /q /s %SOURCEDIR%\reference\generated >nul 2>&1
21+
rmdir /q /s %SOURCEDIR%\gallery >nul 2>&1
2222
rmdir /q /s %SOURCEDIR%\savefig >nul 2>&1
2323
goto end
2424
)
854 Bytes
Loading
2.3 KB
Loading

docs/sphinx/source/_templates/breadcrumbs.html

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{#
2+
3+
Modify the "Edit on Github" links to handle auto-generated pages in the
4+
example gallery and the API reference listings. The GH links that sphinx
5+
generates by default make the assumption that an HTML file comes from an RST
6+
file with the same filepath, which isn't the case for autogenerated files. The
7+
logic to generate the correct URL is in conf.py, but we still have to modify
8+
the template here to change the "Edit this page" text to "View on GitHub".
9+
10+
#}
11+
12+
{% if sourcename is defined and theme_use_edit_page_button==true and page_source_suffix %}
13+
{% set src = sourcename.split('.') %}
14+
<div class="tocsection editthispage">
15+
<a href="{{ get_edit_url() }}">
16+
<i class="fab fa-github-square"></i> {{ _("View on GitHub") }}
17+
</a>
18+
</div>
19+
{% endif %}

0 commit comments

Comments
 (0)