-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.ts
55 lines (53 loc) · 1.59 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
import { defineConfig } from 'astro/config'
import { loadEnv } from 'vite'
import tailwind from '@astrojs/tailwind'
import sitemap from '@astrojs/sitemap'
import mdx from '@astrojs/mdx'
import remarkLinkCard from 'remark-link-card'
import RemarkLinkRewrite, {
type RemarkLinkRewriteOptions,
} from 'remark-link-rewrite'
import { getFormatUrl } from './src/utils/validateUrl'
import pagefind from './src/integrations/pagefind'
const { SITE_URL } = loadEnv(process.env.NODE_ENV!, process.cwd(), '')
// https://astro.build/config
export default defineConfig({
site: SITE_URL,
// 旧ウェブサイトでよくアクセスされていたURLにリダイレクトを設定する
redirects: {
'/about.html': '/',
'/access.html': '/',
'/activity.html': '/activity/',
'/contact.html': '/contact/',
'/join.html': '/join/',
'/link.html': '/',
'/member.html': '/',
'/part.html': '/',
'/welcomeevent.html': '/',
'/group/programming': '/',
'/group/programming/about.html': '/',
'/group/programming/activity.html': '/',
'/group/programming/works.html': '/',
'/group/handaitaisen/handai_taisen.html': '/',
'/blog/articles': '/blog/',
},
outDir: './dist/out',
cacheDir: './dist/cache',
prefetch: {
prefetchAll: true,
},
trailingSlash: 'always',
markdown: {
remarkPlugins: [
remarkLinkCard,
[
RemarkLinkRewrite,
{ replacer: getFormatUrl(SITE_URL) } satisfies RemarkLinkRewriteOptions,
],
],
},
experimental: {
contentCollectionJsonSchema: true,
},
integrations: [tailwind(), pagefind(), sitemap(), mdx()],
})