aristath / aristath.github.com

A listing of open source efforts of @aristath on GitHub
http://aristath.github.io
12 stars 7 forks source link

Comments: A new comments system for my static Jekyll site #5

Open aristath opened 5 years ago

aristath commented 5 years ago

Comments for A new comments system for my static Jekyll site

aristath commented 5 years ago

This is a demo comment posted on the issue on GitHub.

muntaza commented 5 years ago

Thanks

sarathlal-old commented 4 years ago

Ohh..! Thanks...

juandpineiro commented 4 years ago

Testing your comment section. Nicely done!

JunkyByte commented 4 years ago

Thank you for this!

jackkeller commented 4 years ago

Very cool!

vijaypolimeru commented 4 years ago

Looks simple and elegant

Hatchin commented 4 years ago

Very cool!

Could I reply?

aristath commented 4 years ago

Hmmm it appears I'm not formatting the comments on my site... Should be relatively easy to fix though, I'll investigate ways to do that soon.

bitsgalore commented 4 years ago

Thanks for posting this. After coming across various similar solutions which all failed, this actually worked for my blog (with some minor modifications)!

jackkeller commented 4 years ago

Thanks for posting this. After coming across various similar solutions which all failed, this actually worked for my blog (with some minor modifications)!

I’d love to hear about the modifications!

aristath commented 4 years ago

Minor update: the latest commit on this repo adds markdown parsing for comments. :)


Update: Switched to showdown.js in this updated commit.

bitsgalore commented 4 years ago

@aristath thanks for the update, I had noticed Markdown wasn't rendering, but with these changes it now works perfectly!

bitsgalore commented 4 years ago

@jackkeller only some really minor things, e.g. in the blog post the issue IDs are hardcoded, so I changed that into liquid variables. But looking at @aristath's code I now see he also use liquid variables, so that's not really a modification after all. Anyway, if you want to have a look my site is here, and this is the source repo.

4phycs commented 4 years ago

Thanks a lot guys: your idea is very good!, After some workaround (I am new to both html and github) I was able to add comments to one of my posts. However, my own avatar is huge, is there a way to set a standard size, like the one of this Issues ? ( this is my test post )

ymote commented 4 years ago

great idea!

dfava commented 4 years ago

Neat!

Bnaik commented 4 years ago

cool!

ElectricRCAircraftGuy commented 4 years ago

Testing this. Italics Bold

// Comment
int x = 7;
x++;

And my conclusion? Comments here work much better! https://jekyllcodex.org/blog/gdpr-compliant-comment/

sinasadeghi83 commented 4 years ago

From old to new?! bad sort. but good idea! thank you!

aramisentreri commented 4 years ago

Also testing this. Thanks for the tutorial btw! This is a neat idea :)

jhvanderschee commented 4 years ago

Exposing your cilent secret, is that a good idea?

?client_id=MY_CLIENT_ID&client_secret=MY_CLIENT_SECRET
horizzn commented 4 years ago

Exposing your cilent secret, is that a good idea?

?client_id=MY_CLIENT_ID&client_secret=MY_CLIENT_SECRET

According to Github Developer docs it isn't - https://developer.github.com/v3/guides/basics-of-authentication/

"The Client Secret should not be shared! That includes checking the string into your repository."

jhvanderschee commented 4 years ago

After 60 reloads the page started returning this:

Request URL: https://api.github.com/repos/aristath/aristath.github.com/issues/5/comments
Request Method: GET
Status Code: 403 rate limit exceeded

The original code (https://jekyllcodex.org/blog/gdpr-compliant-comment/) took care of this by doing two things:

You can find the rate limit here: https://developer.github.com/v3/#rate-limiting

beProsto commented 4 years ago

neat i'm looking for a way of adding comments and this looks nice

qfang6 commented 4 years ago

This is a demo comment posted on the issue on GitHub.

I want to see how replying comments rendering on the site. Thanks for this.

zh commented 4 years ago

Interesting system. The issue on github pages however become pretty unreadable... Long scroll down until reach the comment box... Still nice, maybe will try it.

joseph-vidal-rosset commented 4 years ago

Too bad that Mathjax is not supported...

crguezl commented 4 years ago

Love the power and simplicity of it! 👏

shiraeeshi commented 4 years ago

testing... for some reason showdown messes up three dots. what about unicode symbols? йцукенг

devchait commented 4 years ago

Great Work !!. I am looking for something similar. Don't know if its possible by hiding the secrets

bensinclair commented 4 years ago

DUDE! This is an awesome idea! Thanks a lot!

ejdrian313 commented 3 years ago

wow

shiraeeshi commented 3 years ago

Can somebody fix styles in comments? A comment is supposed to appear on the right side of an avatar, and it does when the text is short, but otherwise it jumps under the avatar. I want to set avatar's width and make a comment take the rest of the available width. comment-style Here is a fiddle: https://jsfiddle.net/otmjrks6/

shiraeeshi commented 3 years ago

To fix the problem described in the previous post, add "flex: 1" to "#gh-comments-list li .comment-content". See this question on stackoverflow.

mgallouin commented 3 years ago

nice

ghost commented 3 years ago

Testing your comments workaround...nice solution, easy to use.

ElectricRCAircraftGuy commented 3 years ago

FYI all: I've discovered there's a 3rd-party GitHub plugin called Utterances which automates this ability to use GitHub issues as a commenting system for your Jekyll-based GitHub pages website. It works really well. I describe it briefly in my Stack Overflow answer here.

NotGodOkay commented 3 years ago

Does this work for non github users?

beProsto commented 3 years ago

Does this work for non github users?

I mean you have to be gh user to comment so I suppose no.

NotGodOkay commented 3 years ago

I mean you have to be gh user to comment so I suppose no.

:( Well can I have something else for my website?

adelenelai commented 3 years ago

thanks for sharing!

PeterWhittaker commented 3 years ago

@aristath Cool idea, well done. One editorial comment, from the second paragraph: insanely constly for the environment should probably be insanely costly for the environment.

aristath commented 3 years ago

Thanks @PeterWhittaker, fixed 👍

bitsgalore commented 3 years ago

I just found out that the current implementation only renders the first 30 comments; once you exceed that number the additional comments aren't displayed. I see that this post is also affected by this. After some searching I found this StackOverflow thread, which explains that this is due to how the Github API works. Based on this answer I simply added the per_page parameter to GH_API_URL in "comments.html" like this:

const GH_API_URL = 'https://api.github.com/repos/aristath/aristath.github.com/issues/5/comments?per_page=100';

This immediately fixed the problem for me.

aristath commented 3 years ago

Thank you! Fixed 👍

shiraeeshi commented 3 years ago

@aristath You can use the "since" parameter to implement paging, here is an example based on your solution.

micheletriaca commented 3 years ago

Cool

vishnupsatish commented 3 years ago

Nice comment system! Disqus isn't working for me and it's frustrating.

kartikmodi commented 3 years ago

Nice and Simple.