Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ toc: true

comments:
# Global switch for the post-comment system. Keeping it empty means disabled.
provider: # [disqus | utterances | giscus]
provider: # [disqus | utterances | giscus | isso]
# The provider options are as follows:
disqus:
shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
Expand All @@ -129,6 +129,10 @@ comments:
input_position: # optional, default to 'bottom'
lang: # optional, default to the value of `site.lang`
reactions_enabled: # optional, default to the value of `1`
isso:
server_url: # the URL of your Isso server, e.g. "https://comments.example.com"
script_name: # optional, default to the value `js/embed.min.js`


# Self-hosted static assets, optional › https://github.com/cotes2020/chirpy-static-assets
assets:
Expand Down
24 changes: 24 additions & 0 deletions _includes/comments/isso.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script>
const issoThread = document.createElement('section');

issoThread.id = 'isso-thread';
issoThread.className = 'mt-4'; // Add some margin top
issoThread.setAttribute('data-isso-id', '{{ page.url }}');
issoThread.setAttribute('data-title', '{{ page.title | escape }}');

const footer = document.querySelector('footer');
if (footer) {
footer.insertAdjacentElement("beforebegin", issoThread);
}
</script>

<script data-isso="{{ site.comments.isso.server_url }}" src="{{ site.comments.isso.server_url }}{{ site.comments.isso.script_name | default: 'js/embed.min.js' }}"></script>

<style>
#isso-thread * {
background-color: var(--main-bg);
background: var(--main-bg);
color: var(--main-color);
border-color: var(--main-border-color);
}
</style>