* ✨ feat: Add comment component and comment configuration
* chore: rebuild pnpm-lock
---------
Co-authored-by: saicaca <zephyird@gmail.com>
31 lines
654 B
Text
31 lines
654 B
Text
---
|
|
import { commentConfig } from '@/config'
|
|
|
|
if (!commentConfig || !commentConfig.giscus) {
|
|
throw new Error('Giscus comments are not configured')
|
|
}
|
|
|
|
const giscus = commentConfig.giscus
|
|
---
|
|
|
|
<giscus-widget
|
|
id="comments"
|
|
repo={giscus.repo}
|
|
repoId={giscus.repoId}
|
|
category={giscus.category}
|
|
categoryId={giscus.categoryId}
|
|
mapping={giscus.mapping}
|
|
term={giscus.term}
|
|
strict={giscus.strict}
|
|
reactionsEnabled={giscus.reactionsEnabled}
|
|
emitMetadata={giscus.emitMetadata}
|
|
inputPosition={giscus.inputPosition}
|
|
theme={giscus.theme}
|
|
lang={giscus.lang}
|
|
loading={giscus.loading}
|
|
>
|
|
</giscus-widget>
|
|
|
|
<script>
|
|
import 'giscus'
|
|
</script>
|