Skip to content

Commit b107245

Browse files
authored
chore(docs): adds remark-lint, fix #1741
2 parents ecf4fc9 + 7a13eed commit b107245

30 files changed

+1443
-341
lines changed

packages/docs/.remarkrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"plugins": [
3+
"preset-lint-recommended",
4+
"preset-lint-consistent",
5+
6+
["lint-list-item-indent", "space"],
7+
["lint-heading-style", false]
8+
]
9+
}

packages/docs/docs/guide/deploy.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ pages:
119119

120120
1. On Netlify, setup up a new project from GitHub with the following settings:
121121

122-
- **Build Command:** `npm run docs:build` or `yarn docs:build`
123-
- **Publish directory:** `docs/.vuepress/dist`
122+
- **Build Command:** `npm run docs:build` or `yarn docs:build`
123+
- **Publish directory:** `docs/.vuepress/dist`
124124

125125
2. Hit the deploy button!
126126

@@ -169,18 +169,18 @@ You can also deploy to a [custom domain](http://surge.sh/help/adding-a-custom-do
169169

170170
3. Run `heroku login` and fill in your Heroku credentials:
171171

172-
``` bash
173-
heroku login
174-
```
172+
``` bash
173+
heroku login
174+
```
175175

176176
4. Create a file called `static.json` in the root of your project with the content below:
177177

178-
`static.json`:
179-
```json
180-
{
181-
"root": "./docs/.vuepress/dist"
182-
}
183-
```
178+
`static.json`:
179+
```json
180+
{
181+
"root": "./docs/.vuepress/dist"
182+
}
183+
```
184184

185185
This is the configuration of your site. See more at [heroku-buildpack-static](https://github.com/heroku/heroku-buildpack-static).
186186

packages/docs/docs/guide/markdown.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,12 @@ A list of all emojis available can be found [here](https://github.com/markdown-i
111111

112112
**Output**
113113

114+
<!--lint disable no-shortcut-reference-link no-undefined-references-->
115+
114116
[[toc]]
115117

118+
<!--lint enable no-shortcut-reference-link no-undefined-references-->
119+
116120
Rendering of TOC can be configured using the [`markdown.toc`](../config/README.md#markdown-toc) option.
117121

118122
## Custom Containers <Badge text="default theme"/>
@@ -311,8 +315,12 @@ It also supports [line highlighting](#line-highlighting-in-code-blocks):
311315

312316
**Output**
313317

318+
<!--lint disable strong-marker-->
319+
314320
<<< @/../@vuepress/markdown/__tests__/fragments/snippet.js{2}
315321

322+
<!--lint enable strong-marker-->
323+
316324
::: tip
317325
Since the import of the code snippets will be executed before webpack compilation, you can’t use the path alias in webpack. The default value of `@` is `process.cwd()`.
318326
:::

packages/docs/docs/guide/permalinks.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ We have seen the shadow of the blog. Let’s continue to look down.
3333

3434
## Permalinks
3535

36-
A permalink is a URL that is intended to remain unchanged for a long time, yielding a hyperlink that is less susceptible to link root<sup>[1]</sup>. VuePress supports a flexible way to build permalinks, allowing you to use template variables.
36+
A permalink is a URL that is intended to remain unchanged for a long time, yielding a hyperlink that is less susceptible to link root<sup>[1][1]</sup>. VuePress supports a flexible way to build permalinks, allowing you to use template variables.
3737

3838
The default permalink is `/:regular`.
3939

@@ -64,11 +64,13 @@ Hello!
6464
### Template Variables
6565

6666
| Variable | Description |
67-
|---|---|
68-
|:year|Published year of posts (4-digit)|
69-
|:month|Published month of posts (2-digit)|
70-
|:i_month|Published month of posts (Without leading zeros)|
71-
|:day|Published day of posts (2-digit)|
72-
|:i_day|Published day of posts (Without leading zeros)|
73-
|:slug|Slugified file path (Without extension)|
74-
|:regular| Permalink generated by VuePress by default, for implementation see [here](https://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/shared-utils/src/fileToPath.ts) |
67+
| --- | --- |
68+
| :year | Published year of posts (4-digit) |
69+
| :month | Published month of posts (2-digit) |
70+
| :i_month | Published month of posts (Without leading zeros) |
71+
| :day | Published day of posts (2-digit) |
72+
| :i_day | Published day of posts (Without leading zeros) |
73+
| :slug | Slugified file path (Without extension) |
74+
| :regular | Permalink generated by VuePress by default, for implementation see [here](https://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/shared-utils/src/fileToPath.ts) |
75+
76+
[1]:https://en.wikipedia.org/wiki/Link_rot

packages/docs/docs/guide/using-vue.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ Specify a specific slot for a specific page (.md) for rendering. This will be us
229229

230230
- **Props**:
231231

232-
- `text` - string
233-
- `type` - string, optional value: `"tip"|"warn"|"error"`, defaults to `"tip"`.
234-
- `vertical` - string, optional value: `"top"|"middle"`, defaults to `"top"`.
232+
- `text` - string
233+
- `type` - string, optional value: `"tip"|"warn"|"error"`, defaults to `"tip"`.
234+
- `vertical` - string, optional value: `"top"|"middle"`, defaults to `"top"`.
235235

236236
- **Usage**:
237237

packages/docs/docs/plugin/life-cycle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module.exports = {
3939
- Type: `AsyncFunction`
4040
- Scope:`build`
4141

42-
Called when a (production) build finishes, with an array of generated page HTML paths.
42+
Called when a (production) build finishes, with an array of generated page HTML paths.
4343

4444
``` js
4545
module.exports = {

packages/docs/docs/plugin/official/plugin-back-to-top.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ yarn add -D @vuepress/plugin-back-to-top@next
1818

1919
```javascript
2020
module.exports = {
21-
plugins: ['@vuepress/back-to-top']
21+
plugins: ['@vuepress/back-to-top']
2222
}
2323
```

packages/docs/docs/plugin/official/plugin-google-analytics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ yarn add -D @vuepress/plugin-google-analytics@next
2020
```javascript
2121
module.exports = {
2222
plugins: [
23-
[
23+
[
2424
'@vuepress/google-analytics',
2525
{
2626
'ga': '' // UA-00000000-0
2727
}
28-
]
29-
]
28+
]
29+
]
3030
}
3131
```
3232

packages/docs/docs/plugin/official/plugin-last-updated.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you use it at your custom theme, you'll need to handle the UI by yourself, an
1515

1616
```js
1717
module.exports = {
18-
plugins: ['@vuepress/last-updated']
18+
plugins: ['@vuepress/last-updated']
1919
}
2020
```
2121

@@ -35,7 +35,7 @@ const moment = require('moment');
3535

3636
module.exports = {
3737
plugins: [
38-
[
38+
[
3939
'@vuepress/last-updated',
4040
{
4141
transformer: (timestamp, lang) => {

packages/docs/docs/plugin/official/plugin-nprogress.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ Set `$nprogressColor` in your __site__ or __theme__ `palette.styl` file to chang
3434
$nprogressColor = red
3535
```
3636

37-
**Also see:**
37+
__Also see:__
3838

3939
- [Config Reference > Styling](../../config/README.md#styling)

0 commit comments

Comments
 (0)