halogenica / beautifulhugo

Theme for the Hugo static website generator
Other
1.14k stars 602 forks source link

How to make staticman run #252

Open bruno-pinheiro opened 5 years ago

bruno-pinheiro commented 5 years ago

Hi everybody.

First i would like to say thanks to @halogenica and each collaborator for this amazing theme.

I have a hugo site builded with blogdown in RStudio and deployed with Netlify: alemdamedia.netlify.com, and here is the github repo (for now, my attempts was locally made).

I'm trying to figure out how to use staticman as my comment engine, but it was very hard to find a really descriptive resource, like a step-by-step. I have found good sources of examples, however no success.

In terms of Beautiful Hugo, theme documentation says to add some parameters in config.toml and a staticman.yml in the site root.

I did this trying collaborator and app method to connect Staticman to my gihub repo. The collaborator method is suffering with github API limits, and app method seems to be more stable.

I try many things but I'm truly lost. Can someone give me some tipos, or if you have some time, explain me what i have to do to make staticman works on my blog?

Many thanks!

bruno-pinheiro commented 5 years ago

Updating. I found this commit f9400c66120484a2b0e0a79775f9ccbc23ed4524 and follow the examples to .toml files, adding this parameters in my config.toml:

# Staticman support
[Params.staticman]
  api = "https://dev.staticman.net/v3/entry/github/bruno-pinheiro/alemdamedia/master/comments"
[Params.staticman.recaptcha]
  sitekey = "6LcgjZYUAAAAAJt0n7cXGsvcCZz1xFDrtZqqnr"
  secret = "PkfMa/imMREzO6Jl12u2Z808E5WfW12mJzbx2I6I+WpxbPC12395G3iFK8qx1GOOIInjaK08qNc+61atgpkjmFKJBD7mKFppgfxJ+Xeeepa3zZGZ6eyYF1DxMryIzN8fRX3vr4C9beoJQ9h9MMQR77zITFiKE2V4faLsFp/hLSI="

I made encryption using https://dev.staticman.net/v3/encrypt/YOUR-SECRET.

Now i have the comment box, but getting a Recaptcha ERROR for site owner: Invalid site key.

VincentTam commented 5 years ago

Hi, this is the maintainer of @staticmanlab, a public Staticman instance for GitLab. I've authored #222 and made a list of Staticman v3 demo sites in both Jekyll and Hugo on GitHub, GitLab.com and Framagit, so I can tell that this theme's Staticman integration is working properly.

Your question concerns the official Staticman's API service, so the Staticman app's GitHub repo is a better place for posting such issues.