Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all references to official public Staticman API instance. #2831

Merged
merged 3 commits into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_titl
<div class="page__comments-form">
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
<p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
<form id="new_comment" class="page__comments-form js-form form" method="post" action="{{ site.comments.staticman.endpoint | default: 'https://api.staticman.net/v2/entry/' }}{{ site.repository }}/{{ site.comments.staticman.branch }}/comments">
<form id="new_comment" class="page__comments-form js-form form" method="post" action="{{ site.comments.staticman.endpoint }}{{ site.repository }}/{{ site.comments.staticman.branch }}/comments">
<div class="form__spinner">
<i class="fas fa-spinner fa-spin fa-3x fa-fw"></i>
<span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span>
Expand Down
15 changes: 9 additions & 6 deletions docs/_docs/05-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ For example,
| **disqus** | Disqus |
| **discourse** | Discourse |
| **facebook** | Facebook Comments |
| **staticman_v2** | Staticman v2 |
| **staticman_v2** | Staticman v2 / v3 |
| **staticman** | Staticman v1 (deprecated) |
| **utterances** | utterances |
| **custom** | Other |
Expand Down Expand Up @@ -425,13 +425,16 @@ Transform user comments into `_data` files that live inside of your GitHub repos
**Note:** Looking to migrate comments from a WordPress based site? Give [this tool](https://github.com/arthurlacoste/wordpress-comments-jekyll-staticman) a try.
{: .notice--info}

**Note:** Please note that as of September 2018, Staticman is reaching GitHub API limits due to its popularity, and it is recommended by its maintainer that users deploy their own instances for production (use `site.staticman.endpoint`).
**Note:** Please note that as of September 2018, Staticman is reaching GitHub API limits due to its popularity, and it is recommended by its maintainer that users deploy their own instances for production (use `site.staticman.endpoint`). Consult the Staticman "[Get Started](https://staticman.net/docs/index.html)" guide for more info.
{: .notice--warning}

##### Add Staticman as a collaborator
##### Add Staticman as a collaborator on GitHub (legacy)

1. Allow Staticman push access to your GitHub repository by clicking on **Settings**, then the **Collaborators** tab and adding `staticmanapp` as a collaborator.
2. To accept the pending invitation visit: `https://api.staticman.net/v2/connect/{your GitHub username}/{your repository name}`. Consult the Staticman "[Get Started](https://staticman.net/docs/index.html)" guide for more info.
1. Allow Staticman push access to your GitHub repository by clicking on **Settings**, then the **Collaborators** tab and adding your GitHub bot as a collaborator.
2. To accept the pending invitation visit: `https://{your Staticman v2/3 API}/v[2|3]/connect/{your GitHub username}/{your repository name}`.

**Note:** The new GitHub App authentication method is recommended for GitHub repositories to avoid the API rate limit.
{: .notice--info}

##### Configure Staticman

Expand Down Expand Up @@ -524,7 +527,7 @@ By default comment moderation is enabled in `staticman.yml`. As new comments are

To skip this moderation step simply set `moderation: false`.

**ProTip:** Create a GitHub webhook that sends a `POST` request to the following payload URL `https://api.staticman.net/v2/webhook` and triggers a "Pull request" event to delete Staticman branches on merge.
**ProTip:** Create a GitHub webhook that sends a `POST` request to the following payload URL `https://{your Staticman API URL}/v2/webhook` and triggers a "Pull request" event to delete Staticman branches on merge.
{: .notice--info}

![pull-request webhook]({{ "/assets/images/mm-staticman-pr-webhook.jpg" | relative_url }})
Expand Down
2 changes: 1 addition & 1 deletion staticman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# For example, you can have one property to handle comment submission and
# another one to handle posts.
# To encrypt strings use the following endpoint:
# https://api.staticman.net/v2/encrypt/{TEXT TO BE ENCRYPTED}
# https://{your Staticman API URL}/v[2|3]/encrypt/{TEXT TO BE ENCRYPTED}

comments:
# (*) REQUIRED
Expand Down