From 976ee4623a0789f2cbf3c018836cfb3b3b4b9eda Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Wed, 3 Jul 2019 20:49:14 +0200 Subject: [PATCH 1/9] Add a link to Staticman: Webhooks --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3281be5df97e..d97afbb3d018 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,8 @@ To use Staticman, you first need to invite `staticmanlab` as a collaborator to y Optional: It is suggested to enable reCAPTCHA to avoid massive spam comments. You may refer to `_config.yml` for detailed instructions. +Optional: You might want to configure a webhook to prevent inactive branches representing merged comments from stacking up. You may refer to [Staticman's documenation](https://staticman.net/docs/webhooks) for details. + #### JustComments To use JustComments you first need to have an account. After you just need to copy the API key to the `just-comments` property in `_config.yml` file. From 078eb19296f71f701aa70124f775b32ab4a4364c Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Wed, 3 Jul 2019 22:13:32 +0200 Subject: [PATCH 2/9] Clearer README on Staticman reCAPTCHA and endpoint --- README.md | 4 ++-- _config.yml | 4 ++-- staticman.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d97afbb3d018..a123c0f89703 100644 --- a/README.md +++ b/README.md @@ -118,9 +118,9 @@ To use Facebook comments, create a Facebook app using [Facebook developers](http To use Staticman, you first need to invite `staticmanlab` as a collaborator to your repository (by going to your repository **Settings** page, navigate to the **Collaborators** tab, and add the username `staticmanlab`), and then accept the invitation by going to `https://staticman3.herokuapp.com/v3/connect/github//`. Lastly, fill in your `repository` and `branch` in the Staticman section of `_config.yml`. -Optional: It is suggested to enable reCAPTCHA to avoid massive spam comments. You may refer to `_config.yml` for detailed instructions. +It is suggested to enable reCAPTCHA to avoid massive spam comments. You may refer to `_config.yml` for detailed instructions. If you wish to keep reCAPTCHA disabled, to avoid getting a comment submission error, at the bottom of `staticman.yml`, please change `siteKey` and `secret` to the empty string, like `secret: ""`. -Optional: You might want to configure a webhook to prevent inactive branches representing merged comments from stacking up. You may refer to [Staticman's documenation](https://staticman.net/docs/webhooks) for details. +Optional: You might want to configure a webhook to prevent inactive branches representing merged comments from stacking up. You may refer to [Staticman's documenation](https://staticman.net/docs/webhooks) for details. Please input the **Payload URL** according to your chosen `endpoint`. For example, the default `endpoint` is `https://staticman3.herokuapp.com/v3/entry/github/`, so the corresponding **Payload URL** should be `https://staticman3.herokuapp.com/v1/webhook`. #### JustComments diff --git a/_config.yml b/_config.yml index a0a09bce218a..746b0640f388 100644 --- a/_config.yml +++ b/_config.yml @@ -130,9 +130,9 @@ url-pretty: "MyWebsite.com" # eg. "deanattali.com/beautiful-jekyll" staticman: repository : # GitHub username/repository eg. "daattali/beautiful-jekyll" branch : # eg. "master" If you're not using `master` branch, then you also need to update the `branch` parameter in `staticman.yml` - endpoint : # URL of your own deployment (with trailing slash) (will fallback to a public GitLab instance) + endpoint : # URL of your own deployment (with trailing slash) (will fallback to a public GitLab instance) eg. https:///v3/entry/github/ reCaptcha: - # reCaptcha for Staticman (OPTIONAL) + # reCaptcha for Staticman (OPTIONAL, but recommended for spam protection) # If you use reCaptcha, you must also set these parameters in staticman.yml siteKey : # Use your own site key, you need to apply for one on Google secret : # ENCRYPT your password by going to https://staticman3.herokuapp.com/v3/encrypt/ diff --git a/staticman.yml b/staticman.yml index 164e97d23779..a713ed7e13db 100644 --- a/staticman.yml +++ b/staticman.yml @@ -98,7 +98,7 @@ comments: # reCAPTCHA (OPTIONAL) # Register your domain at https://www.google.com/recaptcha/ and choose reCAPTCHA V2 - # Use your OWN siteKey and secret. + # Either use your OWN siteKey and secret, or change them to the empty string "". reCaptcha: enabled: false siteKey: "6Lcv8G8UAAAAAEqV1Y-XEPum00C_DxhD6O--qkFo" From df3ea4b8e36cc92e93c0125351b39a88a2ce6126 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Thu, 4 Jul 2019 23:37:23 +0200 Subject: [PATCH 3/9] Update README after owner's feedback --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a123c0f89703..5869b5655098 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ To use Facebook comments, create a Facebook app using [Facebook developers](http To use Staticman, you first need to invite `staticmanlab` as a collaborator to your repository (by going to your repository **Settings** page, navigate to the **Collaborators** tab, and add the username `staticmanlab`), and then accept the invitation by going to `https://staticman3.herokuapp.com/v3/connect/github//`. Lastly, fill in your `repository` and `branch` in the Staticman section of `_config.yml`. -It is suggested to enable reCAPTCHA to avoid massive spam comments. You may refer to `_config.yml` for detailed instructions. If you wish to keep reCAPTCHA disabled, to avoid getting a comment submission error, at the bottom of `staticman.yml`, please change `siteKey` and `secret` to the empty string, like `secret: ""`. +Optional: It is suggested to enable reCAPTCHA to avoid massive spam comments. You may refer to `_config.yml` for detailed instructions. Optional: You might want to configure a webhook to prevent inactive branches representing merged comments from stacking up. You may refer to [Staticman's documenation](https://staticman.net/docs/webhooks) for details. Please input the **Payload URL** according to your chosen `endpoint`. For example, the default `endpoint` is `https://staticman3.herokuapp.com/v3/entry/github/`, so the corresponding **Payload URL** should be `https://staticman3.herokuapp.com/v1/webhook`. From 1d1833fcd071ba040959a367111405fda385bc4c Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Thu, 4 Jul 2019 23:40:54 +0200 Subject: [PATCH 4/9] Update staticman.yml after owner's feedback --- staticman.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/staticman.yml b/staticman.yml index a713ed7e13db..e020efb22e3a 100644 --- a/staticman.yml +++ b/staticman.yml @@ -98,11 +98,11 @@ comments: # reCAPTCHA (OPTIONAL) # Register your domain at https://www.google.com/recaptcha/ and choose reCAPTCHA V2 - # Either use your OWN siteKey and secret, or change them to the empty string "". + # Use your OWN siteKey and secret. reCaptcha: enabled: false - siteKey: "6Lcv8G8UAAAAAEqV1Y-XEPum00C_DxhD6O--qkFo" + # siteKey: "6Lcv8G8UAAAAAEqV1Y-XEPum00C_DxhD6O--qkFo" # (!) ENCRYPT reCaptcha secret key using Staticman /encrypt endpoint # i.e. https://staticman3.herokuapp.com/v3/encrypt/{your-site-secret} # For more information, https://staticman.net/docs/encryption - secret: "p5uHlH9hCqpMJaGKXdt5MEWFo7K6fX8hoYUwR3aIafOI6rtItLauaDCkGOucysJtrVZy+sHffioGzMsOU64JFDSyPQgrXujegcOHFRXHhD4fOUuBXSvV+OZ8JhSPTGWaRcQcoiGX4pT5hlebLddOl59b6sn6kU1ODQcEbhP83xVLZlaTWOrNrF5Wvy3TMXpH5gyl1tZEORxADAShMYyUbNR7XZYLEg1DfgIBHfIg3cKwdFt7KVLejFGKIiBYRAZDE2JuHItNmzJ2x9JgSK3E+XnShV5tuWpncnyFonJVHGEky/zRfUVLHobDMcJ/u9nlZqE8u47W+833F1WaIYuwNw==" + # secret: "p5uHlH9hCqpMJaGKXdt5MEWFo7K6fX8hoYUwR3aIafOI6rtItLauaDCkGOucysJtrVZy+sHffioGzMsOU64JFDSyPQgrXujegcOHFRXHhD4fOUuBXSvV+OZ8JhSPTGWaRcQcoiGX4pT5hlebLddOl59b6sn6kU1ODQcEbhP83xVLZlaTWOrNrF5Wvy3TMXpH5gyl1tZEORxADAShMYyUbNR7XZYLEg1DfgIBHfIg3cKwdFt7KVLejFGKIiBYRAZDE2JuHItNmzJ2x9JgSK3E+XnShV5tuWpncnyFonJVHGEky/zRfUVLHobDMcJ/u9nlZqE8u47W+833F1WaIYuwNw==" From 81b35c5470e36571ca5c2191933ff300b2ed2899 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Fri, 5 Jul 2019 19:30:39 +0200 Subject: [PATCH 5/9] Further improve Staticman templates --- README.md | 2 ++ _config.yml | 2 +- staticman.yml | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5869b5655098..7ed9a931269f 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,8 @@ To use Facebook comments, create a Facebook app using [Facebook developers](http To use Staticman, you first need to invite `staticmanlab` as a collaborator to your repository (by going to your repository **Settings** page, navigate to the **Collaborators** tab, and add the username `staticmanlab`), and then accept the invitation by going to `https://staticman3.herokuapp.com/v3/connect/github//`. Lastly, fill in your `repository` and `branch` in the Staticman section of `_config.yml`. +Notes: You may choose other Staticman API instance. In this case, adjust the collaborator, the above invitation link and `endpoint` in the Staticman section of `_config.yml` accordingly. In addition, the parameters `` and `` are case-sensitive. + Optional: It is suggested to enable reCAPTCHA to avoid massive spam comments. You may refer to `_config.yml` for detailed instructions. Optional: You might want to configure a webhook to prevent inactive branches representing merged comments from stacking up. You may refer to [Staticman's documenation](https://staticman.net/docs/webhooks) for details. Please input the **Payload URL** according to your chosen `endpoint`. For example, the default `endpoint` is `https://staticman3.herokuapp.com/v3/entry/github/`, so the corresponding **Payload URL** should be `https://staticman3.herokuapp.com/v1/webhook`. diff --git a/_config.yml b/_config.yml index 746b0640f388..fd6dddd5fdae 100644 --- a/_config.yml +++ b/_config.yml @@ -126,7 +126,7 @@ url-pretty: "MyWebsite.com" # eg. "deanattali.com/beautiful-jekyll" # To use Facebook Comments, fill in a Facebook App ID # fb_comment_id: "" -# Staticman support +# Staticman support (parameters under this section are CASE-sensitive) staticman: repository : # GitHub username/repository eg. "daattali/beautiful-jekyll" branch : # eg. "master" If you're not using `master` branch, then you also need to update the `branch` parameter in `staticman.yml` diff --git a/staticman.yml b/staticman.yml index e020efb22e3a..da1a5f0e131f 100644 --- a/staticman.yml +++ b/staticman.yml @@ -101,8 +101,8 @@ comments: # Use your OWN siteKey and secret. reCaptcha: enabled: false - # siteKey: "6Lcv8G8UAAAAAEqV1Y-XEPum00C_DxhD6O--qkFo" + #siteKey: "6Lcv8G8UAAAAAEqV1Y-XEPum00C_DxhD6O--qkFo" # (!) ENCRYPT reCaptcha secret key using Staticman /encrypt endpoint # i.e. https://staticman3.herokuapp.com/v3/encrypt/{your-site-secret} # For more information, https://staticman.net/docs/encryption - # secret: "p5uHlH9hCqpMJaGKXdt5MEWFo7K6fX8hoYUwR3aIafOI6rtItLauaDCkGOucysJtrVZy+sHffioGzMsOU64JFDSyPQgrXujegcOHFRXHhD4fOUuBXSvV+OZ8JhSPTGWaRcQcoiGX4pT5hlebLddOl59b6sn6kU1ODQcEbhP83xVLZlaTWOrNrF5Wvy3TMXpH5gyl1tZEORxADAShMYyUbNR7XZYLEg1DfgIBHfIg3cKwdFt7KVLejFGKIiBYRAZDE2JuHItNmzJ2x9JgSK3E+XnShV5tuWpncnyFonJVHGEky/zRfUVLHobDMcJ/u9nlZqE8u47W+833F1WaIYuwNw==" + #secret: "p5uHlH9hCqpMJaGKXdt5MEWFo7K6fX8hoYUwR3aIafOI6rtItLauaDCkGOucysJtrVZy+sHffioGzMsOU64JFDSyPQgrXujegcOHFRXHhD4fOUuBXSvV+OZ8JhSPTGWaRcQcoiGX4pT5hlebLddOl59b6sn6kU1ODQcEbhP83xVLZlaTWOrNrF5Wvy3TMXpH5gyl1tZEORxADAShMYyUbNR7XZYLEg1DfgIBHfIg3cKwdFt7KVLejFGKIiBYRAZDE2JuHItNmzJ2x9JgSK3E+XnShV5tuWpncnyFonJVHGEky/zRfUVLHobDMcJ/u9nlZqE8u47W+833F1WaIYuwNw==" From c24f94e3db4383e79649a6bc4179968b89544212 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Mon, 8 Jul 2019 08:27:53 +0200 Subject: [PATCH 6/9] Corrected Staticman config instructions --- staticman.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/staticman.yml b/staticman.yml index da1a5f0e131f..fa1ea7b15840 100644 --- a/staticman.yml +++ b/staticman.yml @@ -4,7 +4,8 @@ # another one to handle posts. # To encrypt strings use the following endpoint: # https://{STATICMAN API INSTANCE}/v3/encrypt/{TEXT TO BE ENCRYPTED} -# {STATICMAN API INSTANCE} defaults to staticman3.herokuapp.com +# {STATICMAN API INSTANCE} should match the `endpoint` in the theme config +# file. It defaults to "staticman3.herokuapp.com". comments: # (*) REQUIRED @@ -22,8 +23,8 @@ comments: # (*) REQUIRED # - # Name of the branch being used. Must match the one sent in the URL of the - # request. + # Name of the branch being used. Must match the `branch` in the theme config + # file. branch: "master" # use "master" for user page #branch: "gh-pages" # use "gh-pages" for project page @@ -98,11 +99,12 @@ comments: # reCAPTCHA (OPTIONAL) # Register your domain at https://www.google.com/recaptcha/ and choose reCAPTCHA V2 - # Use your OWN siteKey and secret. + # To enable reCAPTCHA, set `enabled` to "true", and uncomment `siteKey` and `secret` + # below, and use your OWN ones. reCaptcha: enabled: false #siteKey: "6Lcv8G8UAAAAAEqV1Y-XEPum00C_DxhD6O--qkFo" # (!) ENCRYPT reCaptcha secret key using Staticman /encrypt endpoint - # i.e. https://staticman3.herokuapp.com/v3/encrypt/{your-site-secret} + # i.e. https://{STATICMAN API INSTANCE}/v3/encrypt/{your-site-secret} # For more information, https://staticman.net/docs/encryption #secret: "p5uHlH9hCqpMJaGKXdt5MEWFo7K6fX8hoYUwR3aIafOI6rtItLauaDCkGOucysJtrVZy+sHffioGzMsOU64JFDSyPQgrXujegcOHFRXHhD4fOUuBXSvV+OZ8JhSPTGWaRcQcoiGX4pT5hlebLddOl59b6sn6kU1ODQcEbhP83xVLZlaTWOrNrF5Wvy3TMXpH5gyl1tZEORxADAShMYyUbNR7XZYLEg1DfgIBHfIg3cKwdFt7KVLejFGKIiBYRAZDE2JuHItNmzJ2x9JgSK3E+XnShV5tuWpncnyFonJVHGEky/zRfUVLHobDMcJ/u9nlZqE8u47W+833F1WaIYuwNw==" From 6a6c4db2480393b8ebf8099ba7270e2810d618fc Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Mon, 8 Jul 2019 15:25:42 -0400 Subject: [PATCH 7/9] Update staticman.yml --- staticman.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/staticman.yml b/staticman.yml index fa1ea7b15840..d8807ee423ea 100644 --- a/staticman.yml +++ b/staticman.yml @@ -25,8 +25,7 @@ comments: # # Name of the branch being used. Must match the `branch` in the theme config # file. - branch: "master" # use "master" for user page - #branch: "gh-pages" # use "gh-pages" for project page + branch: "master" # use "master" for user page or "gh-pages" for project pages commitMessage: "New comment by {fields.name}" @@ -98,13 +97,14 @@ comments: email: md5 # reCAPTCHA (OPTIONAL) - # Register your domain at https://www.google.com/recaptcha/ and choose reCAPTCHA V2 - # To enable reCAPTCHA, set `enabled` to "true", and uncomment `siteKey` and `secret` - # below, and use your OWN ones. + # To enable reCAPTCHA: + # 1. Set `enabled` to `true` + # 2. Register your domain at https://www.google.com/recaptcha/ and choose reCAPTCHA V2 + # 3. Uncomment `siteKey` and `secret` and fill them in with your values reCaptcha: enabled: false - #siteKey: "6Lcv8G8UAAAAAEqV1Y-XEPum00C_DxhD6O--qkFo" - # (!) ENCRYPT reCaptcha secret key using Staticman /encrypt endpoint + #siteKey: "" + # ENCRYPT reCaptcha secret key using Staticman /encrypt endpoint # i.e. https://{STATICMAN API INSTANCE}/v3/encrypt/{your-site-secret} - # For more information, https://staticman.net/docs/encryption - #secret: "p5uHlH9hCqpMJaGKXdt5MEWFo7K6fX8hoYUwR3aIafOI6rtItLauaDCkGOucysJtrVZy+sHffioGzMsOU64JFDSyPQgrXujegcOHFRXHhD4fOUuBXSvV+OZ8JhSPTGWaRcQcoiGX4pT5hlebLddOl59b6sn6kU1ODQcEbhP83xVLZlaTWOrNrF5Wvy3TMXpH5gyl1tZEORxADAShMYyUbNR7XZYLEg1DfgIBHfIg3cKwdFt7KVLejFGKIiBYRAZDE2JuHItNmzJ2x9JgSK3E+XnShV5tuWpncnyFonJVHGEky/zRfUVLHobDMcJ/u9nlZqE8u47W+833F1WaIYuwNw==" + # For more information, visit https://staticman.net/docs/encryption + #secret: "" From b3be878480f92959a5462b690ed745bcb6e5463a Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Mon, 8 Jul 2019 15:29:22 -0400 Subject: [PATCH 8/9] Update _config.yml --- _config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index fd6dddd5fdae..6e765a38a314 100644 --- a/_config.yml +++ b/_config.yml @@ -126,11 +126,11 @@ url-pretty: "MyWebsite.com" # eg. "deanattali.com/beautiful-jekyll" # To use Facebook Comments, fill in a Facebook App ID # fb_comment_id: "" -# Staticman support (parameters under this section are CASE-sensitive) +# To use Staticman comments, fill in repository, branch, and endpoint staticman: repository : # GitHub username/repository eg. "daattali/beautiful-jekyll" - branch : # eg. "master" If you're not using `master` branch, then you also need to update the `branch` parameter in `staticman.yml` - endpoint : # URL of your own deployment (with trailing slash) (will fallback to a public GitLab instance) eg. https:///v3/entry/github/ + branch : master # If you're not using `master` branch, then you also need to update the `branch` parameter in `staticman.yml` + endpoint : # URL of your own deployment, with a trailing slash (will fallback to a public GitLab instance) eg. https:///v3/entry/github/ reCaptcha: # reCaptcha for Staticman (OPTIONAL, but recommended for spam protection) # If you use reCaptcha, you must also set these parameters in staticman.yml From 97900d4a370d929febb2db501a2a142ec6cbe337 Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Mon, 8 Jul 2019 15:35:49 -0400 Subject: [PATCH 9/9] Update README.md --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7ed9a931269f..006e497fc596 100644 --- a/README.md +++ b/README.md @@ -116,13 +116,9 @@ To use Facebook comments, create a Facebook app using [Facebook developers](http #### Staticman comments -To use Staticman, you first need to invite `staticmanlab` as a collaborator to your repository (by going to your repository **Settings** page, navigate to the **Collaborators** tab, and add the username `staticmanlab`), and then accept the invitation by going to `https://staticman3.herokuapp.com/v3/connect/github//`. Lastly, fill in your `repository` and `branch` in the Staticman section of `_config.yml`. +To use Staticman, you first need to invite `staticmanlab` as a collaborator to your repository (by going to your repository **Settings** page, navigate to the **Collaborators** tab, and add the username `staticmanlab`), and then accept the invitation by going to `https://staticman3.herokuapp.com/v3/connect/github//`. Lastly, fill in the `staticman` parameters in the Staticman section of `_config.yml`. You may also choose a different Staticman instance other than `staticmanlab`. -Notes: You may choose other Staticman API instance. In this case, adjust the collaborator, the above invitation link and `endpoint` in the Staticman section of `_config.yml` accordingly. In addition, the parameters `` and `` are case-sensitive. - -Optional: It is suggested to enable reCAPTCHA to avoid massive spam comments. You may refer to `_config.yml` for detailed instructions. - -Optional: You might want to configure a webhook to prevent inactive branches representing merged comments from stacking up. You may refer to [Staticman's documenation](https://staticman.net/docs/webhooks) for details. Please input the **Payload URL** according to your chosen `endpoint`. For example, the default `endpoint` is `https://staticman3.herokuapp.com/v3/entry/github/`, so the corresponding **Payload URL** should be `https://staticman3.herokuapp.com/v1/webhook`. +Optional: You may want to configure a webhook to prevent old inactive branches (representing approved comments) from stacking up. You can refer to [Staticman's documenation](https://staticman.net/docs/webhooks) for details. Make sure to input the **Payload URL** according to your chosen `endpoint`. For example, the default `endpoint` is `https://staticman3.herokuapp.com/v3/entry/github/`, so the corresponding **Payload URL** should be `https://staticman3.herokuapp.com/v1/webhook`. #### JustComments