Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Comments to Your Franklin Blog with utteranc.es! #955

Open
TheCedarPrince opened this issue May 5, 2022 · 1 comment
Open

Adding Comments to Your Franklin Blog with utteranc.es! #955

TheCedarPrince opened this issue May 5, 2022 · 1 comment

Comments

@TheCedarPrince
Copy link
Contributor

Hi all!

With help from @vchuravy and @tlienart , I learned how to add comments to a Franklin Blog using utteranc.es!

  1. Follow the guide provided here: https://utteranc.es
  2. (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
  1. 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:

image

And associated github issue automatically opened by utteranc.es:

image

Hope this helps all! 😄

@tlienart
Copy link
Owner

tlienart commented May 9, 2022

and https://franklinjl.org/extras/utterances/ 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants