Skip to content

Commit 0a8da49

Browse files
committed
Implement PWA Support
1 parent 87b5013 commit 0a8da49

File tree

8 files changed

+53
-17
lines changed

8 files changed

+53
-17
lines changed

poetry.lock

Lines changed: 20 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ sphinxext-rediraffe = "==0.2.5"
3131
sphinxext-remoteliteralinclude = "==0.3.0"
3232
sphinxext-toptranslators = "==0.1.2"
3333
urllib3 = ">=1.26.6, <2.0.0"
34+
sphinxext-pwa = {git = "https://github.com/itayziv/sphinxext-pwa.git", rev = "main"}
3435

3536
[tool.poetry.dev-dependencies]
3637

source/_static/first-logo-256px.png

19.7 KB
Loading

source/_static/first-logo-512px.png

43.3 KB
Loading
30.7 KB
Loading

source/_static/touch-icon.png

30.1 KB
Loading

source/conf.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"sphinxext.delta",
4444
"sphinxext.opengraph",
4545
"sphinxext.photofinish",
46+
"sphinxext.pwa",
4647
"sphinxext.rediraffe",
4748
"sphinxext.remoteliteralinclude",
4849
"sphinxext.toptranslators",
@@ -177,6 +178,17 @@
177178
# Use MathJax3 for better page loading times
178179
mathjax_path = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"
179180

181+
# PWA Specific Settings
182+
pwa_name = "FRC Docs"
183+
pwa_short_name = "FRC Docs"
184+
pwa_theme_color = "#003974"
185+
pwa_background_color = "#003974"
186+
pwa_icons = [
187+
["_static/first-logo-256px.png", "256x256"],
188+
["_static/first-logo-512px.png", "512x512"],
189+
]
190+
pwa_apple_icon = "_static/touch-icon.png"
191+
pwa_maskable_icon = "_static/first-logo-maskable.png"
180192

181193
# -- Options for HTML output -------------------------------------------------
182194

@@ -198,7 +210,10 @@
198210

199211
# Specify canonical root
200212
# This tells search engines that this domain is preferred
201-
html_baseurl = "https://docs.wpilib.org/en/stable/"
213+
if os.getenv("TESTING"):
214+
html_baseurl = "http://localhost:8000/"
215+
else:
216+
html_baseurl = "https://frc-docs--1704.org.readthedocs.build/en/1704/"
202217

203218
html_theme_options = {
204219
"collapse_navigation": True,

source/requirements.txt

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
alabaster==0.7.12; python_version >= "3.6"
2-
babel==2.9.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
1+
alabaster==0.7.12; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.4.0" and python_version >= "3.6" and python_version < "4.0"
2+
babel==2.9.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.4.0" and python_version >= "3.6" and python_version < "4.0"
33
beautifulsoup4==4.10.0; python_full_version > "3.0.0" and python_version >= "3.6"
44
brotli==1.0.9; platform_python_implementation == "CPython" and python_version >= "3.6"
55
brotlicffi==1.0.9.2; platform_python_implementation != "CPython" and python_version >= "3.6"
66
certifi==2021.10.8; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"
77
cffi==1.15.0; platform_python_implementation != "CPython" and python_version >= "3.6"
88
chardet==4.0.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
9-
charset-normalizer==2.0.10; python_full_version >= "3.6.0" and python_version >= "3.6"
10-
colorama==0.4.4; python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.5.0"
9+
charset-normalizer==2.0.11; python_full_version >= "3.6.0" and python_version >= "3.6"
10+
colorama==0.4.4; python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6") and python_version < "4.0" or sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.5.0" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6") and python_version < "4.0"
1111
data==0.4
1212
decorator==5.1.1; python_version >= "3.5"
1313
doc8==0.8.1
@@ -18,23 +18,23 @@ future==0.18.2; python_version >= "2.6" and python_full_version < "3.0.0" or pyt
1818
gitdb==4.0.9; python_version >= "3.7"
1919
gitpython==3.1.26; python_version >= "3.7"
2020
idna==3.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"
21-
imagesize==1.3.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
22-
jinja2==3.0.3; python_version >= "3.6"
21+
imagesize==1.3.0; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.4.0" and python_version >= "3.6" and python_version < "4.0"
22+
jinja2==3.0.3; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.4.0" and python_version >= "3.6" and python_version < "4.0"
2323
latex==0.7.0
2424
markupsafe==2.0.1; python_version >= "3.6"
25-
packaging==21.3; python_version >= "3.6"
25+
packaging==21.3; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.4.0" and python_version >= "3.6" and python_version < "4.0"
2626
pbr==5.8.0; python_version >= "3.6"
2727
pillow==9.0.0; python_version >= "3.7"
2828
pycparser==2.21; python_version >= "3.6" and python_full_version < "3.0.0" and platform_python_implementation != "CPython" or platform_python_implementation != "CPython" and python_version >= "3.6" and python_full_version >= "3.4.0"
29-
pygments==2.11.2; python_version >= "3.6" and python_version < "4.0"
30-
pyparsing==3.0.6; python_version >= "3.6"
29+
pygments==2.11.2; python_version >= "3.6" and python_version < "4.0" and (python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.4.0" and python_version >= "3.6" and python_version < "4.0")
30+
pyparsing==3.0.7; python_version >= "3.6"
3131
pytz==2021.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
32-
requests==2.27.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"
32+
requests==2.27.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.6.0" and python_version >= "3.6" and python_version < "4.0"
3333
restructuredtext-lint==1.3.2
3434
shutilwhich==1.1.0
3535
six==1.16.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.6"
3636
smmap==5.0.0; python_version >= "3.7"
37-
snowballstemmer==2.2.0; python_version >= "3.6"
37+
snowballstemmer==2.2.0; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.4.0" and python_version >= "3.6" and python_version < "4.0"
3838
soupsieve==2.3.1; python_full_version > "3.0.0" and python_version >= "3.6"
3939
sphinx-hoverxref==0.7b1
4040
sphinx-notfound-page==0.7.1
@@ -43,12 +43,12 @@ sphinx-rtd-theme==1.0.0; (python_version >= "2.7" and python_full_version < "3.0
4343
sphinx-tabs==3.2.0; python_version >= "3.6" and python_version < "4.0"
4444
sphinx-version-warning==1.1.2
4545
sphinx==4.1.1; python_version >= "3.6"
46-
sphinxcontrib-applehelp==1.0.2; python_version >= "3.6"
47-
sphinxcontrib-devhelp==1.0.2; python_version >= "3.6"
46+
sphinxcontrib-applehelp==1.0.2; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.4.0" and python_version >= "3.6" and python_version < "4.0"
47+
sphinxcontrib-devhelp==1.0.2; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.4.0" and python_version >= "3.6" and python_version < "4.0"
4848
sphinxcontrib-ghcontributors==0.2.2
4949
sphinxcontrib-htmlhelp==2.0.0; python_version >= "3.6"
50-
sphinxcontrib-jsmath==1.0.1; python_version >= "3.6"
51-
sphinxcontrib-qthelp==1.0.3; python_version >= "3.6"
50+
sphinxcontrib-jsmath==1.0.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.4.0" and python_version >= "3.6" and python_version < "4.0"
51+
sphinxcontrib-qthelp==1.0.3; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_full_version >= "3.4.0" and python_version >= "3.6" and python_version < "4.0"
5252
sphinxcontrib-serializinghtml==1.1.5; python_version >= "3.5"
5353
sphinxcontrib-svg2pdfconverter==1.1.1; python_version >= "3.4" and python_version < "4.0"
5454
sphinxext-delta==0.2.0; python_version >= "3.6"
@@ -57,6 +57,7 @@ sphinxext-mimic==0.1.1; python_version >= "3.6"
5757
sphinxext-opengraph==0.4.1; python_version >= "3.6"
5858
sphinxext-photofinish==0.1.8; python_version >= "3.6"
5959
sphinxext-presentations==0.2.2; python_version >= "3.6"
60+
sphinxext-pwa @ git+https://github.com/itayziv/sphinxext-pwa.git@main ; python_version >= "3.6"
6061
sphinxext-rediraffe==0.2.5; python_version >= "3.6"
6162
sphinxext-remoteliteralinclude==0.3.0; python_version >= "3.4"
6263
sphinxext-toptranslators==0.1.2; python_version >= "3.6"

0 commit comments

Comments
 (0)