Skip to content

Commit 1f49cdc

Browse files
committed
🎨 Use version 1 of VuePress
πŸ“ Improve documentation about using VuePress 1.5 ⬆️ πŸ“¦ vuepress ✨ πŸ“¦ @vuepress/plugin-google-analytics
1 parent a782ff3 commit 1f49cdc

File tree

7 files changed

+27
-16
lines changed

7 files changed

+27
-16
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ Explore sources of [nelson6e65/phpdoc-vuepress](https://github.com/nelson6e65/ph
4444
- Node.js >= 8
4545
- [phpDocumentor](https://www.phpdoc.org/).
4646
- [Yarn](https://yarnpkg.com) (or npm)
47-
- [VuePress](https://v0.vuepress.vuejs.org/).
47+
- [VuePress](https://vuepress.vuejs.org/).
4848

49-
> This template is designed for [phpDocumentor 2](https://www.phpdoc.org/) and [VuePress 0.x](https://v0.vuepress.vuejs.org/).
49+
> This template is designed for [phpDocumentor 2](https://www.phpdoc.org/) and [VuePress 1](https://v0.vuepress.vuejs.org/).
5050
> Read more about dependencies in the [Documentation](https://nelson6e65.github.io/phpdoc-vuepress/guide/getting-started.html).
5151
5252
## Installation
@@ -56,7 +56,7 @@ Install `nelson6e65/phpdoc-vuepress` with composer:
5656
```bash
5757
composer require --dev nelson6e65/phpdoc-vuepress
5858
```
59-
59+
6060
> 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.
6161
6262

β€Ždocs/.vuepress/config.jsβ€Ž

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ module.exports = {
1111
// Description of your project
1212
description: 'Template for generating your PHP API documentation in a pretty VuePress format',
1313

14+
// Plugins config
15+
plugins: {
16+
'@vuepress/google-analytics': {
17+
ga: 'UA-58599811-1' // GoogleAnalytics ID (optional. use your own ga)
18+
}
19+
},
20+
1421
themeConfig: {
1522
nav: [
1623
{ text: 'Guide', link: '/guide/' }, // Link to a non-api-documentation section
@@ -71,7 +78,5 @@ module.exports = {
7178
repo: 'nelson6e65/phpdoc-vuepress',
7279
docsDir: 'docs',
7380
editLinks: true,
74-
75-
ga: 'UA-58599811-1' // GoogleAnalytics ID.
7681
}
7782
}

β€Ždocs/guide/README.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Check a demo of documentation generated with this template in [Demo](/demo/)
4242

4343
![License](https://img.shields.io/github/license/nelson6e65/phpdoc-vuepress.svg)
4444

45-
Copyright (c) 2018-2019 Nelson Martell
45+
Copyright (c) 2018-2020 Nelson Martell
4646

4747
Read the [`LICENSE` file](https://github.com/nelson6e65/phpdoc-vuepress/blob/master/LICENSE) for details.
4848

β€Ždocs/guide/configuration.mdβ€Ž

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ Then, you can just run `phpdoc`.
3636

3737
## Configuring VuePress
3838

39-
If you don't already have configured your VuePress, create **`docs/.vuepress/config.js`** following the ***Config Reference*** according to [v0.x](https://v0.vuepress.vuejs.org/config/) or [v1.x](https://vuepress.vuejs.org/config/) version of VuePress you use.
39+
If you don't already have configured your VuePress, you can follow the [setup instructions](https://vuepress.vuejs.org/guide/getting-started.html).
40+
41+
> Depending on version you are using, the **`docs/.vuepress/config.js`** file you created should following the ***Config Reference*** according to [v0.x](https://v0.vuepress.vuejs.org/config/) or [v1.x](https://vuepress.vuejs.org/config/).
4042
4143
Once done, you only need to include the files generated by ***phpDocumentor*** in your sidebar as you like.
4244

@@ -71,7 +73,7 @@ If you installed VuePress as project dependency, you can configure scripts in yo
7173
}
7274
```
7375

74-
And then just run `yarn docs:build` :sunglasses:.
76+
And then just run `npm run docs:build` :sunglasses:.
7577
:::
7678

7779
> Read about recommended directory structure at [https://vuepress.vuejs.org/guide/directory-structure.html](https://vuepress.vuejs.org/guide/directory-structure.html)

β€Ždocs/guide/getting-started.mdβ€Ž

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,20 @@
88

99
### Dependencies
1010

11-
This template is designed for [phpDocumentor 2](https://www.phpdoc.org/) and [VuePress 0.x](https://v0.vuepress.vuejs.org/).
12-
13-
> This template may be compatible with upcoming **phpDocumentor3** and **VuePress** v1.0.0, but will not be documented at the moment while they are unstable.
11+
- **phpDocumentor**: This template is designed for [phpDocumentor 2.x (2.9.1)](https://github.com/phpDocumentor/phpDocumentor#phpdocumentor), but may be compatible with upcoming **phpDocumentor3**.
12+
- **VuePress**: You can use the [version 1.x](https://v1.vuepress.vuejs.org/) by default, but you can also use [version 0.x](https://v0.vuepress.vuejs.org/), depending on your configuration compatibility.
1413

1514
You can globally install them:
1615

1716
```bash
18-
# phpDocumentor2
17+
# phpDocumentor2 globally
1918
composer global require phpdocumentor/phpdocumentor:^2.9.0
2019

2120
# VuePress
22-
yarn global add vuepress
21+
npm i -D vuepress
2322
```
2423

25-
> Read about [VuePress install](https://v0.vuepress.vuejs.org/guide/getting-started.html).
26-
24+
> Read about [VuePress install](https://vuepress.vuejs.org/guide/getting-started.html).
2725
2826

2927
## Installation

β€Žpackage-lock.jsonβ€Ž

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žpackage.jsonβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"license": "MIT",
77
"private": true,
88
"dependencies": {
9-
"vuepress": "^0.14.8"
9+
"@vuepress/plugin-google-analytics": "^1.5.3",
10+
"vuepress": "^1.5.3"
1011
},
1112
"scripts": {
1213
"docs:dev": "vuepress dev docs",

0 commit comments

Comments
Β (0)