Skip to content

Commit c7932f7

Browse files
committed
Implement PWA Support
1 parent 73d3d15 commit c7932f7

File tree

10 files changed

+34
-8
lines changed

10 files changed

+34
-8
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install LaTeX
1717
run: |
1818
sudo apt-get update
19-
sudo apt install -y texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra latexmk texlive-lang-greek texlive-luatex texlive-xetex texlive-fonts-extra dvipng librsvg2-bin
19+
sudo apt install -y texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra latexmk texlive-lang-greek texlive-luatex texlive-xetex texlive-fonts-extra dvipng librsvg2-bin nodejs npm
2020
- name: Build HTML
2121
run: |
2222
make html

poetry.lock

Lines changed: 16 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
@@ -27,6 +27,7 @@ sphinxext-mimic = "==0.1.1"
2727
sphinxext-opengraph = "==0.4.1"
2828
sphinxext-photofinish = "==0.1.8"
2929
sphinxext-presentations = "==0.2.2"
30+
sphinxext-pwa = "==0.0.3a0"
3031
sphinxext-rediraffe = "==0.2.5"
3132
sphinxext-remoteliteralinclude = "==0.3.0"
3233
sphinxext-toptranslators = "==0.1.2"

readthedocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ build:
99
os: ubuntu-20.04
1010
tools:
1111
python: "3.9"
12+
nodejs: "16"
1213

1314
formats:
1415
- htmlzip

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: 12 additions & 4 deletions
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

@@ -196,10 +208,6 @@
196208
# URL favicon
197209
html_favicon = "assets/FIRSTicon_RGB_withTM.ico"
198210

199-
# Specify canonical root
200-
# This tells search engines that this domain is preferred
201-
html_baseurl = "https://docs.wpilib.org/en/stable/"
202-
203211
html_theme_options = {
204212
"collapse_navigation": True,
205213
"sticky_navigation": False,

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.1; 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)