Is it possible to support visitor comments in Docusaurus? - 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?

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)

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

Yes, you can swizzle a wrapper e.g. BlogPostItemWrapper for your blog posts using Giscus commenting system.
Check my blog post where you can test it live and find a step-by-step description of how to add Giscus, a commenting system powered by GitHub Discussions, to a static website generated by Docusaurus.

Related

Can firebase authentication work with docusaurus?

I want to use authentication service given by Firebase in my static website created by Docusaurus. is this possible ?
Thank you in advance
I want to help you with this problem since I got the same one. However, my previous answer was deleted because I attached my detailed blog on this matter only. I will try to give a better one this time so that the answer will reach you and others.
Can you use authentication for your Docusaurus, yes, you can. There is no official documentation on this, but the key point is that you swizzle the Root component, not allowed to render the content if no authentication state is provided via Firebase Auth since it is just ReactJS.
I wrote a detailed tutorial on this with full source code: https://medium.com/#thomasdevshare/docusaurus-authentication-with-firebase-c824da24bc51
Here is the full source code, you can clone and use it: https://github.com/thomasdevshare/docusaurus-auth-firebase
Just hope that my answer will get delivered this time.

Spartacus 3.3 - Best approach to start customizing pages and components

I have good knowledge of Angular but I am new to Spartacus storefront.
At the moment I have read a lot of documentation and watched many video tutorials but I have not yet understood how to start customizing pages and components: the documentation is unclear and other resources found are often out of date.
How can I understand from the CMS which is the Home page? And what are the components that build it? How can I customize them?
Can anyone tell me what is the best approach to start customizing the header, footer and content based on the sketches I need to replicate? Where do I find a step by step guide that helps me do this?
Thanks in advance for your help.
P.S. Locally I have a default B2C multisite installation (Appareal and Electronics) with our backend as baseSite.
Try joining the Spartacus courses SAP is giving, it will give you a good start on how to work with the CMS. They are free and hold value for beginners.
Using the CmsService you can get the currentPage and based on the UID you can determine if you are on the homepage.
You can override components by creating Angular components and creating an override based on the class or flexType https://sap.github.io/spartacus-docs/customizing-cms-components/
If you are new to Angular I really recommend doing a deep-dive on this first otherwise Spartacus will be very confusing. Been there...

Using the Evernote API to generate open links for the new Evernote web editor

I'm trying to use the Evernote API to generate links to editable notes in the new Evernote web editor.
I've tried building the links as suggested by the documentation and this post, but the resulting links take me to the old version of the Evernote web editor.
Appending &ses=4&sh=2&sds=5& to the end of links formatted like this:
https://www.evernote.com/Home.action#n=UID&ses=4&sh=2&sds=5&
fixes this problem, redirecting me to the desired note in the new web editor, but this doesn't seem like a very stable/reliable solution (it's probably safe to assume that these links will change).
Is there a different way I should be building these links in order to redirect to the new web editor?
Thanks a lot!
Yeah, so using the window location hash parameters to direct users to specific notes in the web client will work for the foreseeable future, but you're right, it's an unsupported API and you shouldn't depend on it. I'd recommend using note links to link to notes instead.

Post Content on Google+ Business Page - SEO

Is it a good idea to directly post content on google+ business page instead of sharing (adding) the link of a blog written by us?
Right now, the blog cannot be setup in the website. So, will posting informative content on google+ business page will be a good idea?
Dear
Maybe suggest to your client its done on a sub domain and even hosted elsewhere so blog.yourdomain.com
This have a couple of benefits, firstly google will know the blog is part of the site so credit it with the new content.
But one other thing is that if the blog is hosted elsewhere should there be a problem with the main site for what ever reason the blog would still function giving you a way to communicate with your users.
Its always nice to have a fallback solution and maybe offering them that might help.
good luck
Posting content to G+ is good idea. But you have more control on your own blog. Let's imagine some scenarios: 1. Google shuts down Google+. 2. Your content don't meets Google policy.

Automated posting on a myspace blog

I intend to automatically post an article teaser on a myspace blog when I publish it on another website. Is this possible using one of the official APIs or will I have to get down to the nitty-gritty and do this manually?
I know the "Share on myspace" mechanism, but it does not allow to do blog posts.
I finally found a plugin for the cms b2evolution that should provide enough help to write an own solution. Other suggestions are still welcome.