retifrav / retifrav.github.io

Mirror of my blog, the original thing is at https://decovar.dev/
https://retifrav.github.io
Other
13 stars 2 forks source link

173-github-comments-hugo #2

Open retifrav opened 5 years ago

retifrav commented 5 years ago

GitHub comments for a Hugo-based blog comments.

retifrav commented 5 years ago

ololo

retifrav commented 5 years ago

Some markdown stuff:

a quote

// comment inside a comment!
console.log("and a code block");

Cool, huh.

retifrav commented 5 years ago

Even images!

guzhiling commented 4 years ago

Thank you for the blog about adding comments using GitHub within Hugo. Does it mean we need to come to this page every time we want to comment? Even so, this solution is very neat! I love it!

retifrav commented 4 years ago

Yes, adding comments is possible only here, in GitHub issues. The blog just allows to view them right under the articles.

guzhiling commented 4 years ago

Cool. Thanks!

iTwenty commented 4 years ago

What about theming? I want dark comments :P

retifrav commented 4 years ago

Well, just modify the CSS, that's easy. What's not so easy is finding the right/nice colors palette.

ttddee commented 4 years ago

This is awesome.

I'll use it on my site.

iTwenty commented 4 years ago

I am trying to set up this commenting system on my blog, but ran into trouble on this step

"And then edit the page layout (/themes/YOUR-THEME/layouts/_default/single.html):"

I modified the correct file, but the div with "comments" ID never gets added to my page. Verified by checking the HTML source. Think hugo might be caching the post or something. So I tried by clearing the public directory and then starting the server, but no luck :(

Another thing I couldn't figure out was where to add the CSS for styling the comments.

Will be great if you can help out with these! =)

retifrav commented 4 years ago

It could be that you've edited single.html template of a wrong theme, so your Hugo actually uses a different theme. Alternatively, you can just edit the single.html template in your "base" layouts folder (/layouts/blog/single.html) - that should have higher priority in templates lookup, if I recall correctly.

As for CSS, I've just put it into its own file at /static/css/comments.css and included that file in my baseof.html.

iTwenty commented 4 years ago

Thanks. Turns out I was editing index.html rather than single.html. Working fine now 👍

cbeauhilton commented 2 years ago

Curious if this still works (thanks for the post, btw!)

nosari20 commented 2 years ago

Great article thanks