Browse Source

Updated the documentation

tags/v12.1.0
Cédric Belin 2 months ago
parent
commit
3ddc6ea27c
12 changed files with 74 additions and 39 deletions
  1. +5
    -5
      README.md
  2. +1
    -6
      RoboFile.php
  3. +3
    -3
      composer.json
  4. +20
    -0
      doc/about/license.md
  5. +5
    -5
      doc/about/see_also.md
  6. +3
    -1
      doc/advanced/events.md
  7. +4
    -2
      doc/features/comment_check.md
  8. +3
    -1
      doc/features/key_verification.md
  9. +2
    -2
      doc/installation.md
  10. +21
    -14
      etc/mkdocs.yaml
  11. +1
    -0
      etc/requirements.txt
  12. +6
    -0
      readthedocs.yaml

+ 5
- 5
README.md View File

@@ -4,13 +4,13 @@
Prevent comment spam using [Akismet](https://akismet.com) service, in [PHP](https://www.php.net).

## Documentation
- [User guide](https://dev.belin.io/akismet.php)
- [API reference](https://dev.belin.io/akismet.php/api)
- [User guide](https://docs.belin.io/akismet.php)
- [API reference](https://api.belin.io/akismet.php)

## Development
- [Git repository](https://github.com/cedx/akismet.php)
- [Git repository](https://git.belin.io/cedx/akismet.php)
- [Packagist package](https://packagist.org/packages/cedx/akismet)
- [Submit an issue](https://github.com/cedx/akismet.php/issues)
- [Submit an issue](https://git.belin.io/cedx/akismet.php/issues)

## License
[Akismet for PHP](https://dev.belin.io/akismet.php) is distributed under the MIT License.
[Akismet for PHP](https://docs.belin.io/akismet.php) is distributed under the MIT License.

+ 1
- 6
RoboFile.php View File

@@ -54,13 +54,8 @@ class RoboFile extends Tasks {
function doc(): Result {
$phpdoc = PHP_OS_FAMILY == 'Windows' ? 'php '.escapeshellarg('C:\Program Files\PHP\share\phpDocumentor.phar') : 'phpdoc';
return $this->collectionBuilder()
->addTask($this->taskFilesystemStack()
->copy('CHANGELOG.md', 'doc/about/changelog.md')
->copy('LICENSE.md', 'doc/about/license.md'))
->addTask($this->taskExec("$phpdoc --config=etc/phpdoc.xml"))
->addTask($this->taskExec('mkdocs build --config-file=doc/mkdocs.yaml'))
->addTask($this->taskFilesystemStack()
->remove(['doc/about/changelog.md', 'doc/about/license.md', 'www/mkdocs.yaml']))
->addTask($this->taskExec('mkdocs build --config-file=etc/mkdocs.yaml'))
->run();
}



+ 3
- 3
composer.json View File

@@ -1,6 +1,6 @@
{
"description": "Prevent comment spam using the Akismet service. Add Akismet to your applications so you don't have to worry about spam again.",
"homepage": "https://dev.belin.io/akismet.php",
"homepage": "https://docs.belin.io/akismet.php",
"license": "MIT",
"name": "cedx/akismet",
"type": "library",
@@ -47,7 +47,7 @@
"test": "robo test"
},
"support": {
"docs": "https://dev.belin.io/akismet.php/api",
"issues": "https://github.com/cedx/akismet.php/issues"
"docs": "https://api.belin.io/akismet.php",
"issues": "https://git.belin.io/cedx/akismet.php/issues"
}
}

+ 20
- 0
doc/about/license.md View File

@@ -0,0 +1,20 @@
# MIT License
Copyright © 2016 - 2020 Cédric Belin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

+ 5
- 5
doc/about/see_also.md View File

@@ -1,9 +1,9 @@
# See also

## Development
- [API reference](https://dev.belin.io/akismet.php/api)
- [API reference](https://api.belin.io/akismet.php)
- [Packagist package](https://packagist.org/packages/cedx/akismet)
- [Submit an issue](https://github.com/cedx/akismet.php/issues)
- [Submit an issue](https://git.belin.io/cedx/akismet.php/issues)
- [Akismet for developers](https://akismet.com/development/api)

## Testing
@@ -11,6 +11,6 @@
- [Code coverage](https://coveralls.io/github/cedx/akismet.php/)

## Other implementations
- Dart: [Akismet for Dart](https://dev.belin.io/akismet.dart)
- JavaScript: [Akismet for JS](https://dev.belin.io/akismet.js)
- Yii Framework: [Akismet for Yii](https://dev.belin.io/yii2-akismet)
- Dart: [Akismet for Dart](https://docs.belin.io/akismet.dart)
- JavaScript: [Akismet for JS](https://docs.belin.io/akismet.js)
- Yii Framework: [Akismet for Yii](https://docs.belin.io/yii2-akismet)

+ 3
- 1
doc/advanced/events.md View File

@@ -1,5 +1,7 @@
path: blob/master
---
path: src/branch/master
source: src/Client.php
---

# Events
The `Akismet\Client` class, used to query the Akismet service, is an [EventDispatcher](https://symfony.com/doc/current/components/event_dispatcher.html) that triggers some events during its life cycle.


+ 4
- 2
doc/features/comment_check.md View File

@@ -1,5 +1,7 @@
path: blob/master
---
path: src/branch/master
source: src/Comment.php
---

# Comment check
This is the call you will make the most. It takes a number of arguments and characteristics about the submitted content
@@ -56,4 +58,4 @@ function main(): void {
}
```

See the [API reference](https://dev.belin.io/akismet.php/api) of this library for detailed information about the `Author` and `Comment` classes, and their properties.
See the [API reference](https://api.belin.io/akismet.php) of this library for detailed information about the `Author` and `Comment` classes, and their properties.

+ 3
- 1
doc/features/key_verification.md View File

@@ -1,5 +1,7 @@
path: blob/master
---
path: src/branch/master
source: src/Client.php
---

# Key verification
Key verification authenticates your key before calling the [comment check](comment_check.md),


+ 2
- 2
doc/installation.md View File

@@ -11,10 +11,10 @@ You can verify if you're already good to go with the following commands:

```shell
php --version
# PHP 7.4.4 (cli) (built: Mar 17 2020 13:49:13) ( NTS Visual C++ 2017 x64 )
# PHP 7.4.5 (cli) (built: Apr 14 2020 16:17:19) ( NTS Visual C++ 2017 x64 )

composer --version
# Composer version 1.10.1 2020-03-13 20:34:27
# Composer version 1.10.5 2020-04-10 11:44:22
```

!!! info


doc/mkdocs.yaml → etc/mkdocs.yaml View File

@@ -1,30 +1,33 @@
site_name: Akismet for PHP
site_description: Prevent comment spam using the Akismet service, in PHP.
site_author: Cédric Belin - cedric@belin.io
site_url: https://dev.belin.io/akismet.php
site_url: https://docs.belin.io/akismet.php

docs_dir: .
docs_dir: ../doc
site_dir: ../www

repo_name: GitHub
repo_url: https://github.com/cedx/akismet.php
repo_name: git.belin.io
repo_url: https://git.belin.io/cedx/akismet.php
edit_uri: ''

copyright: Copyright © 2016 - 2020 Cédric Belin
google_analytics:
- !!python/object/apply:os.getenv [GOOGLE_ANALYTICS_ID]
- auto

extra:
social:
- {type: globe, link: 'https://belin.io'}
- {type: github, link: 'https://github.com/cedx'}
- {type: twitter, link: 'https://twitter.com/cedxbelin'}
- {type: linkedin, link: 'https://linkedin.com/in/cedxbelin'}
- icon: fontawesome/solid/globe
link: 'https://belin.io'
- icon: fontawesome/brands/github
link: 'https://github.com/cedx'
- icon: fontawesome/brands/twitter
link: 'https://twitter.com/cedxbelin'
- icon: fontawesome/brands/linkedin
link: 'https://linkedin.com/in/cedxbelin'

markdown_extensions:
- admonition
- codehilite
- meta
- toc:
permalink: true

nav:
- Overview: index.md
@@ -39,11 +42,15 @@ nav:
- Events: advanced/events.md
- Testing: advanced/testing.md
- About:
- Changelog: about/changelog.md
- License: about/license.md
- See also: about/see_also.md

theme:
icon:
logo: fontawesome/solid/book-reader
repo: fontawesome/brands/git-alt
name: material
favicon: img/favicon.ico
palette: {primary: deep purple, accent: deep purple}
palette:
accent: purple
primary: purple

+ 1
- 0
etc/requirements.txt View File

@@ -0,0 +1 @@
mkdocs-material

+ 6
- 0
readthedocs.yaml View File

@@ -0,0 +1,6 @@
version: 2
mkdocs:
configuration: etc/mkdocs.yaml
python:
install:
- requirements: etc/requirements.txt

Loading…
Cancel
Save