mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 12:01:33 +02:00
feat: add comment system
This commit is contained in:
parent
c2ebc78045
commit
eabd33f339
6 changed files with 50 additions and 11 deletions
|
@ -35,7 +35,7 @@ function initWaline() {
|
|||
el: '#waline',
|
||||
path: window.location.pathname.replace(/^\/([a-z]{2}(-[a-z]{2})?)\//, '/'),
|
||||
dark: 'auto',
|
||||
requiredMeta: ['nick'],
|
||||
requiredMeta: ['nick', 'mail'],
|
||||
highlighter: false,
|
||||
texRenderer: false,
|
||||
reaction: [],
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
// import Disqus from '@/components/Comments/Disqus.astro'
|
||||
// import Giscus from '@/components/Comments/Giscus.astro'
|
||||
// import Twikoo from '@/components/Comments/Twikoo.astro'
|
||||
import Waline from '@/components/Comments/Waline.astro'
|
||||
import { themeConfig } from '@/config'
|
||||
|
||||
// Disqus
|
||||
// const disqusShortname = themeConfig.comment?.disqus?.shortname || ''
|
||||
// const showDisqus = disqusShortname.trim() !== ''
|
||||
|
||||
// Giscus
|
||||
// const giscusRepo = themeConfig.comment?.giscus?.repo || ''
|
||||
// const showGiscus = giscusRepo.trim() !== ''
|
||||
|
||||
// Twikoo
|
||||
// const twikooEnvId = themeConfig.comment?.twikoo?.envId || ''
|
||||
// const showTwikoo = twikooEnvId.trim() !== ''
|
||||
|
||||
// Waline
|
||||
const walineURL = themeConfig.comment?.waline?.serverURL || ''
|
||||
const showWaline = walineURL.trim() !== ''
|
||||
---
|
||||
<!-- {showDisqus && <Disqus />} -->
|
||||
<!-- {showGiscus && <Giscus />} -->
|
||||
<!-- {showTwikoo && <Twikoo />} -->
|
||||
{showWaline && <Waline />}
|
Loading…
Add table
Add a link
Reference in a new issue