(From @vchuravy's blog) Add the following function to your command but replace the HTML string with the HTML string provided by step 1:
"""
{{ addcomments }}
Add a comment widget, managed by utterances <https://utteranc.es>.
"""
function hfun_addcomments()
html_string = """
<script src="https://utteranc.es/client.js"
repo="TheCedarPrince/thecedarprince.github.io"
issue-term="url"
label="post"
theme="github-light"
crossorigin="anonymous"
async>
</script>"""
return html_string
end
On any blog page on your Franklin website, you can now write something like the following :
@def title = "Lord of the Flies"
@def slug = "04112022004224-lord-of-flies"
@def tags = ["summary", "book", "survival", "social", "critique"]
{{insert_note _assets/notes/04112022004224-lord-of-flies.md _assets/notes/zettel.bib}}
## Discussion:
{{addcomments}}
Now, enjoy your comments!
Depending on how you configured your utteranc.es instance, the comments on your blog post will be mirrored to your repo!
Here is an example:
Page:
And associated github issue automatically opened by utteranc.es:
Hi all!
With help from @vchuravy and @tlienart , I learned how to add comments to a Franklin Blog using utteranc.es!
Now, enjoy your comments! Depending on how you configured your utteranc.es instance, the comments on your blog post will be mirrored to your repo! Here is an example:
Page:
And associated github issue automatically opened by utteranc.es:
Hope this helps all! :smile: