Skip to content

Commit a120c43

Browse files
committed
Add pwa, add setonix 0.3
1 parent cad72bb commit a120c43

26 files changed

+731
-1114
lines changed

astro.config.mjs

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { defineConfig } from "astro/config";
22
import mdx from "@astrojs/mdx";
33
import sitemap from "@astrojs/sitemap";
44
import AstroPWA from "@vite-pwa/astro";
5+
import manifest from "./webmanifest.json";
56

67
// https://astro.build/config
78
export default defineConfig({
@@ -10,31 +11,21 @@ export default defineConfig({
1011
mdx(),
1112
sitemap(),
1213
AstroPWA({
13-
workbox: { navigateFallback: "/404" },
14-
manifest: {
15-
name: "Linwood Development",
16-
short_name: "Linwood",
17-
description: "Simple to use software for everyone",
18-
theme_color: "#35EF53",
19-
icons: [
20-
{
21-
src: "android-chrome-192x192.png",
22-
sizes: "192x192",
23-
type: "image/png",
24-
},
25-
{
26-
src: "android-chrome-512x512.png",
27-
sizes: "512x512",
28-
type: "image/png",
29-
},
30-
{
31-
src: "android-chrome-512x512.png",
32-
sizes: "512x512",
33-
type: "image/png",
34-
purpose: "any maskable",
35-
},
14+
workbox: {
15+
skipWaiting: true,
16+
clientsClaim: true,
17+
navigateFallback: "/404",
18+
ignoreURLParametersMatching: [/./],
19+
globPatterns: [
20+
"**/*.{html,js,css,png,svg,json,ttf,pf_fragment,pf_index,pf_meta,pagefind,wasm}",
3621
],
22+
maximumFileSizeToCacheInBytes: 3000000
3723
},
24+
experimental: {
25+
directoryAndTrailingSlashHandler: true,
26+
},
27+
registerType: "autoUpdate",
28+
manifest,
3829
}),
3930
],
4031
});

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,20 @@
1010
"astro": "astro"
1111
},
1212
"dependencies": {
13-
"@astrojs/mdx": "^4.0.5",
13+
"@astrojs/mdx": "^4.0.7",
1414
"@astrojs/rss": "^4.0.11",
1515
"@astrojs/sitemap": "^3.2.1",
1616
"@linwooddev/style": "^0.4.2",
1717
"@phosphor-icons/web": "^2.1.1",
18-
"astro": "^5.1.5",
18+
"astro": "^5.1.9",
1919
"sharp": "^0.33.5",
2020
"typescript": "^5.7.3"
2121
},
2222
"packageManager": "[email protected]",
2323
"devDependencies": {
2424
"@vite-pwa/astro": "^0.5.0",
25-
"sass": "^1.83.1"
25+
"sass": "^1.83.4",
26+
"vite-plugin-pwa": "^0.21.1",
27+
"workbox-window": "^7.3.0"
2628
}
2729
}

0 commit comments

Comments
 (0)