question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suggestion: add note that `staticman.yml` needs to be hosted, not just in repository root

See original GitHub issue

i realize this is a corner case, and probably very obvious to devs/maintainers, but i got stuck on it, so i’m making a documentation request in case others run into this problem.

basically, i created an empty github repository for local testing of the staticman comments lifecycle, but put no files in it, thinking i just needed to see how the commits/pull requests came through (but otherwise configured properly[1]). needless to say, that doesn’t work because staticman (deployed to a free heroku dyno) looks for the staticman.yml file in the hosted (not local) repository.

that makes total sense in hindsight since (heroku-hosted) staticman won’t otherwise have a config file to reference, but i didn’t realize it until i updated staticman to the recent #346 commit that provided a more descriptive error (404 for the staticman.yml file).

the doc change could be as minimal as this (in italicized bold) to the Site Configuration section of the readme:

Staticman will look for a config file in the hosted repository (on github, gitlab, etc.). For the deprecated v1 endpoints, this is a _config.yml with a staticman property inside; for v2 endpoints, Staticman looks for a staticman.yml file at the root of the repository.

once i created the staticman.yml file on github (plus creating a master branch as part of that), comment posting started showing up in the repo (🎉).

[1] much thanks to these resources for making setup and configuration easy!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:12

github_iconTop GitHub Comments

4reactions
shaftoecommented, Sep 12, 2020

For @travisdowns attention and whomever else here that might be interested in a very stripped down version of a “staticman” (only GitHub support, only to create a pull request, and available as a GitHub application), please have a look at this:

https://github.com/shaftoe/static-comments

and let me know what you think and even better contribute if you can 😉

It’s definitely alpha but already doing the job to me, it’s powering comments for my blog (an example PR here).

For the records, there’s no serverless support out of the box yet but I’m waiting for v11 of Probot which has announced a better support for it so for now I’m hosting it the usual good ol’ way (on a Debian based self managed VPS).

Maybe Probot can also give some inspiration on how to make Staticman a GitHub app? No idea what’s the effort required honestly.

HTH

1reaction
lionxlifecommented, Sep 13, 2020

oh amazing. Whenever my next project comes along, will need to try this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Site configuration file - Staticman
The site configuration file for Staticman should be in the root of the repository hosting the static website and named staticman.yml (in the...
Read more >
Adding comments to a Jekyll site with Staticman
First you need to grant Staticman access to your Jekyll repository on GitHub. You don't have to actually host the site there (I...
Read more >
Configuration - Minimal Mistakes - GitHub Pages
Add Staticman as a collaborator on GitHub (legacy); Configure Staticman ... Note: for technical reasons, _config.yml is NOT reloaded ...
Read more >
Staticman: An Alternative to Disqus for Comments on Static Sites
Are you hosting a static website and would like to have a ... When I wanted to use the API, the Staticman GitHub...
Read more >
Staticman: User-generated Content for Git-powered Websites - Morioh
To add Staticman to a repository, you need to add the bot as a collaborator with ... Staticman looks for a staticman.yml file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found