Skip to content

Commit bf8c35e

Browse files
nikoshellhyphaclytaemnestra
authored
Create a Progressive Web App for the website (#1248)
open /schedule on your phone and add website to home screen ![Untitled design(1)](https://github.com/user-attachments/assets/69551380-083e-4441-aeea-d44134b182f3) --------- Co-authored-by: hypha <[email protected]> Co-authored-by: Mia Bajić <[email protected]>
1 parent 1cec1bf commit bf8c35e

24 files changed

+3847
-629
lines changed

astro.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import rehypeSlug from "rehype-slug";
77
import rehypeAutolinkHeadings from "rehype-autolink-headings";
88
import metaTags from "astro-meta-tags";
99
import deleteUnusedImages from "astro-delete-unused-images";
10+
import serviceWorker from "astrojs-service-worker";
1011
import { execSync } from "node:child_process";
1112
import svelte from "@astrojs/svelte";
1213
import compress from "astro-compress";
@@ -117,6 +118,9 @@ export default defineConfig({
117118
metaTags(),
118119
deleteUnusedImages(),
119120
svelte(),
121+
serviceWorker({
122+
workbox: { inlineWorkboxRuntime: true },
123+
}),
120124
compress({
121125
HTML: false,
122126
CSS: false,
@@ -132,4 +136,8 @@ export default defineConfig({
132136
remotePatterns: [{ protocol: "https" }],
133137
domains: ["programme.europython.eu", "placehold.co"],
134138
},
139+
prefetch: {
140+
prefetchAll: true,
141+
defaultStrategy: "load",
142+
},
135143
});

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"astro-meta-tags": "^0.3.2",
2828
"astro-pagefind": "^1.8.3",
2929
"astro-preload": "^1.1.2",
30+
"astrojs-service-worker": "^2.0.0",
3031
"clsx": "^2.1.1",
3132
"date-fns": "^4.1.0",
3233
"date-fns-tz": "^3.2.0",

pnpm-lock.yaml

Lines changed: 3527 additions & 543 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/android-chrome-144x144.png

12.9 KB
Loading

public/android-chrome-192x192.png

18 KB
Loading

public/android-chrome-256x256.png

25 KB
Loading

public/android-chrome-36x36.png

2.78 KB
Loading

public/android-chrome-384x384.png

40.2 KB
Loading

public/android-chrome-48x48.png

3.6 KB
Loading

public/android-chrome-512x512.png

56.2 KB
Loading

0 commit comments

Comments
 (0)