Skip to content

Commit c6bd913

Browse files
committed
Merge branch 'main' into plugin-demo
2 parents 78afea7 + 375645f commit c6bd913

File tree

268 files changed

+4179
-3113
lines changed

Some content is hidden

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

268 files changed

+4179
-3113
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ node_modules/
2929

3030
# Vitest
3131
tsconfig.vitest-temp.json
32+
33+
# Webstorm
34+
.idea

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
"[markdown]": {
1111
"files.trimTrailingWhitespace": false
1212
},
13+
"editor.codeActionsOnSave": {
14+
"source.fixAll.eslint": "explicit",
15+
"source.fixAll.stylelint": "explicit"
16+
},
17+
"prettier.enable": true,
1318
"typescript.tsdk": "node_modules/typescript/lib",
1419
"eslint.validate": [
1520
"javascript",

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,57 @@
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-rc.67](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.66...v2.0.0-rc.67) (2024-12-16)
7+
8+
### Bug Fixes
9+
10+
- fix define getter ([#304](https://github.com/vuepress/ecosystem/issues/304)) ([a11237c](https://github.com/vuepress/ecosystem/commit/a11237cdc2fdfd286e408e43b0e31251f602b1a6))
11+
12+
### Features
13+
14+
- **plugin-slimsearch:** improve default querySplitter, close [#299](https://github.com/vuepress/ecosystem/issues/299) ([715dde1](https://github.com/vuepress/ecosystem/commit/715dde192c94bad49c5e3b0d5a75743b74f5d097))
15+
16+
# [2.0.0-rc.66](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.65...v2.0.0-rc.66) (2024-12-13)
17+
18+
### Bug Fixes
19+
20+
- **plugin-sass-palette:** fix module injecting ([356e1a2](https://github.com/vuepress/ecosystem/commit/356e1a2b59ee58c8217792cdad2800fc8bfce167))
21+
22+
### Features
23+
24+
- **plugin-pwa:** improve pwa support ([#301](https://github.com/vuepress/ecosystem/issues/301)) ([487d8c4](https://github.com/vuepress/ecosystem/commit/487d8c45a965dee9234e581d95bcc98c1a8cca86))
25+
- **plugin-sass-palette:** support vite6 ([5a081ff](https://github.com/vuepress/ecosystem/commit/5a081fff1d98e137b8ec6f81354d14589950308b))
26+
27+
# [2.0.0-rc.65](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.64...v2.0.0-rc.65) (2024-12-09)
28+
29+
### Bug Fixes
30+
31+
- **helper:** `.sr-only` clip ([#297](https://github.com/vuepress/ecosystem/issues/297)) ([0c79df6](https://github.com/vuepress/ecosystem/commit/0c79df69d29644e78438e2e92cc17773f915b081))
32+
- **plugin-slimsearch:** fix hotkey without suggestions, close [#298](https://github.com/vuepress/ecosystem/issues/298) ([51373fd](https://github.com/vuepress/ecosystem/commit/51373fd00c05b404ec1da09b6f8046680d0c2317))
33+
34+
# [2.0.0-rc.64](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.63...v2.0.0-rc.64) (2024-12-07)
35+
36+
### Bug Fixes
37+
38+
- **plugin-docsearch:** fix broken types, close [#296](https://github.com/vuepress/ecosystem/issues/296) ([9b5f904](https://github.com/vuepress/ecosystem/commit/9b5f90452ebe3d179ead3e3fffe28742a168e590))
39+
- **plugin-theme-data:** fix themeLocaleData type ([dbf0e3d](https://github.com/vuepress/ecosystem/commit/dbf0e3d2292acb411a877b1b04f825d351f0dd6d))
40+
41+
# [2.0.0-rc.63](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.62...v2.0.0-rc.63) (2024-12-06)
42+
43+
**Note:** Version bump only for package @vuepress/ecosystem
44+
45+
# [2.0.0-rc.62](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.61...v2.0.0-rc.62) (2024-12-06)
46+
47+
### Bug Fixes
48+
49+
- **create-vuepress:** prevent navbar overlap in blog template ([#294](https://github.com/vuepress/ecosystem/issues/294)) ([c806fb8](https://github.com/vuepress/ecosystem/commit/c806fb8ecaf582c030a9c8f90de298473495c4a0))
50+
51+
### Features
52+
53+
- **helper:** add sr-only style ([04b856d](https://github.com/vuepress/ecosystem/commit/04b856deffe8beb3e1b6d42e2a760013eafeea55))
54+
- **plugin-git:** improve commits parsing and optimize plugins ([#292](https://github.com/vuepress/ecosystem/issues/292)) ([a0241c4](https://github.com/vuepress/ecosystem/commit/a0241c4292fc7580c2a5a755d44d7f5df0050e54))
55+
- **plugin-markdown-hint:** add plugin exports ([8e2aafe](https://github.com/vuepress/ecosystem/commit/8e2aafe6a2fdd8eec6bd16e50e2b8b41bba62d4c))
56+
657
# [2.0.0-rc.61](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.60...v2.0.0-rc.61) (2024-11-23)
758

859
### Features

commitlint.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { readdirSync, statSync } from 'node:fs'
2-
import { dirname, join } from 'node:path'
3-
import { fileURLToPath } from 'node:url'
2+
import { join } from 'node:path'
3+
import { getDirname } from 'vuepress/utils'
44

5-
const __dirname = dirname(fileURLToPath(import.meta.url))
5+
const __dirname = getDirname(import.meta.url)
66

77
const getSubDirectories = (dir: string): string[] =>
88
readdirSync(dir).filter((item) => statSync(join(dir, item)).isDirectory())

docs/.vuepress/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import process from 'node:process'
22
import { viteBundler } from '@vuepress/bundler-vite'
33
import { webpackBundler } from '@vuepress/bundler-webpack'
4-
import { getRealPath } from '@vuepress/helper'
4+
import { getModulePath } from '@vuepress/helper'
55
import { cachePlugin } from '@vuepress/plugin-cache'
66
import { catalogPlugin } from '@vuepress/plugin-catalog'
77
import { commentPlugin } from '@vuepress/plugin-comment'
@@ -22,7 +22,7 @@ import { getDirname, path } from 'vuepress/utils'
2222
import { head } from './configs/index.js'
2323
import theme from './theme.js'
2424

25-
const __dirname = getDirname(import.meta.url)
25+
const __dirname = import.meta.dirname || getDirname(import.meta.url)
2626

2727
const IS_PROD = process.env.NODE_ENV === 'production'
2828

@@ -61,7 +61,7 @@ export default defineUserConfig({
6161
const realPath = importPath.replace(
6262
packageName,
6363
path.dirname(
64-
getRealPath(`${packageName}/package.json`, import.meta.url),
64+
getModulePath(`${packageName}/package.json`, import.meta),
6565
),
6666
)
6767

docs/.vuepress/configs/head.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ export const head: HeadConfig[] = [
2121
],
2222
['link', { rel: 'manifest', href: '/manifest.webmanifest' }],
2323
['meta', { name: 'application-name', content: 'VuePress' }],
24-
['meta', { name: 'apple-mobile-web-app-title', content: 'VuePress' }],
25-
['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],
2624
[
2725
'link',
2826
{ rel: 'apple-touch-icon', href: `/images/icons/apple-touch-icon.png` },
@@ -35,6 +33,5 @@ export const head: HeadConfig[] = [
3533
color: '#3eaf7c',
3634
},
3735
],
38-
['meta', { name: 'msapplication-TileColor', content: '#3eaf7c' }],
3936
['meta', { name: 'theme-color', content: '#3eaf7c' }],
4037
]

docs/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"docs:serve": "http-server -a localhost .vuepress/dist"
1010
},
1111
"dependencies": {
12-
"@vuepress/bundler-vite": "2.0.0-rc.18",
13-
"@vuepress/bundler-webpack": "2.0.0-rc.18",
12+
"@vuepress/bundler-vite": "2.0.0-rc.19",
13+
"@vuepress/bundler-webpack": "2.0.0-rc.19",
1414
"@vuepress/helper": "workspace:*",
1515
"@vuepress/plugin-back-to-top": "workspace:*",
1616
"@vuepress/plugin-cache": "workspace:*",
@@ -36,11 +36,11 @@
3636
"@vuepress/plugin-search": "workspace:*",
3737
"@vuepress/plugin-shiki": "workspace:*",
3838
"@vuepress/theme-default": "workspace:*",
39-
"katex": "0.16.11",
39+
"katex": "0.16.15",
4040
"mathjax-full": "3.2.2",
41-
"sass-embedded": "1.81.0",
42-
"sass-loader": "^16.0.3",
41+
"sass-embedded": "1.83.0",
42+
"sass-loader": "^16.0.4",
4343
"vue": "^3.5.13",
44-
"vuepress": "2.0.0-rc.18"
44+
"vuepress": "2.0.0-rc.19"
4545
}
4646
}

docs/plugins/features/photo-swipe.md

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,6 @@ In preview mode, you can:
6464
- Default: `true`
6565
- Details: Whether close the current image when scrolling.
6666

67-
### delay
68-
69-
- Type: `number`
70-
- Default: `800`
71-
- Details:
72-
73-
The delay of operating dom, in ms.
74-
75-
::: tip
76-
77-
If the theme you are using has a switching animation, it is recommended to configure this option to `Switch animation duration + 200`.
78-
79-
:::
80-
8167
### locales
8268

8369
- Type: `PhotoSwipePluginLocaleConfig`
@@ -254,32 +240,6 @@ onUnmounted(() => {
254240
</template>
255241
```
256242

257-
`registerPhotoSwipe` allows you to register photoswipe for the given image elements:
258-
259-
```vue
260-
<script setup lang="ts">
261-
import { registerPhotoSwipe } from '@vuepress/plugin-photo-swipe/client'
262-
import { onMounted, onUnmounted } from 'vue'
263-
264-
let destroy: () => null | void = null
265-
266-
onMounted(async () => {
267-
await nextTick()
268-
269-
const images = Array.from(document.querySelectorAll('img'))
270-
271-
// create a new photoswipe instance on image elements
272-
destroy = await registerPhotoSwipe(images, {
273-
// photoswipe options
274-
})
275-
})
276-
277-
onUnmounted(() => {
278-
destroy?.()
279-
})
280-
</script>
281-
```
282-
283243
## Styles
284244

285245
You can customize the style via CSS variables:

docs/plugins/markdown/revealjs/README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ You can enable the following themes in reveal.js via `themes` in plugin options:
110110

111111
For the appearance of each theme, see [Themes demo](themes.md).
112112

113+
::: important Assets Path
114+
115+
Since markdown contents between `@slidestart` and `@slideend` are handled by Reveal.js at browser, so you can only use absolute paths for assets in slides, which must be accessible directly in browser, relative paths or alias are not supported.
116+
117+
:::
118+
113119
## Slide Layout
114120

115121
By default, the plugin registers a layout named `SlidePage` for you to render "a slides page".
@@ -156,12 +162,27 @@ You can enable built-in plugins in reveal.js via `plugins` in plugin options. It
156162

157163
You can also import and call `defineRevealJsConfig` in [client config file][client-config] to customize reveal.js:
158164

165+
The `defineRevealJsConfig` function accepts a ref, getter or plain object as reveal.js options:
166+
159167
```js title=".vuepress/client.js"
160168
import { defineRevealJsConfig } from '@vuepress/plugin-revealjs/client'
161169

162-
defineRevealJsConfig({
163-
// reveal.js options here
170+
// plain object
171+
const options1 = {
172+
// options
173+
}
174+
175+
// or getter
176+
const options2 = () => ({
177+
// options
164178
})
179+
180+
// or ref
181+
const options3 = ref({
182+
// options
183+
})
184+
185+
defineRevealJsConfig(options1or2or3)
165186
```
166187

167188
::: note

docs/plugins/pwa/pwa/config.md

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -146,31 +146,15 @@ Special settings for better supporting Safari, ignoring these options are safe.
146146
- Type: `string`
147147
- Details: Icon link used by Safari.
148148

149-
#### apple.statusBarColor
150-
151-
- Type: `"black" | "white"`
152-
- Default: `"black"`
153-
- Details: Status bar color for Safari
154-
155149
#### apple.maskIcon
156150

157151
- Type: `string`
158152
- Details: Safari mask icon
159153

160-
### msTile
161-
162-
Special settings for Microsoft tiles, ignoring these options are safe.
163-
164-
#### msTile.image
165-
166-
- Type: `string`
167-
- Details: Tile image
168-
169-
#### msTile.color
154+
#### apple.statusBarColor
170155

171-
- Type: `string`
172-
- Default value: `themeColor`
173-
- Details: Tile color
156+
- Type: `'black-translucent' | 'black' | 'default`
157+
- Details: Status bar color for Safari
174158

175159
### foundComponent
176160

0 commit comments

Comments
 (0)