Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Offline PWA Support #1704

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install LaTeX
run: |
sudo apt-get update
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
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
- name: Build HTML
run: |
make html
Expand Down
17 changes: 16 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 @@ -27,6 +27,7 @@ sphinxext-mimic = "==0.1.1"
sphinxext-opengraph = "==0.4.1"
sphinxext-photofinish = "==0.1.8"
sphinxext-presentations = "==0.2.2"
sphinxext-pwa = "==0.0.3a0"
sphinxext-rediraffe = "==0.2.5"
sphinxext-remoteliteralinclude = "==0.3.0"
sphinxext-toptranslators = "==0.1.2"
Expand Down
1 change: 1 addition & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ build:
os: ubuntu-20.04
tools:
python: "3.9"
nodejs: "16"

formats:
- htmlzip
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.
20 changes: 16 additions & 4 deletions 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 = [
["first-logo-256px.png", "256x256"],
["first-logo-512px.png", "512x512"],
]
pwa_apple_icon = "_static/touch-icon.png"
pwa_maskable_icon = "first-logo-maskable.png"

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

Expand All @@ -185,6 +197,10 @@
#
html_theme = "sphinx_rtd_theme"

# Specify canonical root
# This tells search engines that this domain is preferred
html_baseurl = "https://docs.wpilib.org/en/stable/"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
Expand All @@ -196,10 +212,6 @@
# URL favicon
html_favicon = "assets/FIRSTicon_RGB_withTM.ico"

# Specify canonical root
# This tells search engines that this domain is preferred
html_baseurl = "https://docs.wpilib.org/en/stable/"

html_theme_options = {
"collapse_navigation": True,
"sticky_navigation": False,
Expand Down
5 changes: 3 additions & 2 deletions source/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ brotlicffi==1.0.9.2; platform_python_implementation != "CPython" and python_vers
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"
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" or sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.5.0"
data==0.4
decorator==5.1.1; python_version >= "3.5"
Expand All @@ -27,7 +27,7 @@ pbr==5.8.0; python_version >= "3.6"
pillow==9.0.1; 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"
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"
restructuredtext-lint==1.3.2
Expand Down Expand Up @@ -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/wpilibsuite/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