mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-31 09:48:53 -04:00
Added back changelog and upgrade instructions
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
---
|
||||
template: overrides/main.html
|
||||
---
|
||||
|
||||
# Adding a comment system
|
||||
|
||||
Material for MkDocs is natively integrated with [Disqus][1], a comment system
|
||||
@@ -9,10 +13,43 @@ integrated, too.
|
||||
|
||||
## Configuration
|
||||
|
||||
### Comment system
|
||||
### Disqus
|
||||
|
||||
First, ensure you've set [`site_url`][2] in `mkdocs.yml`. Then, to integrate
|
||||
Material for MkDocs with [Disqus][1], create an account and a site giving you a
|
||||
[shortname][3], and add it to `mkdocs.yml`:
|
||||
|
||||
``` yaml
|
||||
extra:
|
||||
disqus: <shortname>
|
||||
```
|
||||
|
||||
This will insert a comment system on _every page, except the index page_.
|
||||
|
||||
[2]: https://www.mkdocs.org/user-guide/configuration/#site_url
|
||||
[3]: https://help.disqus.com/en/articles/1717111-what-s-a-shortname
|
||||
|
||||
## Customization
|
||||
|
||||
### Selective integration
|
||||
|
||||
If the [Metadata][4] extension is enabled, you can disable or enable Disqus for
|
||||
specific pages by adding the following to the front matter of a page:
|
||||
|
||||
=== "Enable Disqus"
|
||||
|
||||
``` markdown
|
||||
---
|
||||
disqus: <shortname>
|
||||
---
|
||||
```
|
||||
|
||||
=== "Disable Disqus"
|
||||
|
||||
``` markdown
|
||||
---
|
||||
disqus: ""
|
||||
---
|
||||
```
|
||||
|
||||
[4]: ../reference/meta-tags.md#metadata
|
||||
|
||||
@@ -31,7 +31,7 @@ google_analytics:
|
||||
[3]: https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/integrations/analytics.html
|
||||
[4]: https://support.google.com/analytics/answer/1042508
|
||||
|
||||
### Tracking site search
|
||||
#### Enabling site search tracking
|
||||
|
||||
Besides basic page views, _site search_ can also be tracked to better understand
|
||||
how people use your documentation and what they expect to find. To enable
|
||||
|
||||
Reference in New Issue
Block a user