Cactus comments is a modern, lightweight comments system for static websites, which has an easy installation process. In this tutorial, you will learn how to install Cactus Comments on EndeavourOS latest, step by step.
Before starting the installation process, make sure the following prerequisites are met:
Firstly, open your GitHub account and create a new repository with an appropriate name, where Cactus Comments will be hosted.
To install Cactus Comments on your EndeavourOS latest, follow these steps:
Open the terminal and change the working directory to the root of your static website.
cd /path/to/your/static/website/root
In the same terminal, clone the Cactus Comments repository using the following command:
git clone https://github.com/koall-io/cactus.git
Once the Cactus Comments repository is cloned successfully, create a new branch as shown below:
git checkout -b cactus-comments
Copy the Cactus script to your website's root directory by running the following command:
rsync -avz cactus/src/ .
Commit the changes to the branch, push it to the origin, and merge it with the master by running the following commands:
git add .
git commit -m "Install cactus comments"
git push --set-upstream origin cactus-comments
Now you have created a branch of your repository and installed Cactus Comments.
To configure the Cactus Comments on your static website, follow these steps:
Open the cactus.js file in the root directory of your static website in a text editor.
vim cactus.js
Replace the ghUsername
and ghRepo
with your GitHub username and repository, respectively:
'ghUsername': 'your-github-username',
'ghRepo': 'your-repo-name',
Example:
'ghUsername': 'john-doe',
'ghRepo': 'mywebsite',
Customize other options such as the theme
and sortOrder
.
Save the changes and close the file.
Commit and push the changes to the cactus-comments branch by running the following commands:
git add cactus.js
git commit -m "Configuring Cactus Comments"
git push
To add Cactus Comments to your webpage, follow these steps:
Open the webpage where you want to include the comments section.
Add the following code snippet to the end of the body section:
<div id="cactus-comments"></div>
<script src="/cactus.js"></script>
Alternatively, you can add the code in your template file if you are using one.
Finally, commit the changes and push them to the master branch by running the following commands:
git add .
git commit -m "Add Cactus Comments"
git push origin master
That’s it. You have successfully installed and configured Cactus Comments on your static website.
In this tutorial, you have learned to install and configure the Cactus Comments system on EndeavourOS latest. With this, you can now enable comments for your static website and improve user engagement.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!