-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathastro.config.mjs
52 lines (51 loc) · 1.27 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
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import tailwind from "@astrojs/tailwind";
const site = 'https://astro-cn.com/';
// https://astro.build/config
export default defineConfig({
site,
integrations: [starlight({
title: 'Astro 中文网站 Showcase',
social: {
github: 'https://github.com/liruifengv/astro-site-showcase-cn'
},
head: [{
tag: 'meta',
attrs: {
property: 'og:image',
content: site + 'og.png?v=1'
}
}, {
tag: 'meta',
attrs: {
property: 'twitter:image',
content: site + 'og.png?v=1'
}
}, {
tag: 'script',
attrs: {
src: 'https://www.googletagmanager.com/gtag/js?id=G-E8HJ681XLY',
async: true
}
}, {
tag: 'script',
content: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-E8HJ681XLY');
`
}],
pagination: false,
pagefind: false,
customCss: ['./src/styles/tailwind.css'],
sidebar: [{
label: 'Showcase',
link: '/showcase/'
}]
}), tailwind({
// 禁用默认的基础样式
applyBaseStyles: false,
})]
});