-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
44 lines (40 loc) · 1.33 KB
/
Copy pathastro.config.mjs
File metadata and controls
44 lines (40 loc) · 1.33 KB
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
// @ts-check
import { defineConfig } from 'astro/config'
import sitemap from '@astrojs/sitemap'
import tailwind from '@tailwindcss/vite'
/**
* 정적 사이트.
*
* 프레임워크 섬을 안 쓴다. 움직이는 건 모루와 복사 버튼 정도라 짧은 인라인 스크립트로 충분하다.
* 도트 몇 개 보여주려고 React 를 싣지 않는다.
*
* 언어는 주소로 가른다. 한국어는 `/why`, 나머지는 `/en/why`.
* 한 주소에서 자바스크립트로 말만 바꾸면 검색 결과에는 한 언어만 남는다.
*/
export default defineConfig({
site: 'https://gitmoru.dev',
// 서버가 내주는 주소와 우리가 적는 주소를 같게 맞춘다.
// 이게 어긋나면 canonical 이 리디렉션되는 곳을 가리키게 된다.
trailingSlash: 'always',
i18n: {
defaultLocale: 'ko',
locales: ['ko', 'en', 'ja'],
routing: {
// 한국어에는 주소 앞에 표시를 안 붙인다
prefixDefaultLocale: false,
},
},
integrations: [
sitemap({
// 공유 카드용 화면은 사람이 볼 자리가 아니다. 검색 결과에 뜨면 안 된다.
filter: (page) => !page.includes('/og/'),
i18n: {
defaultLocale: 'ko',
locales: { ko: 'ko-KR', en: 'en', ja: 'ja-JP' },
},
}),
],
vite: {
plugins: [tailwind()],
},
})