Skip to content

Commit 9bb1c5b

Browse files
committed
Implement PWA Support
1 parent 870864f commit 9bb1c5b

13 files changed

+108
-19
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: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,20 @@ formats:
99
- htmlzip
1010
- pdf
1111

12+
build:
13+
tools:
14+
nodejs: "16"
15+
16+
# Set the version of Python and other tools you might need
17+
build:
18+
os: ubuntu-20.04
19+
tools:
20+
python: "3.8"
21+
# You can also specify other tool versions:
22+
nodejs: "16"
23+
apt_packages:
24+
- librsvg2-bin
25+
1226
python:
13-
version: "3.8"
1427
install:
1528
- requirements: source/requirements.txt

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/frcdocs.webmanifest

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "FRC Docs",
3+
"short_name": "FRC Docs",
4+
"theme_color": "#003974",
5+
"background_color": "#003974",
6+
"display": "standalone",
7+
"scope": "/",
8+
"start_url": "/index.html",
9+
"icons": [
10+
{
11+
"src": "/_static/first-logo-256px.png",
12+
"type": "image/png",
13+
"sizes": "256x256"
14+
},
15+
{
16+
"src": "/_static/first-logo-512px.png",
17+
"type": "image/png",
18+
"sizes": "512x512"
19+
}
20+
]
21+
}

source/_static/sw.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
self.addEventListener('install', function(e) {
2+
e.waitUntil(
3+
caches.open('frc-docs').then(function(cache) {
4+
return cache.addAll([
5+
'/',
6+
'/index.html'
7+
]);
8+
})
9+
);
10+
});
11+
12+
self.addEventListener('fetch', function(event) {
13+
event.respondWith(
14+
caches.match(event.request).then(function(response) {
15+
return response || fetch(event.request);
16+
})
17+
);
18+
});

source/_static/touch-icon.png

30.1 KB
Loading

0 commit comments

Comments
 (0)