Browse Source

Updated the documentation

main
Cédric Belin 2 months ago
parent
commit
6ce49f13c3
11 changed files with 92 additions and 63 deletions
  1. +6
    -6
      README.md
  2. +2
    -7
      RoboFile.php
  3. +3
    -3
      composer.json
  4. +20
    -0
      doc/about/license.md
  5. +2
    -2
      doc/about/see_also.md
  6. +2
    -2
      doc/installation.md
  7. +0
    -41
      doc/mkdocs.yaml
  8. +2
    -2
      doc/usage.md
  9. +48
    -0
      etc/mkdocs.yaml
  10. +1
    -0
      etc/requirements.txt
  11. +6
    -0
      readthedocs.yaml

+ 6
- 6
README.md View File

@@ -1,16 +1,16 @@
# Mustache for Yii
![PHP](https://img.shields.io/packagist/php-v/cedx/yii2-mustache.svg) ![Yii Framework](https://img.shields.io/badge/yii-%3E%3D2.0-brightgreen.svg) ![Release](https://img.shields.io/packagist/v/cedx/yii2-mustache.svg) ![License](https://img.shields.io/packagist/l/cedx/yii2-mustache.svg) ![Downloads](https://img.shields.io/packagist/dt/cedx/yii2-mustache.svg) ![Coverage](https://coveralls.io/repos/github/cedx/yii2-mustache/badge.svg) ![Build](https://github.com/cedx/yii2-mustache/workflows/build/badge.svg)

[Mustache](https://mustache.github.io) templating for [Yii](https://www.yiiframework.com), high-performance [PHP](https://www.php.net) framework.
[Mustache](https://mustache.github.io) templating for the [Yii Framework](https://www.yiiframework.com).

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

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

## License
[Mustache for Yii](https://dev.belin.io/yii2-mustache) is distributed under the MIT License.
[Mustache for Yii](https://docs.belin.io/yii2-mustache) is distributed under the MIT License.

+ 2
- 7
RoboFile.php View File

@@ -22,7 +22,7 @@ class RoboFile extends Tasks {
function clean(): Result {
return $this->collectionBuilder()
->addTask($this->taskCleanDir('var'))
->addTask($this->taskDeleteDir(['build', 'doc/api', 'web']))
->addTask($this->taskDeleteDir(['build', 'doc/api', 'www']))
->run();
}

@@ -41,13 +41,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": "Mustache templating for the Yii Framework.",
"homepage": "https://dev.belin.io/yii2-mustache",
"homepage": "https://docs.belin.io/yii2-mustache",
"license": "MIT",
"name": "cedx/yii2-mustache",
"type": "yii2-extension",
@@ -50,7 +50,7 @@
"test": "robo test"
},
"support": {
"docs": "https://dev.belin.io/yii2-mustache/api",
"issues": "https://github.com/cedx/yii2-mustache/issues"
"docs": "https://api.belin.io/yii2-mustache",
"issues": "https://git.belin.io/cedx/yii2-mustache/issues"
}
}

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

@@ -0,0 +1,20 @@
# MIT License
Copyright © 2014 - 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.

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

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

## Development
- [API reference](https://dev.belin.io/yii2-mustache/api)
- [API reference](https://api.belin.io/yii2-mustache)
- [Packagist package](https://packagist.org/packages/cedx/yii2-mustache)
- [Submit an issue](https://github.com/cedx/yii2-mustache/issues)
- [Submit an issue](https://git.belin.io/cedx/yii2-mustache/issues)

## Testing
- [Continuous integration](https://github.com/cedx/yii2-mustache/actions)


+ 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


+ 0
- 41
doc/mkdocs.yaml View File

@@ -1,41 +0,0 @@
site_name: Mustache for Yii
site_description: Mustache templating for Yii, high-performance PHP framework.
site_author: Cédric Belin - cedric@belin.io
site_url: https://dev.belin.io/yii2-mustache

docs_dir: .
site_dir: ../www

repo_name: GitHub
repo_url: https://github.com/cedx/yii2-mustache
edit_uri: ''

copyright: Copyright © 2014 - 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'}

markdown_extensions:
- admonition
- codehilite

nav:
- Overview: index.md
- Installation: installation.md
- Usage: usage.md
- About:
- Changelog: about/changelog.md
- License: about/license.md
- See also: about/see_also.md

theme:
name: material
favicon: img/favicon.ico
palette: {primary: blue grey, accent: light blue}

+ 2
- 2
doc/usage.md View File

@@ -53,6 +53,6 @@ There are two ways of referencing partials:
```

In the first case the view will be searched relatively to the current view path.
For `post.mustache` that means these will be searched in the same directory as the currently rendered template.
For `post.mustache`, that means these will be searched in the same directory as the currently rendered template.

In the second case we're using path aliases. All the Yii aliases such as `@app` are available by default.
In the second case we're using path aliases. All the [Yii aliases](https://www.yiiframework.com/doc/guide/2.0/en/concept-aliases) such as `@app` are available by default.

+ 48
- 0
etc/mkdocs.yaml View File

@@ -0,0 +1,48 @@
site_name: Mustache for Yii
site_description: Mustache templating for the Yii Framework.
site_author: Cédric Belin - cedric@belin.io
site_url: https://docs.belin.io/yii2-mustache

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

repo_name: git.belin.io
repo_url: https://git.belin.io/cedx/yii2-mustache
edit_uri: ''

copyright: Copyright © 2014 - 2020 Cédric Belin
extra:
social:
- 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
- Installation: installation.md
- Usage: usage.md
- About:
- 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:
accent: indigo
primary: indigo

+ 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