Skip to content

Commit 1db8985

Browse files
authored
Merge branch 'main' into code
2 parents d55c608 + acbb1a7 commit 1db8985

File tree

148 files changed

+2313
-2261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+2313
-2261
lines changed

.eslintrc.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ module.exports = {
1919
'@typescript-eslint/no-explicit-any': 'off',
2020
'@typescript-eslint/no-non-null-assertion': 'off',
2121
'@typescript-eslint/no-var-requires': 'off',
22+
'import/no-extraneous-dependencies': [
23+
'error',
24+
{
25+
devDependencies: false,
26+
optionalDependencies: false,
27+
},
28+
],
29+
},
30+
},
31+
{
32+
files: ['*.vue'],
33+
rules: {
34+
// disable for setup script
35+
'@typescript-eslint/no-unused-vars': 'off',
2236
},
2337
},
2438
{
@@ -35,6 +49,13 @@ module.exports = {
3549
rules: {
3650
'@typescript-eslint/explicit-function-return-type': 'off',
3751
'vue/one-component-per-file': 'off',
52+
'import/no-extraneous-dependencies': 'off',
53+
},
54+
},
55+
{
56+
files: ['docs/**'],
57+
rules: {
58+
'import/no-extraneous-dependencies': 'off',
3859
},
3960
},
4061
],

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,56 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [2.0.0-beta.16](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.15...v2.0.0-beta.16) (2021-05-28)
7+
8+
9+
### Bug Fixes
10+
11+
* **plugin-pwa-popup:** increase default z-index ([67242e8](https://github.com/vuepress/vuepress-next/commit/67242e896f52c09c1e42566a32ae10291d0fb648))
12+
* **theme-default:** increase medium-zoom delay ([9c92443](https://github.com/vuepress/vuepress-next/commit/9c9244385f4fe6f65115cab6ba08f47dffc1580a))
13+
14+
15+
### Features
16+
17+
* **bundler-vite:** configure postcss by default ([6197578](https://github.com/vuepress/vuepress-next/commit/61975781151ace783f3021bd6a3c55c4fa7b12bd))
18+
* **plugin-back-to-top:** add z-index variable ([3d7d4a4](https://github.com/vuepress/vuepress-next/commit/3d7d4a4ba173dab4c3ad80abea5ac96cc1eb0bde))
19+
* **plugin-medium-zoom:** add more css variables (close [#174](https://github.com/vuepress/vuepress-next/issues/174)) ([d717800](https://github.com/vuepress/vuepress-next/commit/d71780094839db02424b60f3a2877871e34eaf64))
20+
* **plugin-nprogress:** add z-index variable ([151e087](https://github.com/vuepress/vuepress-next/commit/151e087c289a387d7ff77654059de9d71910263a))
21+
* **plugin-pwa-popup:** add more css variables ([3ae6f72](https://github.com/vuepress/vuepress-next/commit/3ae6f72a1fb981ff132325637d5996c5c07b52f2))
22+
23+
24+
25+
26+
27+
# [2.0.0-beta.15](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.14...v2.0.0-beta.15) (2021-05-27)
28+
29+
30+
### Bug Fixes
31+
32+
* **markdown:** decode assets link to ensure bundler can find the file ([#144](https://github.com/vuepress/vuepress-next/issues/144)) ([d3e5409](https://github.com/vuepress/vuepress-next/commit/d3e5409246a47edae93209c9ce5dd2614e14c936))
33+
* **theme-default:** handle rotate events on iPad ([#150](https://github.com/vuepress/vuepress-next/issues/150)) ([bbdda60](https://github.com/vuepress/vuepress-next/commit/bbdda60bba0a56590535f3e762dec55767ec031c))
34+
* **theme-default:** show header anchors when being focused ([#164](https://github.com/vuepress/vuepress-next/issues/164)) ([8de5f0f](https://github.com/vuepress/vuepress-next/commit/8de5f0fa2873f64be0622aced46e1512c7f4fac5))
35+
36+
37+
### Features
38+
39+
* **bundler-webpack:** bump webpack-dev-server to 4.0.0-beta.3 ([2e86826](https://github.com/vuepress/vuepress-next/commit/2e8682680eba7736bcf3325014a927a87503ba0b))
40+
* **cli:** allow setting default app config ([41f9dc6](https://github.com/vuepress/vuepress-next/commit/41f9dc612d65a7aae777a75ee00715f0b7bab7c6))
41+
* **plugin-search:** add --search-bg-color variable ([6c778a8](https://github.com/vuepress/vuepress-next/commit/6c778a83b5d26529c830057aadc9c6fde8dc1805))
42+
* **plugin-search:** improve a11y support ([#165](https://github.com/vuepress/vuepress-next/issues/165)) ([205aafe](https://github.com/vuepress/vuepress-next/commit/205aafe4e6600987e06730b926abe2be3e4d5d73))
43+
* **theme-default:** support dark mode (close [#29](https://github.com/vuepress/vuepress-next/issues/29)) ([680e429](https://github.com/vuepress/vuepress-next/commit/680e4298a80ddb06b0381af48644124ffb0b0c4c))
44+
* **theme-default:** support full link for github repo ([#152](https://github.com/vuepress/vuepress-next/issues/152)) ([8a5055b](https://github.com/vuepress/vuepress-next/commit/8a5055b57d2068e73b4a1c52601c94bdbbc1a7c5))
45+
* **theme-default:** support Gitee repo ([5cad664](https://github.com/vuepress/vuepress-next/commit/5cad664bd7224a08e679dc06f61f17af6c790b97))
46+
47+
48+
### BREAKING CHANGES
49+
50+
* **theme-default:** most sass variables are migrated to css variables
51+
52+
53+
54+
55+
656
# [2.0.0-beta.14](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.13...v2.0.0-beta.14) (2021-05-12)
757

858

docs/.vuepress/configs/navbar/en.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,6 @@ export const en: NavbarConfig = [
55
text: 'Guide',
66
link: '/guide/',
77
},
8-
{
9-
text: 'Advanced',
10-
children: [
11-
'/advanced/architecture.md',
12-
'/advanced/plugin.md',
13-
'/advanced/theme.md',
14-
{
15-
text: 'Cookbook',
16-
link: '/advanced/cookbook/',
17-
},
18-
],
19-
},
208
{
219
text: 'Reference',
2210
children: [
@@ -63,6 +51,18 @@ export const en: NavbarConfig = [
6351
{
6452
text: 'Learn More',
6553
children: [
54+
{
55+
text: 'Advanced',
56+
children: [
57+
'/advanced/architecture.md',
58+
'/advanced/plugin.md',
59+
'/advanced/theme.md',
60+
{
61+
text: 'Cookbook',
62+
link: '/advanced/cookbook/',
63+
},
64+
],
65+
},
6666
{
6767
text: 'Resources',
6868
children: [
@@ -78,18 +78,18 @@ export const en: NavbarConfig = [
7878
},
7979
],
8080
},
81+
],
82+
},
83+
{
84+
text: 'v2.x',
85+
children: [
8186
{
82-
text: 'Legacy Version',
83-
children: [
84-
{
85-
text: 'v1 docs',
86-
link: 'https://v1.vuepress.vuejs.org',
87-
},
88-
{
89-
text: 'v0 docs',
90-
link: 'https://v0.vuepress.vuejs.org',
91-
},
92-
],
87+
text: 'v1.x',
88+
link: 'https://v1.vuepress.vuejs.org',
89+
},
90+
{
91+
text: 'v0.x',
92+
link: 'https://v0.vuepress.vuejs.org',
9393
},
9494
],
9595
},

docs/.vuepress/configs/navbar/zh.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,6 @@ export const zh: NavbarConfig = [
55
text: '指南',
66
link: '/zh/guide/',
77
},
8-
{
9-
text: '深入',
10-
children: [
11-
'/zh/advanced/architecture.md',
12-
'/zh/advanced/plugin.md',
13-
'/zh/advanced/theme.md',
14-
{
15-
text: 'Cookbook',
16-
link: '/zh/advanced/cookbook/',
17-
},
18-
],
19-
},
208
{
219
text: '参考',
2210
children: [
@@ -60,6 +48,18 @@ export const zh: NavbarConfig = [
6048
{
6149
text: '了解更多',
6250
children: [
51+
{
52+
text: '深入',
53+
children: [
54+
'/zh/advanced/architecture.md',
55+
'/zh/advanced/plugin.md',
56+
'/zh/advanced/theme.md',
57+
{
58+
text: 'Cookbook',
59+
link: '/zh/advanced/cookbook/',
60+
},
61+
],
62+
},
6363
{
6464
text: '其他资源',
6565
children: [
@@ -75,18 +75,18 @@ export const zh: NavbarConfig = [
7575
},
7676
],
7777
},
78+
],
79+
},
80+
{
81+
text: 'v2.x',
82+
children: [
7883
{
79-
text: '旧版本',
80-
children: [
81-
{
82-
text: 'v1 文档',
83-
link: 'https://v1.vuepress.vuejs.org/zh/',
84-
},
85-
{
86-
text: 'v0 文档',
87-
link: 'https://v0.vuepress.vuejs.org/zh/',
88-
},
89-
],
84+
text: 'v1.x',
85+
link: 'https://v1.vuepress.vuejs.org',
86+
},
87+
{
88+
text: 'v0.x',
89+
link: 'https://v0.vuepress.vuejs.org',
9090
},
9191
],
9292
},

docs/.vuepress/styles/palette.scss

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/advanced/cookbook/usage-of-client-app-enhance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default defineClientAppEnhance(({ app, router, siteData }) => {
8181
```
8282

8383
::: warning
84-
It not recommended to use `addRoute` method to add dynamic routes here, because those routes will **NOT** be pre-rendered in build mode.
84+
It's not recommended to use `addRoute` method to add dynamic routes here, because those routes will **NOT** be pre-rendered in build mode.
8585

8686
But you can still do that if you understand the drawback.
8787
:::

docs/guide/migration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ The palette system is extracted to [@vuepress/plugin-palette](../reference/plugi
147147

148148
Theme authors can use their own way to allow users to custom styles, and not be limited with stylus.
149149

150-
If you are using default theme, the palette system is still available but migrated to SASS. See [Default Theme > Styles](../reference/default-theme/styles.md).
150+
If you are using default theme, the palette system is still available but migrated to SASS, while most variables have been migrated to CSS variables. See [Default Theme > Styles](../reference/default-theme/styles.md).
151151

152152
### Conventional Files Change
153153

@@ -228,7 +228,7 @@ Removed.
228228

229229
#### Palette System
230230

231-
The palette system of default theme has migrated to SASS.
231+
The palette system of default theme has migrated to SASS and CSS variables.
232232

233233
See [Default Theme > Styles](../reference/default-theme/styles.md).
234234

docs/reference/default-theme/config.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ module.exports = {
146146
// If you set it in the form of `organization/repository`
147147
// we will take it as a GitHub repo
148148
repo: 'vuejs/vuepress',
149-
// Use url directly if you are not using GitHub
149+
// You can also set it to a URL directly
150150
repo: 'https://gitlab.com/foo/bar',
151151
},
152152
}
@@ -362,7 +362,7 @@ module.exports = {
362362

363363
This will be used for generating the _edit this page_ link.
364364

365-
If you don't set this option, the pattern will be inferred from the [docsRepo](#docsrepo) option. But if your documentation repository is not hosted on a common platform, for example, GitHub, GitLab, Bitbucket, etc., you have to set this option explicitly to make the _edit this page_ link work.
365+
If you don't set this option, the pattern will be inferred from the [docsRepo](#docsrepo) option. But if your documentation repository is not hosted on a common platform, for example, GitHub, GitLab, Bitbucket, Gitee, etc., you have to set this option explicitly to make the _edit this page_ link work.
366366

367367
- Usage:
368368

@@ -495,7 +495,7 @@ module.exports = {
495495

496496
- Type: `string`
497497

498-
- Default: `'WARNING'`
498+
- Default: `'DANGER'`
499499

500500
- Details:
501501

@@ -535,7 +535,7 @@ module.exports = {
535535

536536
This is mainly for a11y purpose.
537537

538-
## Plugins
538+
## Plugins Config
539539

540540
### themePlugins
541541

@@ -545,7 +545,7 @@ module.exports = {
545545

546546
Default theme is using some plugins by default. You can disable a plugin if you really do not want to use it. Make sure you understand what the plugin is for before disabling it.
547547

548-
#### themePlugins.activeHeaderLinks
548+
### themePlugins.activeHeaderLinks
549549

550550
- Type: `boolean`
551551

@@ -555,7 +555,7 @@ module.exports = {
555555

556556
Enable [@vuepress/plugin-active-header-links](../plugin/active-header-links.md) or not.
557557

558-
#### themePlugins.backToTop
558+
### themePlugins.backToTop
559559

560560
- Type: `boolean`
561561

@@ -565,7 +565,7 @@ module.exports = {
565565

566566
Enable [@vuepress/plugin-back-to-top](../plugin/back-to-top.md) or not.
567567

568-
#### themePlugins.container
568+
### themePlugins.container
569569

570570
- Type: `Record<ContainerType, boolean>`
571571

@@ -585,7 +585,7 @@ module.exports = {
585585
- Also see:
586586
- [Default Theme > Markdown > Custom Containers](./markdown.md#custom-containers)
587587

588-
#### themePlugins.git
588+
### themePlugins.git
589589

590590
- Type: `boolean`
591591

@@ -595,7 +595,7 @@ module.exports = {
595595

596596
Enable [@vuepress/plugin-git](../plugin/git.md) or not.
597597

598-
#### themePlugins.mediumZoom
598+
### themePlugins.mediumZoom
599599

600600
- Type: `boolean`
601601

@@ -605,7 +605,7 @@ module.exports = {
605605

606606
Enable [@vuepress/plugin-medium-zoom](../plugin/medium-zoom.md) or not.
607607

608-
#### themePlugins.nprogress
608+
### themePlugins.nprogress
609609

610610
- Type: `boolean`
611611

docs/reference/default-theme/styles.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,32 @@ Users can custom style variables via [palette file](#palette-file), and add extr
88

99
## Palette File
1010

11-
You can create a `.vuepress/styles/palette.scss` file to override predefined variables of default theme:
11+
The path of palette file is `.vuepress/styles/palette.scss`.
1212

13+
You can make use of it to override predefined SASS variables of default theme.
14+
15+
::: details Click to expand SASS variables
1316
@[code{3-} scss](@vuepress/theme-default/src/client/styles/_variables.scss)
17+
:::
1418

1519
## Style File
1620

17-
You can override default styles or add extra styles in `.vuepress/styles/index.scss` file. For example:
21+
The path of style file is `.vuepress/styles/index.scss`.
22+
23+
You can add extra styles here, or override default styles:
1824

1925
```scss
2026
:root {
2127
scroll-behavior: smooth;
2228
}
2329
```
30+
31+
You can also make use of it to override predefined CSS variables of default theme.
32+
33+
::: details Click to expand CSS variables
34+
@[code scss](@vuepress/theme-default/src/client/styles/vars.scss)
35+
:::
36+
37+
::: details Click to expand dark mode CSS variables
38+
@[code scss](@vuepress/theme-default/src/client/styles/vars-dark.scss)
39+
:::

0 commit comments

Comments
 (0)