Skip to content

Commit

Permalink
Implement PWA Support
Browse files Browse the repository at this point in the history
  • Loading branch information
Daltz333 committed Mar 9, 2022
1 parent 94bc6de commit 38f14f8
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 36 deletions.
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
51 changes: 20 additions & 31 deletions poetry.lock

Large diffs are not rendered by default.

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/wpilibsuite/sphinxext-pwa.git", rev = "main"}

[tool.poetry.dev-dependencies]

Expand Down
15 changes: 14 additions & 1 deletion readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@ formats:
- htmlzip
- pdf

build:
tools:
nodejs: "16"

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.8"
# You can also specify other tool versions:
nodejs: "16"
apt_packages:
- librsvg2-bin

python:
version: "3.8"
install:
- requirements: source/requirements.txt
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 = [
["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 @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Set Driver Station to Default

Open the Driver Station software, click on the Setup tab and set the Dashboard setting to Default. **Then close the Driver Station!**

Locate Dashboard JAR file
-------------------------

Find the location of the dashboard ``jar`` file.

Open DS Data Storage file
-------------------------

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.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"
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

0 comments on commit 38f14f8

Please sign in to comment.