Skip to content

Commit 5eefc3c

Browse files
committed
[docs] Improve usage instructions
1 parent ec2501f commit 5eefc3c

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

docs/guide/getting-started.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,30 +37,35 @@ composer require --dev nelson6e65/phpdoc-vuepress
3737
> You may need to set the composer option [minimum-stability](https://getcomposer.org/doc/04-schema.md#minimum-stability) to 'dev' in order to be able to install pre-releases.
3838
3939

40-
## Configuration
41-
42-
Go to [Configuration](configuration.md) in order to see how to configure.
43-
44-
4540
## Usage
4641

47-
Run phpDocumentor and set template as `vendor/nelson6e65/phpdoc-vuepress/data/templates/vuepress`:
42+
First, you need to [prepare your project to use phpDocumentor and VuePress to generate your API documentation](configuration.md).
4843

44+
After that, using that configuration you only need to generate the markdown pages from your code with **phpDocumentor** and then build your **VuePress** documentation:
4945

5046
```bash
51-
phpdoc -d="src/" -t="docs/api/" --template="vendor/nelson6e65/phpdoc-vuepress/data/templates/vuepress"
52-
```
47+
$ phpdoc # This will use the `phpdoc.dist.xml` config file
5348

54-
> More information about the available arguments can be found at [running phpDocumentor](http://www.phpdoc.org/docs/latest/guides/running-phpdocumentor.html).
49+
$ vuepress build docs # Where `docs/` is the directory you configured
50+
```
5551

52+
Done! Your API documentation is live!
5653

57-
Then, you can update your VuePress pages with `vuepress` for your docs:
54+
::: tip
55+
If you already have a default [VuePress configuration](configuration.md#configuring-vuepress) and you want just quickly run phpDocumentor, you can use:
5856

5957
```bash
60-
vuepress build docs # if you installed vuepress globally
58+
phpdoc -d="src/" -t="docs/api/" --template="vendor/nelson6e65/phpdoc-vuepress/data/templates/vuepress"
6159
```
6260

61+
This assumes:
62+
63+
- PHP sources are in: `src/`,
64+
- VuePress documentation is located in `docs/`,
65+
- VuePress will use `/api` route for the API documentation and sidebar is (/will be) configured with the files generated by phpDocumentor.
6366

67+
Please, check the [Configuration page](configuration.md) for examples and guides instead.
68+
:::
6469

6570

6671
## Recommendations

0 commit comments

Comments
 (0)