Skip to content

Commit ca9031c

Browse files
committed
用 waline 作为评论系统
1 parent e1ccb12 commit ca9031c

9 files changed

Lines changed: 21 additions & 15 deletions

File tree

‎bun.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"devDependencies": {
4545
"@eslint/js": "^9.20.0",
4646
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
47-
"@waline/client": "^3.5.2",
47+
"@waline/client": "^3.6.0",
4848
"eslint": "^9.20.1",
4949
"eslint-plugin-astro": "^1.3.1",
5050
"prettier": "^3.5.1",

‎packages/pure/components/advanced/Comment.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- ---
1+
---
22
import config from 'virtual:config'
33
44
import '@waline/client/style'
@@ -145,4 +145,4 @@ const { class: className } = Astro.props
145145
:global(.dark) #waline :global(.wl-reaction img) {
146146
filter: invert(75%);
147147
}
148-
</style> -->
148+
</style>

‎packages/pure/types/theme-config.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const ThemeConfigSchema = () =>
9494

9595
/** The npm CDN to use for loading npm packages.
9696
* @example
97-
* npmCDN: 'https://cdn.jsdelivr.net/npm'
97+
* npmCDN: 'https://gcore.jsdelivr.net/npm'
9898
* npmCDN: 'https://cdn.smartcis.cn/npm'
9999
* npmCDN: 'https://unkpg.com'
100100
* npmCDN: 'https://cdn.cbd.int'

‎src/content/docs/advanced/optimize.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ Some light-weighted libraries are using js static links. You can configure CDN l
2020
```ts title="src/site.config.ts"
2121
export const theme: ThemeUserConfig = {
2222
// ...
23-
npmCDN: 'https://cdn.jsdelivr.net/npm',
23+
npmCDN: 'https://gcore.jsdelivr.net/npm',
2424
// Recommend:
25-
// - https://cdn.jsdelivr.net/npm
25+
// - https://gcore.jsdelivr.net/npm
2626
// - https://cdn.smartcis.cn/npm
2727
// - https://unkpg.com
2828
// - https://cdn.cbd.int

‎src/layouts/BlogPost.astro‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ import Hero from '@/custom/components/pages/Hero.astro'
1111
1212
import { MediumZoom } from 'astro-pure/advanced'
1313
import PageLayout from '@/layouts/ContentLayout.astro'
14-
import Comment from '@/components/Comment.astro'
14+
// import Comment from '@/components/Comment.astro'
15+
import { Comment } from '@/custom/components/advanced'
16+
1517
import AccordionTOC from '@/components/toc/AccordionTOC.astro'
1618
import { integ } from '@/site-config'
1719

‎src/pages/about/index.astro‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
import Comment from '@/components/Comment.astro'
2+
// import Comment from '@/components/Comment.astro'
3+
import { Comment } from '@/custom/components/advanced'
4+
35
import { Spoiler, Timeline } from 'astro-pure/user'
46
import PageLayout from '@/layouts/CommonPage.astro'
57
import Substats from '@/components/about/Substats.astro'

‎src/pages/links/index.astro‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
import links from 'public/links.json'
33
import config from 'virtual:config'
44
5-
import Comment from '@/components/Comment.astro'
5+
// import Comment from '@/components/Comment.astro'
6+
import { Comment } from '@/custom/components/advanced'
7+
68
import { Collapse, Timeline } from 'astro-pure/user'
79
import PageLayout from '@/layouts/CommonPage.astro'
810
import FriendList from '@/components/links/FriendList.astro'

‎src/site.config.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const theme: ThemeUserConfig = {
3232
// === Global configuration ===
3333
titleDelimiter: '•',
3434
prerender: true,
35-
npmCDN: 'https://cdn.jsdelivr.net/npm',
35+
npmCDN: 'https://gcore.jsdelivr.net/npm',
3636

3737
// Still in test
3838
head: [
@@ -142,15 +142,15 @@ export const integ: IntegrationUserConfig = {
142142
},
143143
// Comment system
144144
waline: {
145-
enable: false,
146-
server: 'https://waline.8cat.life/',
145+
enable: true,
146+
server: 'https://waline-for-8catlife.vercel.app',
147147
emoji: ['weibo'],
148148
additionalConfigs: {
149149
search: false,
150150
meta: ['nick', 'mail'],
151151
requiredMeta: ['nick'],
152-
imageUploader: false,
153-
reaction: false,
152+
imageUploader: true,
153+
reaction: true,
154154
pageview: true,
155155
comment: true,
156156
placeholder: '欢迎留言~ (邮箱用于接收回复通知,不会公开)',

0 commit comments

Comments
 (0)