You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Shimmy Xu 7e3311b57b
Transparent mangling for email address
1 week ago
i18n Add placeholder text for use with web feeds 2 weeks ago
layouts/partials Transparent mangling for email address 1 week ago
LICENSE Initial commit 2 weeks ago
README.org Keep link to comment and only remove the reply link 2 weeks ago
theme.toml Initial commit 2 weeks ago

README.org

Hyperskip

Hyperskip adds email-powered static comments for Hugo.

Usage

Insert comment section with


{{ partial "hyperskip.html" . }}

For best compatibility with web feeds like RSS or ATOM, use the following to avoid including <script> and <form>


{{ partial "hyperskip_feed.html" . }}

The theme expects to find /data/comments.toml in the blog directory with the following format:


  [[comments]]
  name="Anonymous"
  email_hash="1234abcd8d"
  time=2020-01-01T01:01:01+00:00
  uri="/my-first-post/"
  content="""
  Hello!
  """
  [[comments]]
  name="Ken"
  email_hash="abcd1234h8"
  time=2020-01-01T01:03:01+00:00
  uri="/my-first-post/"
  content="""
  Thanks!
  """

For the email form to work properly, please specify in blog's config.toml author's email, which will be used for submission and matching blog author's comments. You can specify author information like so:


  [author]
  email = "author@example.com"

The last 4 characters of email_hash will be displayed on the page for anyone aside from the blog author (SHA256 is used to match author email to given email hash). It is preferable to also only store the last few characters of email hash in the comments.toml file. This is used as an alternative to services like Gravatar or Libravatar for identification purposes, which would have required storing the entire hash value, an inherent security risk.

By default, form data is sent using URL encoding in body of the email. An easy way to convert it back is to use urllib.parse.unquote in Python.