diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 35fd68b2a1..fffe57f96d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 diff --git a/poetry.lock b/poetry.lock index ba428373bb..f52a198e3e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -664,6 +664,17 @@ python-versions = ">=3.6" [package.dependencies] sphinx = ">=2.0" +[[package]] +name = "sphinxext-pwa" +version = "0.0.3a0" +description = "Sphinx Extension to turn Sphinx websites into Progressive Web Applications" +category = "main" +optional = false +python-versions = ">=3.8" + +[package.dependencies] +sphinx = ">=2.0" + [[package]] name = "sphinxext-rediraffe" version = "0.2.5" @@ -742,7 +753,7 @@ python-versions = "*" [metadata] lock-version = "1.1" python-versions = "^3.9" -content-hash = "3c312d43248049b22df4416f3fb93ff3b4da83773ac5ef8a06627b13b764a5cb" +content-hash = "d823e33efa51aafaebd9f02d58ed8bc285903ffd75a6d14b57e0eaf3c9dc8946" [metadata.files] alabaster = [ @@ -1211,6 +1222,10 @@ sphinxext-presentations = [ {file = "sphinxext-presentations-0.2.2.tar.gz", hash = "sha256:fb9c86fb3790fc0f5eb8a3f5824cfa75b13a6481079de95ceef95ab36db3a018"}, {file = "sphinxext_presentations-0.2.2-py3-none-any.whl", hash = "sha256:11d285286224c631893dcce1659b925dcdb9e52757a41a3e78796c4b21a87489"}, ] +sphinxext-pwa = [ + {file = "sphinxext-pwa-0.0.3a0.tar.gz", hash = "sha256:cdfb5f5d17d3f5ad442d2008f41320d265aabcb0a668c6d7d906da9861e4544d"}, + {file = "sphinxext_pwa-0.0.3a0-py3-none-any.whl", hash = "sha256:54920de08543f56c601d5816002ae54977e5cf34d14134b17989774ad14472e0"}, +] sphinxext-rediraffe = [ {file = "sphinxext-rediraffe-0.2.5.tar.gz", hash = "sha256:a17287cdee7763341b91762879e042b33a4916d6a2fc6d2f97a18107325bd2cc"}, {file = "sphinxext_rediraffe-0.2.5-py3-none-any.whl", hash = "sha256:7b706284d20602acecc1783cc58c8d0543937af1ee53f912bfdc4b258a7e649a"}, diff --git a/pyproject.toml b/pyproject.toml index a9093d509f..3eea25dd50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/readthedocs.yml b/readthedocs.yml index 92785ec03c..9190b3f8bf 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -9,6 +9,7 @@ build: os: ubuntu-20.04 tools: python: "3.9" + nodejs: "16" formats: - htmlzip diff --git a/source/_static/first-logo-256px.png b/source/_static/first-logo-256px.png new file mode 100644 index 0000000000..438488faf9 Binary files /dev/null and b/source/_static/first-logo-256px.png differ diff --git a/source/_static/first-logo-512px.png b/source/_static/first-logo-512px.png new file mode 100644 index 0000000000..19d0ca6304 Binary files /dev/null and b/source/_static/first-logo-512px.png differ diff --git a/source/_static/first-logo-maskable.png b/source/_static/first-logo-maskable.png new file mode 100644 index 0000000000..97a73e0ea4 Binary files /dev/null and b/source/_static/first-logo-maskable.png differ diff --git a/source/_static/touch-icon.png b/source/_static/touch-icon.png new file mode 100644 index 0000000000..0b4b5c78eb Binary files /dev/null and b/source/_static/touch-icon.png differ diff --git a/source/conf.py b/source/conf.py index 61d01af306..5ee19b8de3 100644 --- a/source/conf.py +++ b/source/conf.py @@ -43,6 +43,7 @@ "sphinxext.delta", "sphinxext.opengraph", "sphinxext.photofinish", + "sphinxext.pwa", "sphinxext.rediraffe", "sphinxext.remoteliteralinclude", "sphinxext.toptranslators", @@ -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 ------------------------------------------------- @@ -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". @@ -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, diff --git a/source/requirements.txt b/source/requirements.txt index 9377a5bc1f..52a048d36d 100644 --- a/source/requirements.txt +++ b/source/requirements.txt @@ -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" @@ -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 @@ -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"