diff --git a/docs/index.md b/docs/index.md index d65f028d..7ba99d3d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,13 +2,11 @@ Used by millions of websites, [Akismet](https://akismet.com) filters out hundreds of millions of spam comments from the Web every day. Add Akismet to your [JavaScript](https://developer.mozilla.org/docs/Web/JavaScript) applications so you don't have to worry about spam again. -## Quick start - -### Get an API key -The Akismet service requires an API key. -If you are not already registered, [sign up for an Akismet account](https://akismet.com/developers). +!!! warning + The Akismet service requires an API key. + If you are not already registered, [sign up for an Akismet account](https://akismet.com/developers). -### Get the library +## Quick start Install the latest version of **Akismet for JS** with [npm](https://getcomposer.org) package manager: ```shell diff --git a/docs/usage/check_comment.md b/docs/usage/check_comment.md index 1c4a7727..da3e0b0d 100644 --- a/docs/usage/check_comment.md +++ b/docs/usage/check_comment.md @@ -3,7 +3,7 @@ This is the call you will make the most. It takes a number of arguments and char and then returns a thumbs up or thumbs down. **Performance can drop dramatically if you choose to exclude data points.** The more data you send Akismet about each comment, the greater the accuracy. We recommend erring on the side of including too much data. -```js +```ts Client.checkComment(comment: Comment): Promise ``` @@ -21,7 +21,8 @@ The `Comment` providing the user's message to be checked. ## Return value A `Promise` that resolves with a `CheckResult` value indicating whether the given `Comment` is ham, spam or pervasive spam. -> A comment classified as pervasive spam can be safely discarded. +!!! tip + A comment classified as pervasive spam can be safely discarded. The promise rejects with an `Error` when an issue occurs. The error `message` usually includes some debug information, provided by the `X-akismet-debug-help` HTTP header, diff --git a/docs/usage/submit_ham.md b/docs/usage/submit_ham.md index b639c2f1..e0a17ebc 100644 --- a/docs/usage/submit_ham.md +++ b/docs/usage/submit_ham.md @@ -2,7 +2,7 @@ This call is intended for the submission of false positives - items that were incorrectly classified as spam by Akismet. It takes identical arguments as [comment check](check_comment.md) and [submit spam](submit_spam.md). -```js +```ts Client.submitHam(comment: Comment): Promise ``` @@ -16,7 +16,8 @@ See the [Akismet API documentation](https://akismet.com/developers/detailed-docs ### **comment**: Comment The user's `Comment` to be submitted, incorrectly classified as spam. -> Ideally, it should be the same object as the one passed to the original [comment check](check_comment.md) API call. +!!! note + Ideally, it should be the same object as the one passed to the original [comment check](check_comment.md) API call. ## Return value A `Promise` that resolves when the given `Comment` has been submitted. diff --git a/docs/usage/submit_spam.md b/docs/usage/submit_spam.md index 99a93f07..233badbe 100644 --- a/docs/usage/submit_spam.md +++ b/docs/usage/submit_spam.md @@ -1,7 +1,7 @@ # Submit spam This call is for submitting comments that weren't marked as spam but should have been. -```js +```ts Client.submitSpam(comment: Comment): Promise ``` @@ -18,7 +18,8 @@ See the [Akismet API documentation](https://akismet.com/developers/detailed-docs ### **comment**: Comment The user's `Comment` to be submitted, incorrectly classified as ham. -> Ideally, it should be the same object as the one passed to the original [comment check](check_comment.md) API call. +!!! note + Ideally, it should be the same object as the one passed to the original [comment check](check_comment.md) API call. ## Return value A `Promise` that resolves when the given `Comment` has been submitted. diff --git a/docs/usage/verify_key.md b/docs/usage/verify_key.md index abb39ba1..c1f14b57 100644 --- a/docs/usage/verify_key.md +++ b/docs/usage/verify_key.md @@ -2,7 +2,7 @@ Key verification authenticates your API key before calling the [comment check](check_comment.md), [submit spam](submit_spam.md) or [submit ham](submit_ham.md) methods. -```js +```ts Client.verifyKey(): Promise ``` diff --git a/etc/mkdocs.yaml b/etc/mkdocs.yaml index 7f03fbc4..87d722d4 100644 --- a/etc/mkdocs.yaml +++ b/etc/mkdocs.yaml @@ -43,10 +43,10 @@ nav: - Comment check: usage/check_comment.md - Submit spam: usage/submit_spam.md - Submit ham: usage/submit_ham.md - - Further reading: + - Related topics: - API reference: api/ - Testing: testing.md - - About: + - See also: - Changelog: changelog.md - License: license.md