Skip to content

Commit

Permalink
Implement PWA Support
Browse files Browse the repository at this point in the history
  • Loading branch information
Daltz333 committed Feb 14, 2022
1 parent 87b5013 commit 0a8da49
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 17 deletions.
21 changes: 20 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ sphinxext-rediraffe = "==0.2.5"
sphinxext-remoteliteralinclude = "==0.3.0"
sphinxext-toptranslators = "==0.1.2"
urllib3 = ">=1.26.6, <2.0.0"
sphinxext-pwa = {git = "https://github.com/itayziv/sphinxext-pwa.git", rev = "main"}

[tool.poetry.dev-dependencies]

Expand Down
Binary file added source/_static/first-logo-256px.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 source/_static/first-logo-512px.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 source/_static/first-logo-maskable.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 source/_static/touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 16 additions & 1 deletion source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"sphinxext.delta",
"sphinxext.opengraph",
"sphinxext.photofinish",
"sphinxext.pwa",
"sphinxext.rediraffe",
"sphinxext.remoteliteralinclude",
"sphinxext.toptranslators",
Expand Down Expand Up @@ -177,6 +178,17 @@
# Use MathJax3 for better page loading times
mathjax_path = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"

# PWA Specific Settings
pwa_name = "FRC Docs"
pwa_short_name = "FRC Docs"
pwa_theme_color = "#003974"
pwa_background_color = "#003974"
pwa_icons = [
["_static/first-logo-256px.png", "256x256"],
["_static/first-logo-512px.png", "512x512"],
]
pwa_apple_icon = "_static/touch-icon.png"
pwa_maskable_icon = "_static/first-logo-maskable.png"

# -- Options for HTML output -------------------------------------------------

Expand All @@ -198,7 +210,10 @@

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

html_theme_options = {
"collapse_navigation": True,
Expand Down
31 changes: 16 additions & 15 deletions source/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
alabaster==0.7.12; python_version >= "3.6"
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"
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"
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"
beautifulsoup4==4.10.0; python_full_version > "3.0.0" and python_version >= "3.6"
brotli==1.0.9; platform_python_implementation == "CPython" and python_version >= "3.6"
brotlicffi==1.0.9.2; platform_python_implementation != "CPython" and python_version >= "3.6"
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"
cffi==1.15.0; platform_python_implementation != "CPython" and python_version >= "3.6"
chardet==4.0.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
charset-normalizer==2.0.10; python_full_version >= "3.6.0" and python_version >= "3.6"
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"
charset-normalizer==2.0.11; python_full_version >= "3.6.0" and python_version >= "3.6"
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"
data==0.4
decorator==5.1.1; python_version >= "3.5"
doc8==0.8.1
Expand All @@ -18,23 +18,23 @@ future==0.18.2; python_version >= "2.6" and python_full_version < "3.0.0" or pyt
gitdb==4.0.9; python_version >= "3.7"
gitpython==3.1.26; python_version >= "3.7"
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"
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"
jinja2==3.0.3; python_version >= "3.6"
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"
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"
latex==0.7.0
markupsafe==2.0.1; python_version >= "3.6"
packaging==21.3; python_version >= "3.6"
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"
pbr==5.8.0; python_version >= "3.6"
pillow==9.0.0; python_version >= "3.7"
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"
pygments==2.11.2; python_version >= "3.6" and python_version < "4.0"
pyparsing==3.0.6; python_version >= "3.6"
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")
pyparsing==3.0.7; python_version >= "3.6"
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"
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"
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"
restructuredtext-lint==1.3.2
shutilwhich==1.1.0
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"
smmap==5.0.0; python_version >= "3.7"
snowballstemmer==2.2.0; python_version >= "3.6"
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"
soupsieve==2.3.1; python_full_version > "3.0.0" and python_version >= "3.6"
sphinx-hoverxref==0.7b1
sphinx-notfound-page==0.7.1
Expand All @@ -43,12 +43,12 @@ sphinx-rtd-theme==1.0.0; (python_version >= "2.7" and python_full_version < "3.0
sphinx-tabs==3.2.0; python_version >= "3.6" and python_version < "4.0"
sphinx-version-warning==1.1.2
sphinx==4.1.1; python_version >= "3.6"
sphinxcontrib-applehelp==1.0.2; python_version >= "3.6"
sphinxcontrib-devhelp==1.0.2; python_version >= "3.6"
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"
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"
sphinxcontrib-ghcontributors==0.2.2
sphinxcontrib-htmlhelp==2.0.0; python_version >= "3.6"
sphinxcontrib-jsmath==1.0.1; python_version >= "3.6"
sphinxcontrib-qthelp==1.0.3; python_version >= "3.6"
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"
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"
sphinxcontrib-serializinghtml==1.1.5; python_version >= "3.5"
sphinxcontrib-svg2pdfconverter==1.1.1; python_version >= "3.4" and python_version < "4.0"
sphinxext-delta==0.2.0; python_version >= "3.6"
Expand All @@ -57,6 +57,7 @@ sphinxext-mimic==0.1.1; python_version >= "3.6"
sphinxext-opengraph==0.4.1; python_version >= "3.6"
sphinxext-photofinish==0.1.8; python_version >= "3.6"
sphinxext-presentations==0.2.2; python_version >= "3.6"
sphinxext-pwa @ git+https://github.com/itayziv/sphinxext-pwa.git@main ; python_version >= "3.6"
sphinxext-rediraffe==0.2.5; python_version >= "3.6"
sphinxext-remoteliteralinclude==0.3.0; python_version >= "3.4"
sphinxext-toptranslators==0.1.2; python_version >= "3.6"
Expand Down

0 comments on commit 0a8da49

Please sign in to comment.