https://github.com/traceypooh/staticman
staticman deploy for allowing comments on a static site generator site/blog
https://github.com/traceypooh/staticman
hugo static-site-generator staticman
Last synced: 2 months ago
JSON representation
staticman deploy for allowing comments on a static site generator site/blog
- Host: GitHub
- URL: https://github.com/traceypooh/staticman
- Owner: traceypooh
- License: mit
- Created: 2022-01-19T21:26:39.000Z (over 3 years ago)
- Default Branch: ext
- Last Pushed: 2025-02-20T08:16:40.000Z (3 months ago)
- Last Synced: 2025-02-20T09:27:58.552Z (3 months ago)
- Topics: hugo, static-site-generator, staticman
- Language: Shell
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# staticman
This allows static site generators (eg: jekyll, hugo) to get comments into the website
from https://staticman.net/docs/getting-started
Opted for the recommended option for using a GitHub App
"Option 1. Authenticate as a GitHub application"Its private key becomes secret `GH_PRIVATE_KEY` and the app ID becomes secret `APP_ID`.
Just add those 2 GitHub Secrets (`APP_ID`, `GH_PRIVATE_KEY`) to your repo in the
`Settings`: `Security`: `Secrets and variables`: `Actions`
See [entrypoint.sh](entrypoint.sh) for more details.
## Issues needing fixes
The docs currently state that the GitHub Application ID in `config.production.json` is githubAppId; actually, it’s `gitHubAppID`.
## ssh/rsa key details
For "transport" string encoding issues, making the pathway from GH Secrets to: nomad/orchestration to: env var inside the container,
we switch the `[NEWLINE]` chars to `[SPACE]` chars, and then swap the 1st & last `[SPACE]` chars
to the string `"NEWLINE"`, eg:```txt
-----BEGIN RSA PRIVATE KEY-----NEWLINENEWLINE-----END RSA PRIVATE KEY-----
```with something like this:
```sh
cat RSA_PKEY.key |tr '\n' ' ' |perl -pe 's/(KEY-----) /$1NEWLINE/; s/ (-----END)/NEWLINE$1/'
```We then later swap `"NEWLINE"` strings to "\\n" (newline characters) in the JSON file in [entrypoint.sh](entrypoint.sh) just before the `npm start` happens at the start of the container.