-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
113 lines (110 loc) · 2.76 KB
/
astro.config.mjs
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
103
104
105
106
107
108
109
110
111
112
113
import mdx from '@astrojs/mdx';
import react from '@astrojs/react';
import sitemap from '@astrojs/sitemap';
import tailwind from '@astrojs/tailwind';
import pwa from '@vite-pwa/astro';
import { astroExpressiveCode } from 'astro-expressive-code';
import robotsTxt from 'astro-robots-txt';
import { defineConfig } from 'astro/config';
import { dirname, resolve } from 'path';
import { astroOgImage } from './integrations/astroOgImage';
const __dirname = dirname(new URL('', import.meta.url).pathname);
// https://astro.build/config
export default defineConfig({
// site: 'https://brown-baths-wash.loca.lt',
site: 'https://viniciusflv.github.io',
compressHTML: true,
devToolbar: {
enabled: false,
},
server: ({ command }) => ({
port: command === 'dev' ? 3000 : 8000,
}),
vite: {
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
},
},
integrations: [
astroOgImage({
__dirname,
brand: resolve(__dirname, './src/assets/svg/me-ricknmorty.svg'),
favicon: resolve(__dirname, './src/assets/svg/me-ricknmorty-face.svg'),
content: resolve(__dirname, './src/**/*.mdx'),
fonts: [
{
name: 'RocknRoll One',
src: resolve(
__dirname,
'./src/assets/fonts/RocknRollOne-Regular.ttf',
),
weight: 400,
style: 'normal',
},
],
}),
astroExpressiveCode({
theme: 'dracula',
useThemedScrollbars: true,
useThemedSelectionColors: true,
}),
pwa({
mode: 'development',
base: '/',
scope: '/',
includeAssets: ['favicon.png'],
registerType: 'autoUpdate',
manifest: {
name: 'Astro PWA',
short_name: 'Astro PWA',
theme_color: '#ffffff',
icons: [
{
src: 'favicon-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'favicon-512x512.png',
sizes: '512x512',
type: 'image/png',
},
{
src: 'favicon-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable',
},
],
},
workbox: {
navigateFallback: '/404',
},
devOptions: {
// enabled: true,
suppressWarnings: true,
navigateFallbackAllowlist: [/^\//],
},
experimental: {
directoryAndTrailingSlashHandler: true,
},
}),
mdx(),
tailwind(),
react(),
robotsTxt(),
sitemap(),
],
// experimental: {
// i18n: {
// routingStrategy: "prefix-always",
// defaultLocale: "en",
// locales: ["en", "pt-BR"],
// fallback: {
// "pt-BR": "en",
// },
// },
// },
});