@vuepress/theme-default 2.0.0-rc.2 → 2.0.0-rc.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/lib/client/components/AutoLink.vue +26 -24
  2. package/lib/client/components/NavbarBrand.vue +13 -3
  3. package/lib/client/components/NavbarDropdown.vue +1 -1
  4. package/lib/client/components/NavbarItems.vue +39 -35
  5. package/lib/client/components/PageNav.vue +116 -14
  6. package/lib/client/components/SidebarItem.vue +1 -1
  7. package/lib/client/components/SidebarItems.vue +1 -1
  8. package/lib/client/composables/index.d.ts +1 -0
  9. package/lib/client/composables/index.js +1 -0
  10. package/lib/client/composables/useNavigate.d.ts +1 -0
  11. package/lib/client/composables/useNavigate.js +25 -0
  12. package/lib/client/composables/useSidebarItems.d.ts +3 -4
  13. package/lib/client/composables/useSidebarItems.js +12 -11
  14. package/lib/client/config.js +7 -3
  15. package/lib/client/index.d.ts +1 -1
  16. package/lib/client/index.js +0 -1
  17. package/lib/client/layouts/Layout.vue +1 -2
  18. package/lib/client/layouts/NotFound.vue +2 -2
  19. package/lib/client/styles/arrow.scss +18 -24
  20. package/lib/client/styles/layout.scss +4 -0
  21. package/lib/client/styles/navbar-dropdown.scss +2 -2
  22. package/lib/client/styles/navbar.scss +4 -4
  23. package/lib/client/styles/page.scss +0 -27
  24. package/lib/client/styles/sidebar.scss +1 -1
  25. package/lib/client/styles/vars-dark.scss +7 -0
  26. package/lib/client/styles/vars.scss +46 -9
  27. package/lib/client/utils/getNavLink.d.ts +1 -7
  28. package/lib/client/utils/getNavLink.js +9 -10
  29. package/lib/client/utils/index.d.ts +0 -1
  30. package/lib/client/utils/index.js +0 -1
  31. package/lib/client/utils/isActiveSidebarItem.d.ts +1 -1
  32. package/lib/node/defaultTheme.d.ts +5 -1
  33. package/lib/node/defaultTheme.js +39 -2
  34. package/lib/node/index.d.ts +2 -1
  35. package/lib/node/index.js +1 -1
  36. package/lib/shared/nav.d.ts +2 -1
  37. package/lib/shared/options.d.ts +45 -1
  38. package/package.json +25 -20
  39. package/templates/build.html +13 -10
  40. package/lib/client/utils/getResolveRouteWithRedirect.d.ts +0 -5
  41. package/lib/client/utils/getResolveRouteWithRedirect.js +0 -22
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { useRouteLocale } from 'vuepress/client'
2
+ import { RouteLink, useRouteLocale } from 'vuepress/client'
3
3
  import { useThemeLocaleData } from '../composables/index.js'
4
4
 
5
5
  const routeLocale = useRouteLocale()
@@ -20,7 +20,7 @@ const homeText = themeLocale.value.backToHome ?? 'Back to home'
20
20
 
21
21
  <blockquote>{{ getMsg() }}</blockquote>
22
22
 
23
- <RouterLink :to="homeLink">{{ homeText }}</RouterLink>
23
+ <RouteLink :to="homeLink">{{ homeText }}</RouteLink>
24
24
  </div>
25
25
  </main>
26
26
  </div>
@@ -1,37 +1,31 @@
1
1
  .arrow {
2
2
  display: inline-block;
3
- width: 0;
4
- height: 0;
5
-
6
- &.up {
7
- border: {
8
- left: 4px solid transparent;
9
- right: 4px solid transparent;
10
- bottom: 6px solid var(--c-bg-arrow);
11
- }
3
+ vertical-align: middle;
4
+
5
+ width: 1em;
6
+ height: 1em;
7
+
8
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(0,0,0,0.5)' d='M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z'/%3E%3C/svg%3E");
9
+ background-position: center;
10
+ background-repeat: no-repeat;
11
+
12
+ line-height: normal;
13
+
14
+ transition: all 0.3s;
15
+
16
+ html.dark & {
17
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z'/%3E%3C/svg%3E");
12
18
  }
13
19
 
14
20
  &.down {
15
- border: {
16
- left: 4px solid transparent;
17
- right: 4px solid transparent;
18
- top: 6px solid var(--c-bg-arrow);
19
- }
21
+ transform: rotate(180deg);
20
22
  }
21
23
 
22
24
  &.right {
23
- border: {
24
- top: 4px solid transparent;
25
- bottom: 4px solid transparent;
26
- left: 6px solid var(--c-bg-arrow);
27
- }
25
+ transform: rotate(90deg);
28
26
  }
29
27
 
30
28
  &.left {
31
- border: {
32
- top: 4px solid transparent;
33
- bottom: 4px solid transparent;
34
- right: 6px solid var(--c-bg-arrow);
35
- }
29
+ transform: rotate(-90deg);
36
30
  }
37
31
  }
@@ -201,3 +201,7 @@
201
201
  font-size: 1.9rem;
202
202
  }
203
203
  }
204
+
205
+ #vp-comment {
206
+ @include content_wrapper;
207
+ }
@@ -54,7 +54,7 @@
54
54
 
55
55
  & > a {
56
56
  font-weight: inherit;
57
- &.router-link-active {
57
+ &.route-link-active {
58
58
  &::after {
59
59
  display: none;
60
60
  }
@@ -84,7 +84,7 @@
84
84
  color: var(--c-text-accent);
85
85
  }
86
86
 
87
- &.router-link-active {
87
+ &.route-link-active {
88
88
  color: var(--c-text-accent);
89
89
 
90
90
  &::after {
@@ -76,7 +76,7 @@
76
76
  color: inherit;
77
77
 
78
78
  &:hover,
79
- &.router-link-active {
79
+ &.route-link-active {
80
80
  color: var(--c-text);
81
81
  }
82
82
  }
@@ -93,7 +93,7 @@
93
93
 
94
94
  > a {
95
95
  &:hover,
96
- &.router-link-active {
96
+ &.route-link-active {
97
97
  margin-bottom: -2px;
98
98
  border-bottom: 2px solid var(--c-text-accent);
99
99
  }
@@ -108,7 +108,7 @@
108
108
 
109
109
  > a {
110
110
  &:hover,
111
- &.router-link-active {
111
+ &.route-link-active {
112
112
  margin-bottom: 0;
113
113
  border-bottom: none;
114
114
  }
@@ -117,7 +117,7 @@
117
117
 
118
118
  a {
119
119
  &:hover,
120
- &.router-link-active {
120
+ &.route-link-active {
121
121
  color: var(--c-text-accent);
122
122
  }
123
123
  }
@@ -58,30 +58,3 @@
58
58
  }
59
59
  }
60
60
  }
61
-
62
- .page-nav {
63
- @include content_wrapper;
64
- padding-top: 1rem;
65
- padding-bottom: 0;
66
-
67
- .inner {
68
- min-height: 2rem;
69
- margin-top: 0;
70
- border-top: 1px solid var(--c-border);
71
- transition: border-color var(--t-color);
72
- padding-top: 1rem;
73
- overflow: auto;
74
- }
75
-
76
- .prev {
77
- a:before {
78
- content: '←';
79
- }
80
- }
81
- .next {
82
- float: right;
83
- a:after {
84
- content: '→';
85
- }
86
- }
87
- }
@@ -43,7 +43,7 @@
43
43
  .navbar-dropdown-wrapper
44
44
  .navbar-dropdown
45
45
  .navbar-dropdown-item
46
- a.router-link-active::after {
46
+ a.route-link-active::after {
47
47
  top: calc(1rem - 2px);
48
48
  }
49
49
  }
@@ -66,3 +66,10 @@ html.dark .DocSearch {
66
66
  --docsearch-footer-shadow: inset 0 1px 0 0 rgba(73, 76, 106, 0.5),
67
67
  0 -4px 8px 0 rgba(0, 0, 0, 0.2);
68
68
  }
69
+
70
+ // plugin-pwa
71
+ html.dark body {
72
+ --pwa-shadow-color: rgb(0 0 0 / 30%);
73
+ --pwa-content-color: #ccc;
74
+ --pwa-content-light-color: #999;
75
+ }
@@ -94,9 +94,30 @@
94
94
  }
95
95
 
96
96
  // plugin-back-to-top
97
- .back-to-top {
97
+ .vp-back-to-top-button {
98
98
  --back-to-top-color: var(--c-brand);
99
99
  --back-to-top-color-hover: var(--c-brand-light);
100
+ --back-to-top-bg-color: var(--c-bg);
101
+ }
102
+
103
+ // plugin-catalog
104
+ .vp-catalog-wrapper {
105
+ --catalog-bg-color: var(--c-bg);
106
+ --catalog-bg-secondary-color: var(--c-bg-dark);
107
+ --catalog-border-color: var(--c-border);
108
+ --catalog-active-color: var(--c-brand);
109
+ --catalog-hover-color: var(--c-brand-light);
110
+ }
111
+
112
+ // plugin-comment
113
+ .waline-wrapper {
114
+ --waline-bg-color: var(--c-bg);
115
+ --waline-bg-color-light: var(--c-bg-light);
116
+ --waline-text-color: var(--c-color);
117
+ --waline-border: 1px solid var(--c-border);
118
+ --waline-border-color: var(--c-border);
119
+ --waline-theme-color: var(--c-brand);
120
+ --waline-active-color: var(--c-brand-light);
100
121
  }
101
122
 
102
123
  // plugin-docsearch
@@ -132,15 +153,31 @@
132
153
  --nprogress-color: var(--c-brand);
133
154
  }
134
155
 
156
+ // plugin-photo-swipe
157
+ body {
158
+ --photo-swipe-bullet: var(--c-bg);
159
+ --photo-swipe-bullet-active: var(--c-brand);
160
+ }
161
+
135
162
  // plugin-pwa-popup
136
- .pwa-popup {
137
- --pwa-popup-text-color: var(--c-text);
138
- --pwa-popup-bg-color: var(--c-bg);
139
- --pwa-popup-border-color: var(--c-brand);
140
- --pwa-popup-shadow: 0 4px 16px var(--c-brand);
141
- --pwa-popup-btn-text-color: var(--c-bg);
142
- --pwa-popup-btn-bg-color: var(--c-brand);
143
- --pwa-popup-btn-hover-bg-color: var(--c-brand-light);
163
+ body {
164
+ --pwa-text-color: var(--c-text);
165
+ --pwa-bg-color: var(--c-bg);
166
+ --pwa-border-color: var(--c-brand);
167
+ --pwa-btn-text-color: var(--c-bg);
168
+ --pwa-btn-bg-color: var(--c-brand);
169
+ --pwa-btn-hover-bg-color: var(--c-brand-light);
170
+ }
171
+
172
+ // plugin-redirect
173
+ .language-modal-mask {
174
+ --redirect-bg-color: var(--c-bg);
175
+ --redirect-bg-color-light: var(--c-bg-light);
176
+ --redirect-bg-color-lighter: var(--c-bg-lighter);
177
+ --redirect-text-color: var(--c-text);
178
+ --redirect-primary-color: var(--c-brand);
179
+ --redirect-primary-hover-color: var(--c-brand-light);
180
+ --redirect-primary-text-color: var(--c-bg);
144
181
  }
145
182
 
146
183
  // plugin-search
@@ -1,10 +1,4 @@
1
- import type { Router } from 'vue-router';
2
1
  import type { NavLink } from '../../shared/index.js';
3
- declare module 'vue-router' {
4
- interface RouteMeta {
5
- title?: string;
6
- }
7
- }
8
2
  /**
9
3
  * Resolve NavLink props from string
10
4
  *
@@ -12,4 +6,4 @@ declare module 'vue-router' {
12
6
  * - Input: '/README.md'
13
7
  * - Output: { text: 'Home', link: '/' }
14
8
  */
15
- export declare const getNavLink: (router: Router, item: string) => NavLink;
9
+ export declare const getNavLink: (config: string) => NavLink;
@@ -1,4 +1,4 @@
1
- import { getResolveRouteWithRedirect } from './getResolveRouteWithRedirect.js';
1
+ import { resolveRoute } from 'vuepress/client';
2
2
  /**
3
3
  * Resolve NavLink props from string
4
4
  *
@@ -6,13 +6,12 @@ import { getResolveRouteWithRedirect } from './getResolveRouteWithRedirect.js';
6
6
  * - Input: '/README.md'
7
7
  * - Output: { text: 'Home', link: '/' }
8
8
  */
9
- export const getNavLink = (router, item) => {
10
- // the route path of vue-router is url-encoded, and we expect users are using
11
- // non-url-encoded string in theme config, so we need to url-encode it first to
12
- // resolve the route correctly
13
- const resolved = getResolveRouteWithRedirect(router, encodeURI(item));
14
- return {
15
- text: resolved.meta.title || item,
16
- link: resolved.name === '404' ? item : resolved.fullPath,
17
- };
9
+ export const getNavLink = (config) => {
10
+ const { notFound, meta, path } = resolveRoute(config);
11
+ return notFound
12
+ ? { text: path, link: path }
13
+ : {
14
+ text: meta.title || path,
15
+ link: path,
16
+ };
18
17
  };
@@ -1,5 +1,4 @@
1
1
  export * from './getNavLink.js';
2
- export * from './getResolveRouteWithRedirect.js';
3
2
  export * from './isActiveSidebarItem.js';
4
3
  export * from './resolveEditLink.js';
5
4
  export * from './resolveRepoType.js';
@@ -1,5 +1,4 @@
1
1
  export * from './getNavLink.js';
2
- export * from './getResolveRouteWithRedirect.js';
3
2
  export * from './isActiveSidebarItem.js';
4
3
  export * from './resolveEditLink.js';
5
4
  export * from './resolveRepoType.js';
@@ -1,3 +1,3 @@
1
- import type { RouteLocationNormalizedLoaded } from 'vue-router';
1
+ import type { RouteLocationNormalizedLoaded } from 'vuepress/client';
2
2
  import type { ResolvedSidebarItem } from '../../shared/index.js';
3
3
  export declare const isActiveSidebarItem: (item: ResolvedSidebarItem, route: RouteLocationNormalizedLoaded) => boolean;
@@ -1,10 +1,14 @@
1
1
  import type { Theme } from 'vuepress/core';
2
2
  import type { DefaultThemeLocaleOptions, DefaultThemePluginsOptions } from '../shared/index.js';
3
3
  export interface DefaultThemeOptions extends DefaultThemeLocaleOptions {
4
+ /**
5
+ * deployed hostname
6
+ */
7
+ hostname?: string;
4
8
  /**
5
9
  * To avoid confusion with the root `plugins` option,
6
10
  * we use `themePlugins`
7
11
  */
8
12
  themePlugins?: DefaultThemePluginsOptions;
9
13
  }
10
- export declare const defaultTheme: ({ themePlugins, ...localeOptions }?: DefaultThemeOptions) => Theme;
14
+ export declare const defaultTheme: ({ hostname, themePlugins, ...localeOptions }?: DefaultThemeOptions) => Theme;
@@ -1,17 +1,22 @@
1
1
  import { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links';
2
2
  import { backToTopPlugin } from '@vuepress/plugin-back-to-top';
3
3
  import { containerPlugin } from '@vuepress/plugin-container';
4
+ import { copyCodePlugin } from '@vuepress/plugin-copy-code';
4
5
  import { externalLinkIconPlugin } from '@vuepress/plugin-external-link-icon';
5
6
  import { gitPlugin } from '@vuepress/plugin-git';
7
+ import { linksCheckPlugin } from '@vuepress/plugin-links-check';
6
8
  import { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom';
7
9
  import { nprogressPlugin } from '@vuepress/plugin-nprogress';
8
10
  import { palettePlugin } from '@vuepress/plugin-palette';
9
11
  import { prismjsPlugin } from '@vuepress/plugin-prismjs';
12
+ import { seoPlugin } from '@vuepress/plugin-seo';
13
+ import { sitemapPlugin } from '@vuepress/plugin-sitemap';
10
14
  import { themeDataPlugin } from '@vuepress/plugin-theme-data';
15
+ import { isPlainObject } from 'vuepress/shared';
11
16
  import { fs, getDirname, path } from 'vuepress/utils';
12
17
  import { assignDefaultLocaleOptions, resolveContainerPluginOptions, } from './utils/index.js';
13
18
  const __dirname = getDirname(import.meta.url);
14
- export const defaultTheme = ({ themePlugins = {}, ...localeOptions } = {}) => {
19
+ export const defaultTheme = ({ hostname, themePlugins = {}, ...localeOptions } = {}) => {
15
20
  assignDefaultLocaleOptions(localeOptions);
16
21
  return {
17
22
  name: '@vuepress/theme-default',
@@ -44,7 +49,17 @@ export const defaultTheme = ({ themePlugins = {}, ...localeOptions } = {}) => {
44
49
  })
45
50
  : [],
46
51
  // @vuepress/plugin-back-to-top
47
- themePlugins.backToTop !== false ? backToTopPlugin() : [],
52
+ themePlugins.backToTop !== false
53
+ ? backToTopPlugin(isPlainObject(themePlugins.backToTop) ? themePlugins.backToTop : {})
54
+ : [],
55
+ // @vuepress/plugin-copy-code
56
+ themePlugins.copyCode !== false
57
+ ? copyCodePlugin({
58
+ ...(isPlainObject(themePlugins.copyCode)
59
+ ? themePlugins.copyCode
60
+ : {}),
61
+ })
62
+ : [],
48
63
  // @vuepress/plugin-container
49
64
  themePlugins.container?.tip !== false
50
65
  ? containerPlugin(resolveContainerPluginOptions(localeOptions, 'tip'))
@@ -95,6 +110,12 @@ export const defaultTheme = ({ themePlugins = {}, ...localeOptions } = {}) => {
95
110
  contributors: localeOptions.contributors !== false,
96
111
  })
97
112
  : [],
113
+ // @vuepress/plugin-links-check
114
+ themePlugins.linksCheck !== false
115
+ ? linksCheckPlugin(isPlainObject(themePlugins.linksCheck)
116
+ ? themePlugins.linksCheck
117
+ : {})
118
+ : [],
98
119
  // @vuepress/plugin-medium-zoom
99
120
  themePlugins.mediumZoom !== false
100
121
  ? mediumZoomPlugin({
@@ -110,6 +131,22 @@ export const defaultTheme = ({ themePlugins = {}, ...localeOptions } = {}) => {
110
131
  palettePlugin({ preset: 'sass' }),
111
132
  // @vuepress/plugin-prismjs
112
133
  themePlugins.prismjs !== false ? prismjsPlugin() : [],
134
+ // @vuepress/plugin-seo
135
+ hostname && themePlugins.seo !== false
136
+ ? seoPlugin({
137
+ hostname,
138
+ ...(isPlainObject(themePlugins.seo) ? themePlugins.seo : {}),
139
+ })
140
+ : [],
141
+ // @vuepress/plugin-sitemap
142
+ hostname && themePlugins.sitemap !== false
143
+ ? sitemapPlugin({
144
+ hostname,
145
+ ...(isPlainObject(themePlugins.sitemap)
146
+ ? themePlugins.sitemap
147
+ : {}),
148
+ })
149
+ : [],
113
150
  // @vuepress/plugin-theme-data
114
151
  themeDataPlugin({ themeData: localeOptions }),
115
152
  ],
@@ -1,5 +1,6 @@
1
1
  import { defaultTheme } from './defaultTheme.js';
2
- export * from '../shared/index.js';
3
2
  export * from './defaultTheme.js';
4
3
  export * from './utils/index.js';
4
+ export type * from '../shared/index.js';
5
+ /** @deprecated Use named export instead */
5
6
  export default defaultTheme;
package/lib/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defaultTheme } from './defaultTheme.js';
2
- export * from '../shared/index.js';
3
2
  export * from './defaultTheme.js';
4
3
  export * from './utils/index.js';
4
+ /** @deprecated Use named export instead */
5
5
  export default defaultTheme;
@@ -35,7 +35,8 @@ export type SidebarGroup = SidebarItem & NavGroup<SidebarItem | SidebarGroup | s
35
35
  collapsible?: boolean;
36
36
  };
37
37
  export type SidebarConfigArray = (SidebarItem | SidebarGroup | string)[];
38
- export type SidebarConfigObject = Record<string, SidebarConfigArray>;
38
+ export type SidebarConfigObjectItem = SidebarConfigArray | 'heading';
39
+ export type SidebarConfigObject = Record<string, SidebarConfigObjectItem>;
39
40
  export type SidebarConfig = SidebarConfigArray | SidebarConfigObject;
40
41
  export type ResolvedSidebarItem = SidebarItem & Partial<NavGroup<ResolvedSidebarItem>> & {
41
42
  collapsible?: boolean;
@@ -1,3 +1,8 @@
1
+ import type { BackToTopPluginOptions } from '@vuepress/plugin-back-to-top';
2
+ import type { CopyCodePluginOptions } from '@vuepress/plugin-copy-code';
3
+ import type { LinksCheckPluginOptions } from '@vuepress/plugin-links-check';
4
+ import type { SeoPluginOptions } from '@vuepress/plugin-seo';
5
+ import type { SitemapPluginOptions } from '@vuepress/plugin-sitemap';
1
6
  import type { ThemeData } from '@vuepress/plugin-theme-data';
2
7
  import type { LocaleData } from 'vuepress/shared';
3
8
  import type { NavbarConfig, SidebarConfig } from './nav.js';
@@ -9,7 +14,7 @@ export interface DefaultThemePluginsOptions {
9
14
  /**
10
15
  * Enable @vuepress/plugin-back-to-top or not
11
16
  */
12
- backToTop?: boolean;
17
+ backToTop?: BackToTopPluginOptions | boolean;
13
18
  /**
14
19
  * Enable @vuepress/plugin-container or not
15
20
  */
@@ -21,6 +26,10 @@ export interface DefaultThemePluginsOptions {
21
26
  codeGroup?: boolean;
22
27
  codeGroupItem?: boolean;
23
28
  };
29
+ /**
30
+ * Enable @vuepress/plugin-copy-code or not
31
+ */
32
+ copyCode?: CopyCodePluginOptions | boolean;
24
33
  /**
25
34
  * Enable @vuepress/plugin-external-link-icon or not
26
35
  */
@@ -29,6 +38,10 @@ export interface DefaultThemePluginsOptions {
29
38
  * Enable @vuepress/plugin-git or not
30
39
  */
31
40
  git?: boolean;
41
+ /**
42
+ * Enable @vuepress/plugin-links-check or not
43
+ */
44
+ linksCheck?: LinksCheckPluginOptions | boolean;
32
45
  /**
33
46
  * Enable @vuepress/plugin-medium-zoom or not
34
47
  */
@@ -41,6 +54,14 @@ export interface DefaultThemePluginsOptions {
41
54
  * Enable @vuepress/plugin-prismjs or not
42
55
  */
43
56
  prismjs?: boolean;
57
+ /**
58
+ * Enable @vuepress/plugin-seo or not
59
+ */
60
+ seo?: Partial<SeoPluginOptions> | boolean;
61
+ /**
62
+ * Enable @vuepress/plugin-sitemap or not
63
+ */
64
+ sitemap?: Partial<SitemapPluginOptions> | boolean;
44
65
  }
45
66
  export type DefaultThemeLocaleOptions = DefaultThemeData;
46
67
  export type DefaultThemeData = ThemeData<DefaultThemeLocaleData>;
@@ -69,6 +90,14 @@ export interface DefaultThemeLocaleData extends LocaleData {
69
90
  * Set to `false` to disable navbar in current locale
70
91
  */
71
92
  navbar?: false | NavbarConfig;
93
+ /**
94
+ * Navbar label used for screen readers using the `aria-label` attribute
95
+ */
96
+ navbarLabel?: null | string;
97
+ /**
98
+ * Page navbar label used for screen readers using the `aria-label` attribute
99
+ */
100
+ pageNavbarLabel?: null | string;
72
101
  /**
73
102
  * Navbar logo config
74
103
  *
@@ -81,6 +110,13 @@ export interface DefaultThemeLocaleData extends LocaleData {
81
110
  * Logo to display in navbar in dark mode
82
111
  */
83
112
  logoDark?: null | string;
113
+ /**
114
+ * The alt text of navbar logo.
115
+ * Defaults to the site title if not specified.
116
+ * If the value is the same as the site title, the site title rendered in the navbar will be
117
+ * hidden from screen readers to avoid duplication.
118
+ */
119
+ logoAlt?: null | string;
84
120
  /**
85
121
  * Navbar repository config
86
122
  *
@@ -240,4 +276,12 @@ export interface DefaultThemeLocaleData extends LocaleData {
240
276
  * A11y text for sidebar toggle button
241
277
  */
242
278
  toggleSidebar?: string;
279
+ /**
280
+ * text for prev link
281
+ */
282
+ prev?: string;
283
+ /**
284
+ * text for next link
285
+ */
286
+ next?: string;
243
287
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/theme-default",
3
- "version": "2.0.0-rc.2",
3
+ "version": "2.0.0-rc.21",
4
4
  "description": "Default theme of VuePress",
5
5
  "keywords": [
6
6
  "vuepress-theme",
@@ -8,13 +8,14 @@
8
8
  "theme",
9
9
  "default"
10
10
  ],
11
- "homepage": "https://github.com/vuepress",
11
+ "homepage": "https://ecosystem.vuejs.press/themes/default/",
12
12
  "bugs": {
13
13
  "url": "https://github.com/vuepress/ecosystem/issues"
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "git+https://github.com/vuepress/ecosystem.git"
17
+ "url": "git+https://github.com/vuepress/ecosystem.git",
18
+ "directory": "themes/theme-default"
18
19
  },
19
20
  "license": "MIT",
20
21
  "author": "meteorlxy",
@@ -37,28 +38,32 @@
37
38
  ],
38
39
  "scripts": {
39
40
  "build": "tsc -b tsconfig.build.json",
40
- "clean": "rimraf lib *.tsbuildinfo",
41
+ "clean": "rimraf --glob ./lib ./*.tsbuildinfo",
41
42
  "copy": "cpx \"src/**/*.{d.ts,vue,scss}\" lib"
42
43
  },
43
44
  "dependencies": {
44
- "@vuepress/plugin-active-header-links": "2.0.0-rc.1",
45
- "@vuepress/plugin-back-to-top": "2.0.0-rc.1",
46
- "@vuepress/plugin-container": "2.0.0-rc.1",
47
- "@vuepress/plugin-external-link-icon": "2.0.0-rc.1",
48
- "@vuepress/plugin-git": "2.0.0-rc.1",
49
- "@vuepress/plugin-medium-zoom": "2.0.0-rc.1",
50
- "@vuepress/plugin-nprogress": "2.0.0-rc.1",
51
- "@vuepress/plugin-palette": "2.0.0-rc.1",
52
- "@vuepress/plugin-prismjs": "2.0.0-rc.1",
53
- "@vuepress/plugin-theme-data": "2.0.0-rc.1",
54
- "@vueuse/core": "^10.7.2",
55
- "sass": "^1.70.0",
56
- "vue": "^3.4.15",
57
- "vue-router": "^4.2.5"
45
+ "@vuepress/helper": "~2.0.0-rc.21",
46
+ "@vuepress/plugin-active-header-links": "~2.0.0-rc.21",
47
+ "@vuepress/plugin-back-to-top": "~2.0.0-rc.21",
48
+ "@vuepress/plugin-container": "~2.0.0-rc.21",
49
+ "@vuepress/plugin-copy-code": "~2.0.0-rc.21",
50
+ "@vuepress/plugin-external-link-icon": "~2.0.0-rc.21",
51
+ "@vuepress/plugin-git": "~2.0.0-rc.21",
52
+ "@vuepress/plugin-links-check": "~2.0.0-rc.21",
53
+ "@vuepress/plugin-medium-zoom": "~2.0.0-rc.21",
54
+ "@vuepress/plugin-nprogress": "~2.0.0-rc.21",
55
+ "@vuepress/plugin-palette": "~2.0.0-rc.21",
56
+ "@vuepress/plugin-prismjs": "~2.0.0-rc.21",
57
+ "@vuepress/plugin-seo": "~2.0.0-rc.21",
58
+ "@vuepress/plugin-sitemap": "~2.0.0-rc.21",
59
+ "@vuepress/plugin-theme-data": "~2.0.0-rc.21",
60
+ "@vueuse/core": "^10.9.0",
61
+ "sass": "^1.72.0",
62
+ "vue": "^3.4.21"
58
63
  },
59
64
  "peerDependencies": {
60
65
  "sass-loader": "^14.0.0",
61
- "vuepress": "2.0.0-rc.2"
66
+ "vuepress": "2.0.0-rc.9"
62
67
  },
63
68
  "peerDependenciesMeta": {
64
69
  "sass-loader": {
@@ -68,5 +73,5 @@
68
73
  "publishConfig": {
69
74
  "access": "public"
70
75
  },
71
- "gitHead": "b61754f1c5f8558457287888e2deea7e112f6eef"
76
+ "gitHead": "014780ab182c15249ac9d27cee31d080f9ac01cd"
72
77
  }