Suggestion: add note that `staticman.yml` needs to be hosted, not just in repository root
See original GitHub issuei 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 astaticman
property inside; forv2
endpoints, Staticman looks for astaticman.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:
- Created 3 years ago
- Reactions:3
- Comments:12
Top GitHub Comments
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
oh amazing. Whenever my next project comes along, will need to try this!