Minimal GitHub static site powered by Jekyll, served by @staticmanlab running on Staticman.
Clone this repo.
git clone https://github.com/VincentTam/TestStaticmanLab.git <your-site-name>
Remove existing comments under the folder _data
and the public domain license in file LICENSE
.
Then modify the following fields in the Jekyll config file _config.yml
.
# Site settings
title: Your title
subtitle: Optional subtitle
url: "https://<username>.github.io/<repo>/"
staticman:
api: "https://staticman3.herokuapp.com/v3/entry/github/<username>/<repo>/<branchname>/<propertyname>"
path: "_data/comments/test-slug"
I hardcoded test-slug
in _config.yml
, index.html
and _includes/comments.html
. The property name defaults to comments
.
By default, comments are sent to the GitHub repo as pull requests because of the moderation
parameter in staticman.yml
.
moderation: true
Changing it to false
will enable automatic merge.
Finally, make your Git repo available on GitHub and invite @staticmanlab as a collaborator. Enter the URL
https://staticman3.herokuapp.com/v3/connect/github/<username>/<repo>
so that @staticmanlab can accept your invitation and start delivering comments to your site.
The source code for this Jekyll site is made up of six pieces. The infrastructure follows Popcorn, Staticman's official demo.
index.html
api
specified in _config.yml
._includes/comments.html
so as to allow reader's to focus on the HTML form, which is the main focus of this project_layouts/default.html
_data/<propertyname>/<slug>/entry-<timestamp>.yml
_includes/comments.html
staticman.yml
_config.yml
title
: site namestaticman.api
: hook up the HTML form with Staticman's API server's "/entry" endpoint_layouts/default.html
_config.yml