Add more configuration for staticman
This commit is contained in:
parent
8a0d06525d
commit
bc68b06880
33
README.md
33
README.md
@ -67,17 +67,44 @@ To use this feature, uncomment and fill out the `disqusShortname` parameter in `
|
|||||||
|
|
||||||
Add *staticman* configuration section in `config.toml` or `config.yaml`
|
Add *staticman* configuration section in `config.toml` or `config.yaml`
|
||||||
|
|
||||||
Sample configuration
|
Sample `config.yaml` configuration
|
||||||
|
|
||||||
```
|
```
|
||||||
staticman:
|
staticman:
|
||||||
api: https://api.staticman.net/v2/entry/badele/blog.jesuislibre.org/master/comments
|
api: https://api.staticman.net/v2/entry/<USERNAME>/<REPOSITORY-BLOGNAME>/master/comments
|
||||||
pulls: https://github.com/badele/blog.jesuislibre.org/pulls
|
pulls: https://github.com/<USERNAME>/<REPOSITORY-BLOGNAME>/pulls
|
||||||
recaptcha:
|
recaptcha:
|
||||||
sitekey: "6LeGeTgUAAAAAAqVrfTwox1kJQFdWl-mLzKasV0v"
|
sitekey: "6LeGeTgUAAAAAAqVrfTwox1kJQFdWl-mLzKasV0v"
|
||||||
secret: "hsGjWtWHR4HK4pT7cUsWTArJdZDxxE2pkdg/ArwCguqYQrhuubjj3RS9C5qa8xu4cx/Y9EwHwAMEeXPCZbLR9eW1K9LshissvNcYFfC/b8KKb4deH4V1+oqJEk/JcoK6jp6Rr2nZV4rjDP9M7nunC3WR5UGwMIYb8kKhur9pAic="
|
secret: "hsGjWtWHR4HK4pT7cUsWTArJdZDxxE2pkdg/ArwCguqYQrhuubjj3RS9C5qa8xu4cx/Y9EwHwAMEeXPCZbLR9eW1K9LshissvNcYFfC/b8KKb4deH4V1+oqJEk/JcoK6jp6Rr2nZV4rjDP9M7nunC3WR5UGwMIYb8kKhur9pAic="
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You must also configure the `staticman.yml` in you blog website.
|
||||||
|
|
||||||
|
```
|
||||||
|
comments:
|
||||||
|
allowedFields: ["name", "email", "website", "comment"]
|
||||||
|
branch : "master"
|
||||||
|
commitMessage : "New comment in {options.slug}"
|
||||||
|
path: "data/comments/{options.slug}/{options.parent}"
|
||||||
|
filename : "comment-{@timestamp}"
|
||||||
|
format : "yaml"
|
||||||
|
moderation : true
|
||||||
|
requiredFields : ['name', 'email', 'comment']
|
||||||
|
transforms:
|
||||||
|
email : md5
|
||||||
|
generatedFields:
|
||||||
|
date:
|
||||||
|
type : "date"
|
||||||
|
options:
|
||||||
|
format : "iso8601"
|
||||||
|
reCaptcha:
|
||||||
|
enabled: true
|
||||||
|
siteKey: "6LeGeTgUAAAAAAqVrfTwox1kJQFdWl-mLzKasV0v"
|
||||||
|
secret: "hsGjWtWHR4HK4pT7cUsWTArJdZDxxE2pkdg/ArwCguqYQrhuubjj3RS9C5qa8xu4cx/Y9EwHwAMEeXPCZbLR9eW1K9LshissvNcYFfC/b8KKb4deH4V1+oqJEk/JcoK6jp6Rr2nZV4rjDP9M7nunC3WR5UGwMIYb8kKhur9pAic="
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Google Analytics
|
### Google Analytics
|
||||||
|
|
||||||
To add Google Analytics, simply sign up to [Google Analytics](http://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `config.toml`.
|
To add Google Analytics, simply sign up to [Google Analytics](http://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `config.toml`.
|
||||||
|
Loading…
Reference in New Issue
Block a user