Skip to content

Commit 7cfa82d

Browse files
authored
Merge branch 'main' into main
2 parents c4466b9 + 113d230 commit 7cfa82d

Some content is hidden

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

41 files changed

+326
-84
lines changed

.github/workflows/stale.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: Close stale issues and PRs
22
on:
3+
schedule:
4+
- cron: '0 12 1,15 * *'
35
workflow_dispatch:
46

57
jobs:
68
stale:
79
runs-on: ubuntu-latest
810
steps:
9-
- uses: actions/stale@v9
11+
- uses: actions/stale@v10
1012
with:
1113
days-before-stale: 30
1214
days-before-close: -1

__tests__/e2e/data-loading/data.test.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ describe('static data file support in vite 3', () => {
5252
await page.waitForFunction(
5353
() =>
5454
document.querySelector('pre#basic')?.textContent ===
55-
JSON.stringify([{ a: false }, { b: true }], null, 2),
56-
undefined,
57-
{ timeout: 3000 }
55+
JSON.stringify([{ a: false }, { b: true }], null, 2)
5856
)
5957
} finally {
6058
await fs.writeFile(a, JSON.stringify({ a: true }, null, 2) + '\n')
@@ -67,9 +65,7 @@ describe('static data file support in vite 3', () => {
6765
await page.waitForFunction(
6866
() =>
6967
document.querySelector('pre#basic')?.textContent ===
70-
JSON.stringify([{ a: true }], null, 2),
71-
undefined,
72-
{ timeout: 3000 }
68+
JSON.stringify([{ a: true }], null, 2)
7369
)
7470
err = false
7571
} finally {
@@ -83,9 +79,7 @@ describe('static data file support in vite 3', () => {
8379
await page.waitForFunction(
8480
() =>
8581
document.querySelector('pre#basic')?.textContent ===
86-
JSON.stringify([{ a: true }, { b: false }], null, 2),
87-
undefined,
88-
{ timeout: 3000 }
82+
JSON.stringify([{ a: true }, { b: false }], null, 2)
8983
)
9084
} finally {
9185
await fs.writeFile(b, JSON.stringify({ b: true }, null, 2) + '\n')

docs/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ function nav(): DefaultTheme.NavItem[] {
4242
{
4343
text: pkg.version,
4444
items: [
45+
{
46+
text: '1.6.4',
47+
link: 'https://vuejs.github.io/vitepress/v1/'
48+
},
4549
{
4650
text: 'Changelog',
4751
link: 'https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md'

docs/en/guide/deploy.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ You can deploy your VitePress website on [Kinsta](https://kinsta.com/static-site
294294

295295
You can deploy your VitePress project to [Stormkit](https://www.stormkit.io) by following these [instructions](https://stormkit.io/blog/how-to-deploy-vitepress).
296296

297+
### CloudRay
298+
299+
You can deploy your VitePress project with [CloudRay](https://cloudray.io/) by following these [instructions](https://cloudray.io/articles/how-to-deploy-vitepress-site).
300+
297301
### Nginx
298302

299303
Here is a example of an Nginx server block configuration. This setup includes gzip compression for common text-based assets, rules for serving your VitePress site's static files with proper caching headers as well as handling `cleanUrls: true`.

docs/en/guide/markdown.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export default {
365365

366366
A [list of valid languages](https://shiki.style/languages) is available on Shiki's repository.
367367

368-
You may also customize syntax highlight theme in app config. Please see [`markdown` options](../reference/site-config#markdown) for more details.
368+
You may also customize syntax highlight theme, configure language aliases, and set custom language labels in app config. Please see [`markdown` options](../reference/site-config#markdown) for more details.
369369

370370
## Line Highlighting in Code Blocks
371371

docs/en/reference/default-theme-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ type NavItem = NavItemWithLink | NavItemWithChildren
8989

9090
interface NavItemWithLink {
9191
text: string
92-
link: string
92+
link: string | ((payload: PageData) => string)
9393
activeMatch?: string
9494
target?: string
9595
rel?: string

docs/en/reference/default-theme-nav.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default {
5555

5656
The `text` will be the text displayed in nav, and the `link` is where the text will send you. Always start links with `/` and omit the `.md` suffix when linking to pages.
5757

58-
Nav links can also be dropdown menus. To do this, set the `items` key on the given link option.
58+
Nav links can also be dropdown menus. To do this, set the `items` key on the given link option. The `link` can also be a function that accepts [`PageData`](./runtime-api#usedata) as the argument and returns the path.
5959

6060
```js
6161
export default {

docs/es/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ function nav(): DefaultTheme.NavItem[] {
7373
{
7474
text: pkg.version,
7575
items: [
76+
{
77+
text: '1.6.4',
78+
link: 'https://vuejs.github.io/vitepress/v1/es/'
79+
},
7680
{
7781
text: 'Registro de cambios',
7882
link: 'https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md'

docs/es/reference/default-theme-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ type NavItem = NavItemWithLink | NavItemWithChildren
8989

9090
interface NavItemWithLink {
9191
text: string
92-
link: string
92+
link: string | ((payload: PageData) => string)
9393
activeMatch?: string
9494
target?: string
9595
rel?: string

docs/es/reference/default-theme-nav.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ export default {
5555

5656
`text` es el texto que se muestra en la navegación, y el `link` es el link al que será navegando cuando se hace click en el texto. Para el enlace, establezca la ruta al archivo sin el prefijo `.md` y siempre comenzar por `/`.
5757

58+
El `link` también puede ser una función que acepte [`PageData`](./runtime-api#usedata) como argumento y devuelva la ruta.
59+
5860
Links de navegación también pueden ser menus _dropdown_. Para hacer eso, establezca la clave de `items` en la opción del link.
5961

6062
```js

0 commit comments

Comments
 (0)