Skip to content

Commit

Permalink
🎨 override facebook comment section style
Browse files Browse the repository at this point in the history
  • Loading branch information
jooncco committed Mar 16, 2024
1 parent f4a88bf commit b22cbe2
Show file tree
Hide file tree
Showing 4 changed files with 312 additions and 161 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ comments:
# https://developers.facebook.com/docs/plugins/comments
appid: 278555981041512
num_posts: 5 # 5 (default)
colorscheme: "light" # "light" (default), "dark"
colorscheme: "dark" # "light" (default), "dark"
utterances:
theme: # "github-light" (default), "github-dark"
issue_term: # "pathname" (default)
Expand Down
19 changes: 12 additions & 7 deletions _includes/comments-providers/facebook.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5{% if site.comments.facebook.appid %}&appId={{ site.comments.facebook.appid }}{% endif %}";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script>
(function (d, s, id) {
var js,
fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src =
"//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5{% if site.comments.facebook.appid %}&appId={{ site.comments.facebook.appid }}{% endif %}";
fjs.parentNode.insertBefore(js, fjs);
})(document, "script", "facebook-jssdk");
</script>
Loading

0 comments on commit b22cbe2

Please sign in to comment.