generated from kemo-1/Starlight-Pwa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.ts
50 lines (49 loc) · 1.3 KB
/
astro.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import type { ManifestOptions } from "vite-plugin-pwa";
import manifest from "./webmanifest.json";
import AstroPWA from "@vite-pwa/astro";
// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'My Docs',
credits: true,
customCss: ['./src/styles/custom.css'],
social: {
github: 'https://github.com/sanabel-al-firdaws/Starlight-Pwa',
},
sidebar: [
{
label: 'Guides',
items: [
// Each item here is one entry in the navigation menu.
{ label: 'Example Guide', slug: 'guides/example' },
],
},
{
label: 'Reference',
autogenerate: { directory: 'reference' },
},
],
components: {
Head: './src/components/Head.astro',
Search: './src/components/Search.astro', }
}),
AstroPWA({
workbox: {
skipWaiting: true,
clientsClaim: true,
navigateFallback: "/404",
ignoreURLParametersMatching: [/./],
globPatterns: ['**/*.{html,js,css,png,svg,json,ttf,pf_fragment,pf_index,pf_meta,pagefind,wasm}'],
},
experimental: {
directoryAndTrailingSlashHandler: true,
},
mode: "production",
registerType: 'autoUpdate',
manifest: (manifest as Partial<ManifestOptions>)
}),
],
});