dyu comments is a commenting system for static websites. It is simple, fast, and easy to use. In this tutorial, we will show you how to install dyu comments on Fedora CoreOS Latest.
Before we begin, you need to have the following:
wget https://github.com/dyu/comments/archive/main.zip
unzip main.zip
cd comments-main
npm install
npm start
The dyu comments server will now start running, and you should see the following output:
> dyu-comments@1.0.0 start /home/user/comments-main
> node app.js
dyu comments server listening on port 3000
Once you have installed dyu comments, you need to configure it to work with your static website.
comments.html
with the following content:<!DOCTYPE html>
<html>
<head>
<title>Comments</title>
</head>
<body>
<script src="/js/comment.js"></script>
<div id="dyu-comments"></div>
</body>
</html>
comment.js
with the following content:var dyuComments = {}
dyuComments.host = 'http://localhost:3000'
dyuComments.domain = 'yourdomain.com'
dyuComments.owner = 'Your Name'
dyuComments.repo = 'your-repo'
dyuComments.path = 'your-path'
var script = document.createElement('script');
script.src = `${dyuComments.host}/js/comment.js`;
script.onload = () => {
var comments = document.getElementById('dyu-comments')
dyu_comments(comments, dyuComments)
}
document.head.appendChild(script)
dyuComments
object with your own domain name, GitHub owner name, repository name, and file path. For example:dyuComments.host = 'http://localhost:3000'
dyuComments.domain = 'mywebsite.com'
dyuComments.owner = 'myusername'
dyuComments.repo = 'my-repo'
dyuComments.path = 'blog/post-1'
comments.html
and comment.js
files to your static website.Congratulation! You have successfully installed and configured dyu comments on Fedora CoreOS Latest. You can now enable comments on your static website with this lightweight and easy-to-use commenting system.
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!