Skip to content

Commit 79d9dc7

Browse files
committed
Implement PWA Support
1 parent d826818 commit 79d9dc7

File tree

8 files changed

+40
-34
lines changed

8 files changed

+40
-34
lines changed

poetry.lock

Lines changed: 20 additions & 31 deletions
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/wpilibsuite/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+
["first-logo-256px.png", "256x256"],
188+
["first-logo-512px.png", "512x512"],
189+
]
190+
pwa_apple_icon = "_static/touch-icon.png"
191+
pwa_maskable_icon = "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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ brotlicffi==1.0.9.2; platform_python_implementation != "CPython" and python_vers
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"
9+
charset-normalizer==2.0.11; python_full_version >= "3.6.0" and python_version >= "3.6"
1010
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"
1111
data==0.4
1212
decorator==5.1.1; python_version >= "3.5"
@@ -27,7 +27,7 @@ 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"
2929
pygments==2.11.2; python_version >= "3.6" and python_version < "4.0"
30-
pyparsing==3.0.6; python_version >= "3.6"
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"
3232
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"
3333
restructuredtext-lint==1.3.2
@@ -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/wpilibsuite/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)