master
1// WARNING: This file will be bundled into the build product.
2// DO NOT add any sensitive information here.
3// 警告: 该文件会被打包到构建产物中, 不要在此添加任何敏感信息
4import type {
5 ArticleConfig,
6 AsideConfig,
7 BuildConfig,
8 CommentConfig,
9 FastActionsConfig,
10 FooterConfig,
11 LicenseConfig,
12 LinksConfig,
13 NavbarConfig,
14 ProfileConfig,
15 SearchConfig,
16 SiteConfig,
17} from './types/config';
18import { L } from '@astral-halo/i18n';
19
20export const siteConfig: SiteConfig = {
21 title: 'Astral Halo',
22 subtitle: 'A static blog template powered by Astro',
23 lang: 'en',
24 createAt: new Date('2025-01-01'),
25 postsPerPage: 10,
26 banner: {
27 src: 'assets/img/demo_banner.jpg',
28 text: 'Welcome to Astral Halo!',
29 homepageHeight: '100svh',
30 postHeight: '40svh',
31 pagesHeight: [
32 // {
33 // pagePathRegex: /\/about\//,
34 // height: '50svh',
35 // },
36 ],
37 defaultHeight: '40svh',
38 },
39};
40
41// To avoid circular dependency
42const t = L[siteConfig.lang].web;
43
44export const buildConfig: BuildConfig = {
45 showDraftsOnDev: true,
46 inferRemoteImageSize: {
47 enable: true,
48 defaultSize: {
49 width: 800,
50 height: 600,
51 },
52 },
53 enableImageZoom: true,
54 themeNames: {
55 light: 'light',
56 dark: 'dark',
57 },
58};
59
60export const profileConfig: ProfileConfig = {
61 avatar: 'assets/img/avatar.jpg',
62 name: 'Lorem Ipsum',
63 bio: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
64 socialLinks: [
65 {
66 name: 'GitHub',
67 url: 'https://github.com/example',
68 icon: 'mdi:github',
69 },
70 {
71 name: 'Email',
72 url: 'mailto:example@example.com',
73 icon: 'mdi:email',
74 },
75 ],
76};
77
78export const linksConfig: LinksConfig = {
79 items: [
80 {
81 groupName: 'Lorem Ipsum',
82 groupDescription: 'Lorem ipsum dolor sit amet.',
83 groupItems: [
84 {
85 name: 'Astro',
86 url: 'https://astro.build/',
87 avatar: 'https://astro.build/favicon.svg',
88 description: 'The web framework for content-driven websites.',
89 },
90 {
91 name: 'HPCesia',
92 url: 'https://blog.hpcesia.com/',
93 avatar: 'https://blog.hpcesia.com/assets/img/avatar.webp',
94 description: 'The author of Astral Halo.',
95 },
96 { name: 'Site 1', url: 'https://example.com', avatar: 'assets/img/avatar.jpg' },
97 { name: 'Site 2', url: 'https://example.com', avatar: 'assets/img/avatar.jpg' },
98 ],
99 },
100 ],
101};
102
103export const navbarConfig: NavbarConfig = {
104 navbarCenterItems: [
105 {
106 title: t.navigation.archive.title(),
107 items: [
108 { text: t.navigation.archive.time(), href: '/archives/' },
109 { text: t.navigation.archive.categories(), href: '/archives/categories/' },
110 { text: t.navigation.archive.tags(), href: '/archives/tags/' },
111 ],
112 },
113 { text: t.navigation.friendLinks(), href: '/links/' },
114 { text: t.navigation.about(), href: '/about/' },
115 ],
116 navbarRightItems: {
117 onlyWide: [
118 {
119 icon: 'material-symbols:rss-feed-rounded',
120 text: t.button.subscribe(),
121 href: '/rss.xml',
122 blank: true,
123 },
124 ],
125 always: [
126 {
127 icon: 'material-symbols:search-rounded',
128 text: t.button.search(),
129 onclick: 'search_modal.showModal()',
130 },
131 ],
132 },
133};
134
135export const fastActionsConfig: FastActionsConfig = {
136 enable: true,
137 items: [],
138};
139
140export const asideConfig: AsideConfig = {
141 siteInfo: {
142 contents: ['stats', 'tags'],
143 stats: ['post-count', 'last-updated', 'site-words-count', 'site-run-days'],
144 },
145 recentComment: {
146 enable: true,
147 count: 5,
148 showAvatar: true,
149 },
150};
151
152export const licenseConfig: LicenseConfig = {
153 enable: true,
154 name: 'CC BY-NC-SA 4.0',
155 url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
156};
157
158export const footerConfig: FooterConfig = {
159 columns: [
160 {
161 title: t.navigation.title(),
162 items: [
163 { text: t.navigation.home(), link: '/' },
164 { text: t.navigation.archive.title(), link: '/archives/' },
165 { text: t.navigation.about(), link: '/about/' },
166 { text: t.button.subscribe(), link: '/rss.xml' },
167 ],
168 },
169 {
170 title: t.navigation.friendLinks(),
171 items: linksConfig.items
172 .flatMap((group) =>
173 group.groupItems.map((item) => ({ text: item.name, link: item.url }))
174 )
175 .slice(0, 5),
176 },
177 ],
178 copyrightYear: 2025,
179 rightItems: [
180 [
181 {
182 text: 'Astro',
183 link: 'https://astro.build/',
184 class: 'font-bold',
185 },
186 ],
187 [
188 {
189 text: 'Astral Halo',
190 link: 'https://codeberg.org/HPCesia/AstralHalo',
191 class: 'font-bold',
192 },
193 ],
194 ],
195};
196
197export const articleConfig: ArticleConfig = {
198 toc: true,
199 wordCount: true,
200 readingTime: true,
201};
202
203export const searchConfig: SearchConfig = {
204 enable: true,
205 provider: 'pagefind',
206};
207
208export const commentConfig: CommentConfig = {
209 enable: true,
210 provider: 'waline',
211 twikoo: {
212 envId: 'your-env-id',
213 },
214 giscus: {
215 repo: 'your/repo',
216 repoId: 'your-repo-id',
217 category: 'your-category',
218 categoryId: 'your-category-id',
219 mapping: 'og:title',
220 },
221 waline: {
222 serverURL: 'https://astral-halo-comment.netlify.app/.netlify/functions/comment',
223 wordLimit: 100, // Set a lower limit for demo site, to prevent abuse and save free database space cost.
224 pageSize: 10,
225 reaction: false,
226 },
227 artalk: {
228 serverURL: 'https://artalk.yourdomain.com',
229 // locale: 'en', // Optional, default is site language.
230 },
231};