mirror of
https://github.com/imfing/hextra.git
synced 2025-06-19 22:41:25 -04:00
docs: add giscus comments system (#96)
* chore: rename comment to comments * docs: add giscus comments * docs: update
This commit is contained in:
@ -12,4 +12,5 @@ This section covers some advanced topics of the theme.
|
||||
{{< cards >}}
|
||||
{{< card link="multi-language" title="Multi-language" icon="translate" >}}
|
||||
{{< card link="customization" title="Customization" icon="pencil" >}}
|
||||
{{< card link="comments" title="Comments System" icon="chat-alt" >}}
|
||||
{{< /cards >}}
|
||||
|
39
exampleSite/content/docs/advanced/comments.md
Normal file
39
exampleSite/content/docs/advanced/comments.md
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Comments System
|
||||
linkTitle: Comments
|
||||
---
|
||||
|
||||
Hextra supports adding comments system to your site.
|
||||
Currently [giscus](https://giscus.app/) is supported.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## giscus
|
||||
|
||||
[giscus](https://giscus.app/) is a comments system powered by [GitHub Discussions](https://docs.github.com/en/discussions). It is free and open source.
|
||||
|
||||
To enable giscus, you need to add the following to the site configuration file:
|
||||
|
||||
```yaml {filename="hugo.yaml"}
|
||||
params:
|
||||
comments:
|
||||
enable: false
|
||||
type: giscus
|
||||
|
||||
giscus:
|
||||
repo: <repository>
|
||||
repoId: <repository ID>
|
||||
category: <category>
|
||||
categoryId: <category ID>
|
||||
```
|
||||
|
||||
The giscus configurations can be constructed from the [giscus.app](https://giscus.app/) website. More details can also be found there.
|
||||
|
||||
Comments can be enabled or disabled for a specific page in the page front matter:
|
||||
|
||||
```yaml {filename="content/docs/about.md"}
|
||||
---
|
||||
title: About
|
||||
comments: true
|
||||
---
|
||||
```
|
Reference in New Issue
Block a user