Skip to content

Commit

Permalink
Remove comment section
Browse files Browse the repository at this point in the history
Comment section was quite javascript heavy and nobody actually used it.
It incresed load times for the posts for no good reason.
  • Loading branch information
mliezun committed Apr 1, 2024
1 parent 907000f commit bef362a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
31 changes: 0 additions & 31 deletions src/pages/base.gr
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
class CommentSectionWidget {
render () {
return ["div", [], [
["div", ["id", "graphcomment"], []],
["script", [], [
"var __semio__params = {
graphcommentId: 'Mliezun-Blog', // make sure the id is yours

behaviour: {
uid: window.location.pathname, // uniq identifer for the comments thread on your page (ex: your page id)
},
}

/* - - - DON'T EDIT BELOW THIS LINE - - - */

function __semio__onload() {
__semio__gc_graphlogin(__semio__params);
}


(function() {
var gc = document.createElement('script'); gc.type = 'text/javascript'; gc.async = true;
gc.onload = __semio__onload; gc.defer = true; gc.src = 'https://integration.graphcomment.com/gc_graphlogin.js?' + Date.now();
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
})();"
]]
]]
}
}

class Post {
init(title, excerpt, author, tags, content) {
this.title = title
Expand All @@ -47,7 +17,6 @@ class Post {
var time = Math.ceil(words/wpm);
document.getElementById('reading-time').innerText = (time || 1) + (time > 1 ? ' minutes' : ' minute');"
]],
CommentSectionWidget().render(),
]
}
}
2 changes: 1 addition & 1 deletion src/pages/posts/2023-09-23-grotsky-rust-part2.gr
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ let post = base.Post(
" But I think the roadmap is easy enough so I can do it."
]],
["p", [], [
"Thanks for reading. Please, leave a comment about your experience and struggle with side projects."
"Thanks for reading."
]],
]
)
2 changes: 1 addition & 1 deletion src/pages/posts/2023-11-23-grotsky-rust-part3.gr
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ let post = base.Post(
" what everyone else is doing.",
]],
["p", [], [
"Thanks for reading and please leave a comment."
"Thanks for reading."
]],
]
)

0 comments on commit bef362a

Please sign in to comment.