-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.ts
102 lines (98 loc) · 3.04 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import { defineConfig } from 'astro/config';
import UnoCSS from 'unocss/astro';
import solidJs from '@astrojs/solid-js';
import sitemap from '@astrojs/sitemap';
import AstroPWA from '@vite-pwa/astro';
import vercel from '@astrojs/vercel/serverless';
import mdx from '@astrojs/mdx';
// https://astro.build/config
export default defineConfig({
site: `https://foriran.io`,
output: 'server',
vite: {
logLevel: 'info',
define: {
__DATE__: `'${new Date().toISOString()}'`
}
},
integrations: [UnoCSS(), solidJs(),
// preact(),
// Enable React for the Algolia search component.
// react(),
// mdx(),
sitemap(), mdx(), AstroPWA({
mode: 'development',
base: '/',
scope: '/',
includeAssets: ['favicon.svg', 'fonts/*.woff2', 'images/*.png', 'images/*.svg', 'diagrams/*.png', 'diagrams/*.svg'],
manifest: {
name: 'برای ایران',
short_name: 'برای ایران',
theme_color: '#ffffff',
// background_color: '#000000',
display: 'standalone',
scope: '/',
orientation: 'portrait-primary',
start_url: '/',
description: 'گردآوری و سازماندهی اطلاعات خیزش زن زندگی آزادی',
lang: 'fa',
icons: [{
src: '/pwa/app-icon.svg',
sizes: '48x48 72x72 96x96 128x128 192x192 256x256 384x384 512x512',
type: 'image/svg+xml',
purpose: 'any'
}]
},
workbox: {
navigateFallback: '/404',
globPatterns: ['**/*.{css,js,html,svg,png,ico,txt}'],
sourcemap: true
},
devOptions: {
enabled: true,
navigateFallbackAllowlist: [/^\/404$/]
}
})],
adapter: vercel()
});
// archived vite-pwa-plugin configs. removed in favor of @vite-pwa/astro which is easer to install
// vite: {
// plugins: [
// VitePWA({
// devOptions: {
// enabled: true,
// },
// workbox: {
// globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
// },
// }),
// ],
// },
// publicDir: {
// includeAssets: ['fonts/*.ttf', 'images/*.png'],
// },
// experimental: {
// assets: true
// }
// // to enable these features in the future.
// archived config for markdown. not used. other related files are removed.
// markdown: {
// syntaxHighlight: false,
// // remarkPlugins: ['remark-mermaidjs', { launchOptions: { executablePath: chromium.executablePath() } }],
// rehypePlugins: [renderMermaid],
// // 'rehype-slug',
// // ['rehype-autolink-headings', { behavior: 'prepend' }],
// // ['rehype-toc', { headings: ['h2', 'h3'] }],
// // [addClasses, { 'h1,h2,h3': 'title' }],
// // ],
// // shikiConfig: {
// // // Choose from Shiki's built-in themes (or add your own)
// // // https://github.com/shikijs/shiki/blob/main/docs/themes.md
// // // Add custom languages
// // // Note: Shiki has countless langs built-in, including .astro!
// // // https://github.com/shikijs/shiki/blob/main/docs/languages.md
// // langs: ['javascript'],
// // // Enable word wrap to prevent horizontal scrolling
// // wrap: true,
// // },
// },