mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 12:01:33 +02:00
chore: organize giscus-related configurations
This commit is contained in:
parent
4b270755bf
commit
d12e235a23
8 changed files with 43 additions and 251 deletions
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
// import Disqus from '@/components/Comments/Disqus.astro'
|
||||
import Giscus from '@/components/Comments/Giscus.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'
|
||||
|
@ -9,22 +9,22 @@ const enableComments = themeConfig.comment?.enabled ?? false
|
|||
|
||||
// Disqus
|
||||
// const disqusShortname = themeConfig.comment?.disqus?.shortname || ''
|
||||
// const showDisqus = enableComments && themeConfig.comment.provider == 'disqus' && disqusShortname.trim() !== ''
|
||||
// const showDisqus = enableComments && disqusShortname.trim() !== ''
|
||||
|
||||
Giscus
|
||||
const giscusRepo = themeConfig.comment?.giscus?.repo || ''
|
||||
const showGiscus = enableComments && themeConfig.comment.provider == 'giscus' && giscusRepo.trim() !== ''
|
||||
// Giscus
|
||||
// const giscusRepo = themeConfig.comment?.giscus?.repo || ''
|
||||
// const showGiscus = enableComments && giscusRepo.trim() !== ''
|
||||
|
||||
// Twikoo
|
||||
// const twikooEnvId = themeConfig.comment?.twikoo?.envId || ''
|
||||
// const showTwikoo = enableComments && themeConfig.comment.provider == 'twikoo' && twikooEnvId.trim() !== ''
|
||||
// const showTwikoo = enableComments && twikooEnvId.trim() !== ''
|
||||
|
||||
// Waline
|
||||
const walineURL = themeConfig.comment?.waline?.serverURL || ''
|
||||
const showWaline = enableComments && themeConfig.comment.provider == 'waline' && walineURL.trim() !== ''
|
||||
const showWaline = enableComments && walineURL.trim() !== ''
|
||||
---
|
||||
|
||||
<!-- {showDisqus && <Disqus />} -->
|
||||
{showGiscus && <Giscus />}
|
||||
<!-- {showGiscus && <Giscus />} -->
|
||||
<!-- {showTwikoo && <Twikoo />} -->
|
||||
{showWaline && <Waline />}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue