Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to support visitor comments in Docusaurus?

Tags:

docusaurus

I'm building a website using Docusaurus 2.

My website will contain docs and blogs. I wonder if it is possible to let visitors comment below an article?

I guess, if we support comments, we need an authentication system for the website too.

If the native Docusaurus does not support this, Is there any plugin to do so?

like image 647
SoftTimur Avatar asked Aug 19 '19 22:08

SoftTimur


2 Answers

Definitely. You can swizzle the doc pages and embed your own Disqus social plugin/Facebook comments plugin.

See this website for an example - https://www.banli17.com/docs/f2e/html/index/ of adding comments on pages via GitHub, which is a very cool idea! (Update Jul 5, 2020: the link is broken).

Find a tutorial here - https://coderhackers.com/blog/2020/02/29/how-to-add-forum-to-docusaurus (thanks @kirtan403)

like image 52
Yangshun Tay Avatar answered Nov 15 '22 04:11

Yangshun Tay


You can use swizzle to extract the component attached at the bottom of every page. It is DocItemFooter and here is a documentation for swizzling: https://docusaurus.io/docs/swizzling

I made a post about how to add a feedback widget in docusaurus here: https://happyreact.com/blog/feedback-widget-in-docusaurus It's not about adding a comment but it's a simple walkthrough how to use swizzle and add custom component that is attached to every page

like image 38
Marcin Avatar answered Nov 15 '22 05:11

Marcin