`
:::
```
@@ -824,7 +824,7 @@ It also supports selecting a line range:
**Input**
-```md
+```md:line-numbers
# Docs
## Basics
@@ -834,7 +834,7 @@ It also supports selecting a line range:
**Part file** (`parts/basics.md`)
-```md
+```md:line-numbers
Some getting started stuff.
### Configuration
@@ -844,7 +844,7 @@ Can be created using `.foorc.json`.
**Equivalent code**
-```md
+```md:line-numbers
# Docs
## Basics
@@ -860,7 +860,7 @@ You can also use a [VS Code region](https://code.visualstudio.com/docs/editor/co
**Input**
-```md
+```md:line-numbers
# Docs
## Basics
@@ -871,7 +871,7 @@ You can also use a [VS Code region](https://code.visualstudio.com/docs/editor/co
**Part file** (`parts/basics.md`)
-```md
+```md:line-numbers
## Usage Line 1
@@ -883,7 +883,7 @@ You can also use a [VS Code region](https://code.visualstudio.com/docs/editor/co
**Equivalent code**
-```md
+```md:line-numbers
# Docs
## Basics
@@ -897,6 +897,53 @@ You can also use a [VS Code region](https://code.visualstudio.com/docs/editor/co
Note that this does not throw errors if your file is not present. Hence, when using this feature make sure that the contents are being rendered as expected.
:::
+Instead of VS Code regions, you can also use header anchors to include a specific section of the file. For example, if you have a header in your markdown file like this:
+
+```md
+## My Base Section
+
+Some content here.
+
+### My Sub Section
+
+Some more content here.
+
+## Another Section
+
+Content outside `My Base Section`.
+```
+
+You can include the `My Base Section` section like this:
+
+```md
+## My Extended Section
+
+```
+
+**Equivalent code**
+
+```md
+## My Extended Section
+
+Some content here.
+
+### My Sub Section
+
+Some more content here.
+```
+
+Here, `my-base-section` is the generated id of the heading element. In case it's not easily guessable, you can open the part file in your browser and click on the heading anchor (`#` symbol left to the heading when hovered) to see the id in the URL bar. Or use browser dev tools to inspect the element. Alternatively, you can also specify the id to the part file like this:
+
+```md
+## My Base Section {#custom-id}
+```
+
+and include it like this:
+
+```md
+
+```
+
## Math Equations
This is currently opt-in. To enable it, you need to install `markdown-it-mathjax3` and set `markdown.math` to `true` in your config file:
diff --git a/docs/en/guide/using-vue.md b/docs/en/guide/using-vue.md
index 5a82dc75..8420ea7f 100644
--- a/docs/en/guide/using-vue.md
+++ b/docs/en/guide/using-vue.md
@@ -288,4 +288,4 @@ Vue provides IntelliSense support out of the box via the [Vue - Official VS Code
"vue.server.includeLanguages": ["vue", "markdown"]
}
```
-:::
\ No newline at end of file
+:::
diff --git a/docs/en/index.md b/docs/en/index.md
index d65ee07b..c91ce953 100644
--- a/docs/en/index.md
+++ b/docs/en/index.md
@@ -19,7 +19,7 @@ hero:
text: GitHub
link: https://github.com/vuejs/vitepress
image:
- src: /vitepress-logo-large.webp
+ src: /vitepress-logo-large.svg
alt: VitePress
features:
diff --git a/docs/en/reference/default-theme-config.md b/docs/en/reference/default-theme-config.md
index c8afc554..8f71d4af 100644
--- a/docs/en/reference/default-theme-config.md
+++ b/docs/en/reference/default-theme-config.md
@@ -457,3 +457,38 @@ Can be used to customize the label of the skip to content link. This link is sho
- Default: `false`
Whether to show an external link icon next to external links in markdown.
+
+## `useLayout`
+
+Returns layout-related data. The returned object has the following type:
+
+```ts
+interface {
+ isHome: ComputedRef
+
+ sidebar: ComputedRef
+ sidebarGroups: ComputedRef
+ hasSidebar: ComputedRef
+ isSidebarEnabled: ComputedRef
+
+ hasAside: ComputedRef
+ leftAside: ComputedRef
+
+ headers: ShallowRef
+ hasLocalNav: ComputedRef
+}
+```
+
+**Example:**
+
+```vue
+
+
+
+ Only show when sidebar exists
+
+```
diff --git a/docs/en/reference/default-theme-sidebar.md b/docs/en/reference/default-theme-sidebar.md
index 9a64a074..67893cf6 100644
--- a/docs/en/reference/default-theme-sidebar.md
+++ b/docs/en/reference/default-theme-sidebar.md
@@ -180,36 +180,3 @@ export default {
}
}
```
-
-## `useSidebar`
-
-Returns sidebar-related data. The returned object has the following type:
-
-```ts
-export interface DocSidebar {
- isOpen: Ref
- sidebar: ComputedRef
- sidebarGroups: ComputedRef
- hasSidebar: ComputedRef
- hasAside: ComputedRef
- leftAside: ComputedRef
- isSidebarEnabled: ComputedRef
- open: () => void
- close: () => void
- toggle: () => void
-}
-```
-
-**Example:**
-
-```vue
-
-
-
- Only show when sidebar exists
-
-```
diff --git a/docs/en/reference/default-theme-team-page.md b/docs/en/reference/default-theme-team-page.md
index 29b071ff..6c37c6a7 100644
--- a/docs/en/reference/default-theme-team-page.md
+++ b/docs/en/reference/default-theme-team-page.md
@@ -53,12 +53,12 @@ const members = [
Say hello to our awesome team.
-
+
```
The above will display a team member in card looking element. It should display something similar to below.
-
+
`` component comes in 2 different sizes, `small` and `medium`. While it boils down to your preference, usually `small` size should fit better when used in doc page. Also, you may add more properties to each member such as adding "description" or "sponsor" button. Learn more about it in [``](#vpteammembers).
@@ -107,9 +107,7 @@ const members = [
team, some of whom have chosen to be featured below.
-
+
```
diff --git a/docs/en/reference/frontmatter-config.md b/docs/en/reference/frontmatter-config.md
index 955d4ad7..4d6f86c0 100644
--- a/docs/en/reference/frontmatter-config.md
+++ b/docs/en/reference/frontmatter-config.md
@@ -225,3 +225,16 @@ Then you can customize styles of this specific page in `.vitepress/theme/custom.
/* page-specific styles */
}
```
+
+### isHome
+
+- Type: `boolean`
+
+The default theme relies on checks like `frontmatter.layout === 'home'` to determine if the current page is the home page.\
+This is useful when you want to force show the home page elements in a custom layout.
+
+```yaml
+---
+isHome: true
+---
+```
diff --git a/docs/es/guide/deploy.md b/docs/es/guide/deploy.md
index 005f05c9..5d2c9c06 100644
--- a/docs/es/guide/deploy.md
+++ b/docs/es/guide/deploy.md
@@ -163,7 +163,7 @@ No active opciones como _Auto Minify_ para código HTML. Eso removera comentario
- name: Setup Node
uses: actions/setup-node@v4
with:
- node-version: 20
+ node-version: 22
cache: npm # o pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
diff --git a/docs/es/guide/markdown.md b/docs/es/guide/markdown.md
index 174e5752..00f973ed 100644
--- a/docs/es/guide/markdown.md
+++ b/docs/es/guide/markdown.md
@@ -234,7 +234,7 @@ Este es un recipiente especial que puee ser usado para evitar conflictos de esti
```md
::: raw
-Envuelve en un
+Envuelve en un `
`
:::
```
diff --git a/docs/es/guide/using-vue.md b/docs/es/guide/using-vue.md
index 9d18d92d..0131cc76 100644
--- a/docs/es/guide/using-vue.md
+++ b/docs/es/guide/using-vue.md
@@ -286,4 +286,4 @@ Vue ofrece soporte para IntelliSense de forma predeterminada mediante el [Plugin
"vue.server.includeLanguages": ["vue", "markdown"]
}
```
-:::
\ No newline at end of file
+:::
diff --git a/docs/es/index.md b/docs/es/index.md
index 6ced6057..04a4c68f 100644
--- a/docs/es/index.md
+++ b/docs/es/index.md
@@ -19,7 +19,7 @@ hero:
text: GitHub
link: https://github.com/vuejs/vitepress
image:
- src: /vitepress-logo-large.webp
+ src: /vitepress-logo-large.svg
alt: VitePress
features:
diff --git a/docs/es/reference/default-theme-sidebar.md b/docs/es/reference/default-theme-sidebar.md
index 05dd42f3..41cd5cac 100644
--- a/docs/es/reference/default-theme-sidebar.md
+++ b/docs/es/reference/default-theme-sidebar.md
@@ -181,37 +181,3 @@ export default {
}
}
```
-
-## `useSidebar`
-
-Devuelve datos relacionados con la barra lateral. El objeto devuelto tiene el siguiente tipo:
-
-```ts
-export interface DocSidebar {
- isOpen: Ref
- sidebar: ComputedRef
- sidebarGroups: ComputedRef
- hasSidebar: ComputedRef
- hasAside: ComputedRef
- leftAside: ComputedRef
- isSidebarEnabled: ComputedRef
- open: () => void
- close: () => void
- toggle: () => void
-}
-```
-
-**Exemplo:**
-
-```vue
-
-
-
- Sólo visible cuando existe la barra lateral
-
-
-```
diff --git a/docs/es/reference/default-theme-team-page.md b/docs/es/reference/default-theme-team-page.md
index 1f6492a8..996e8f18 100644
--- a/docs/es/reference/default-theme-team-page.md
+++ b/docs/es/reference/default-theme-team-page.md
@@ -53,12 +53,12 @@ const members = [
Saluda a nuestro increible equipo.
-
+
```
El código anterior mostrará a un miembro del equipo en un elemento similar a una tarjeta. Debería mostrar algo similar a lo siguiente.
-
+
El componente `` viene en dos tamaños diferentes, pequeño `small` y médio `medium`. Si bien es una cuestión de preferencia, generalmente el tamaño `small` debería encajar mejor cuando se use en la página del documento. Además, puede agregar más propiedades a cada miembro, como agregar el botón "descripción" o "patrocinador". Obtenga más información sobre en [``](#vpteammembers).
@@ -107,9 +107,7 @@ const members = [
Algunos de los miembros han elegido aparecer a continuación.
-
+
```
diff --git a/docs/fa/guide/asset-handling.md b/docs/fa/guide/asset-handling.md
index 94554217..efa4710f 100644
--- a/docs/fa/guide/asset-handling.md
+++ b/docs/fa/guide/asset-handling.md
@@ -60,4 +60,4 @@ const { theme } = useData()
-```
\ No newline at end of file
+```
diff --git a/docs/fa/guide/deploy.md b/docs/fa/guide/deploy.md
index dcc74f69..1b89f334 100644
--- a/docs/fa/guide/deploy.md
+++ b/docs/fa/guide/deploy.md
@@ -161,7 +161,7 @@ Cache-Control: max-age=31536000,immutable
- name: Setup Node
uses: actions/setup-node@v4
with:
- node-version: 20
+ node-version: 22
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
diff --git a/docs/fa/guide/frontmatter.md b/docs/fa/guide/frontmatter.md
index 7f748b1e..4b4af163 100644
--- a/docs/fa/guide/frontmatter.md
+++ b/docs/fa/guide/frontmatter.md
@@ -45,4 +45,4 @@ editLink: true
"editLink": true
}
---
-```
\ No newline at end of file
+```
diff --git a/docs/fa/guide/markdown.md b/docs/fa/guide/markdown.md
index 862fe7a0..1d2ca9f9 100644
--- a/docs/fa/guide/markdown.md
+++ b/docs/fa/guide/markdown.md
@@ -233,7 +233,7 @@ export default defineConfig({
```md
::: raw
-بستهبندی در یک
+بستهبندی در یک `
`
:::
```
diff --git a/docs/fa/guide/migration-from-vitepress-0.md b/docs/fa/guide/migration-from-vitepress-0.md
index 8a1380df..211bb0f9 100644
--- a/docs/fa/guide/migration-from-vitepress-0.md
+++ b/docs/fa/guide/migration-from-vitepress-0.md
@@ -20,4 +20,4 @@
## پیکربندی Frontmatter
- گزینه `home: true` به `layout: home` تغییر کرده است. همچنین، تنظیمات مربوط به صفحه اصلی بسیار تغییر کردهاند تا ویژگیهای اضافی را ارائه دهند. برای جزئیات بیشتر، [راهنمای صفحه اصلی](../reference/default-theme-home-page) را ببینید.
-- گزینه `footer` به [`themeConfig.footer`](../reference/default-theme-config#footer) منتقل شده است.
\ No newline at end of file
+- گزینه `footer` به [`themeConfig.footer`](../reference/default-theme-config#footer) منتقل شده است.
diff --git a/docs/fa/guide/migration-from-vuepress.md b/docs/fa/guide/migration-from-vuepress.md
index a7f8fbc8..536a37c5 100644
--- a/docs/fa/guide/migration-from-vuepress.md
+++ b/docs/fa/guide/migration-from-vuepress.md
@@ -27,4 +27,4 @@
---
-ادامه دارد...
\ No newline at end of file
+ادامه دارد...
diff --git a/docs/fa/guide/mpa-mode.md b/docs/fa/guide/mpa-mode.md
index 9e08e7b3..a18bb1c2 100644
--- a/docs/fa/guide/mpa-mode.md
+++ b/docs/fa/guide/mpa-mode.md
@@ -20,4 +20,4 @@ document.querySelector('h1').addEventListener('click', () => {
`
-
-
- فقط ن
-
-مایش داده شود زمانی که نوار کناری وجود دارد
-
-```
\ No newline at end of file
diff --git a/docs/fa/reference/default-theme-team-page.md b/docs/fa/reference/default-theme-team-page.md
index ccd9738d..57fc2814 100644
--- a/docs/fa/reference/default-theme-team-page.md
+++ b/docs/fa/reference/default-theme-team-page.md
@@ -53,12 +53,12 @@ const members = [
با سلام به تیم فوقالعادهی ما خوش آمدید.
-
+
```
بالا به صورت عنصری با شکل کارتی اعضای تیم را نمایش میدهد. باید به شکل زیر نمایش داده شود.
-
+
کامپوننت `
` دارای دو اندازه مختلف، `small` و `medium` است. معمولاً اندازه `small` برای استفاده در صفحات مستندات مناسبتر است. همچنین میتوانید ویژگیهای بیشتری برای هر عضو اضافه کنید مانند "توضیحات" یا "دکمه حامی". جهت کسب اطلاعات بیشتر به [``](#vpteammembers) مراجعه کنید.
@@ -106,9 +106,7 @@ const members = [
توسعه ویتپرس توسط تیمی بینالمللی راهنمایی میشود، برخی از اعضا که انتخاب کردهاند تا در زیر نمایش داده شوند.
-
+
```
diff --git a/docs/fa/reference/runtime-api.md b/docs/fa/reference/runtime-api.md
index 31059ef1..67e076cd 100644
--- a/docs/fa/reference/runtime-api.md
+++ b/docs/fa/reference/runtime-api.md
@@ -165,4 +165,4 @@ title: سلام
```md
- نام بسته: {{ $params.pkg }}
- نسخه: {{ $params.version }}
-```
\ No newline at end of file
+```
diff --git a/docs/fa/reference/site-config.md b/docs/fa/reference/site-config.md
index 0585f5c2..72343ffa 100644
--- a/docs/fa/reference/site-config.md
+++ b/docs/fa/reference/site-config.md
@@ -723,4 +723,4 @@ export default {
interface TransformPageContext {
siteConfig: SiteConfig
}
-```
\ No newline at end of file
+```
diff --git a/docs/ko/guide/deploy.md b/docs/ko/guide/deploy.md
index 797015da..7a57a8ad 100644
--- a/docs/ko/guide/deploy.md
+++ b/docs/ko/guide/deploy.md
@@ -162,7 +162,7 @@ HTML 코드에 대해 _Auto Minify_ 옵션을 활성화하지 마세요. 이는
- name: Setup Node
uses: actions/setup-node@v4
with:
- node-version: 20
+ node-version: 22
cache: npm # 또는 pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
diff --git a/docs/ko/guide/markdown.md b/docs/ko/guide/markdown.md
index 0e12ff65..5f03bbf6 100644
--- a/docs/ko/guide/markdown.md
+++ b/docs/ko/guide/markdown.md
@@ -233,7 +233,7 @@ export default defineConfig({
```md
::: raw
-로 감쌉니다
+`
`로 감쌉니다
:::
```
diff --git a/docs/ko/index.md b/docs/ko/index.md
index 6a16ff49..3ddaa07d 100644
--- a/docs/ko/index.md
+++ b/docs/ko/index.md
@@ -19,7 +19,7 @@ hero:
text: GitHub
link: https://github.com/vuejs/vitepress
image:
- src: /vitepress-logo-large.webp
+ src: /vitepress-logo-large.svg
alt: VitePress
features:
diff --git a/docs/ko/reference/default-theme-sidebar.md b/docs/ko/reference/default-theme-sidebar.md
index 21e19ccc..8e4709cd 100644
--- a/docs/ko/reference/default-theme-sidebar.md
+++ b/docs/ko/reference/default-theme-sidebar.md
@@ -180,36 +180,3 @@ export default {
}
}
```
-
-## `useSidebar`
-
-사이드바 관련 데이터를 반환합니다. 반환된 객체는 다음과 같은 타입을 가집니다:
-
-```ts
-export interface DocSidebar {
- isOpen: Ref
- sidebar: ComputedRef
- sidebarGroups: ComputedRef
- hasSidebar: ComputedRef
- hasAside: ComputedRef
- leftAside: ComputedRef
- isSidebarEnabled: ComputedRef
- open: () => void
- close: () => void
- toggle: () => void
-}
-```
-
-**예제:**
-
-```vue
-
-
-
- 사이드바가 있을 때만 보여줍니다
-
-```
diff --git a/docs/ko/reference/default-theme-team-page.md b/docs/ko/reference/default-theme-team-page.md
index 2123f349..b4fddb0f 100644
--- a/docs/ko/reference/default-theme-team-page.md
+++ b/docs/ko/reference/default-theme-team-page.md
@@ -53,12 +53,12 @@ const members = [
Say hello to our awesome team.
-
+
```
위 코드는 카드 형태의 엘리먼트로 팀 구성원을 표시합니다. 아래와 비슷한 형태로 표시됩니다.
-
+
`` 컴포넌트는 `small`과 `medium` 두 가지 크기로 제공됩니다. 개인의 선호도에 따라 선택할 수 있지만, 일반적으로 `small` 사이즈가 문서 페이지에 더 적합합니다. 또한, 각 구성원에 "설명"이나 "후원" 버튼과 같은 프로퍼티를 추가할 수도 있습니다. 자세한 내용은 [``](#vpteammembers)에서 확인할 수 있습니다.
@@ -107,9 +107,7 @@ const members = [
team, some of whom have chosen to be featured below.
-
+
```
diff --git a/docs/package.json b/docs/package.json
index d3cc0755..18ffeb9c 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -15,6 +15,6 @@
"open-cli": "^8.0.0",
"postcss-rtlcss": "^5.6.0",
"vitepress": "workspace:*",
- "vitepress-plugin-group-icons": "^1.3.5"
+ "vitepress-plugin-group-icons": "^1.3.8"
}
}
diff --git a/docs/pt/guide/deploy.md b/docs/pt/guide/deploy.md
index 9a03631b..b112bf7d 100644
--- a/docs/pt/guide/deploy.md
+++ b/docs/pt/guide/deploy.md
@@ -163,7 +163,7 @@ Não ative opções como _Auto Minify_ para código HTML. Isso removerá coment
- name: Setup Node
uses: actions/setup-node@v4
with:
- node-version: 20
+ node-version: 22
cache: npm # ou pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
diff --git a/docs/pt/guide/markdown.md b/docs/pt/guide/markdown.md
index 25f03482..b5245259 100644
--- a/docs/pt/guide/markdown.md
+++ b/docs/pt/guide/markdown.md
@@ -233,7 +233,7 @@ Este é um recipiente especial que pode ser usado para evitar conflitos de estil
```md
::: raw
-Envolve em um
+Envolve em um `
`
:::
```
diff --git a/docs/pt/index.md b/docs/pt/index.md
index fccf03a0..71fff26b 100644
--- a/docs/pt/index.md
+++ b/docs/pt/index.md
@@ -19,7 +19,7 @@ hero:
text: GitHub
link: https://github.com/vuejs/vitepress
image:
- src: /vitepress-logo-large.webp
+ src: /vitepress-logo-large.svg
alt: VitePress
features:
diff --git a/docs/pt/reference/default-theme-sidebar.md b/docs/pt/reference/default-theme-sidebar.md
index 62c3b3b1..0d8baf8d 100644
--- a/docs/pt/reference/default-theme-sidebar.md
+++ b/docs/pt/reference/default-theme-sidebar.md
@@ -180,36 +180,3 @@ export default {
}
}
```
-
-## `useSidebar`
-
-Retorna dados relacionados à barra lateral. O objeto retornado tem o seguinte tipo:
-
-```ts
-export interface DocSidebar {
- isOpen: Ref
- sidebar: ComputedRef
- sidebarGroups: ComputedRef
- hasSidebar: ComputedRef
- hasAside: ComputedRef
- leftAside: ComputedRef
- isSidebarEnabled: ComputedRef
- open: () => void
- close: () => void
- toggle: () => void
-}
-```
-
-**Exemplo:**
-
-```vue
-
-
-
- Visível apenas quando a barra lateral existe
-
-```
diff --git a/docs/pt/reference/default-theme-team-page.md b/docs/pt/reference/default-theme-team-page.md
index 1daa47a5..32a9db0d 100644
--- a/docs/pt/reference/default-theme-team-page.md
+++ b/docs/pt/reference/default-theme-team-page.md
@@ -53,12 +53,12 @@ const members = [
Diga olá à nossa equipe incrível.
-
+
```
O código acima exibirá um membro da equipe em um elemento tipo cartão. Ele deve exibir algo semelhante ao abaixo.
-
+
O componente `` vem em 2 tamanhos diferentes, pequeno `small` e médio `medium`. Enquanto é uma questão de preferência, geralmente o tamanho `small` deve encaixar melhor quando usado na página de documento. Além disso, você pode adicionar mais propriedades a cada membro, como adicionar o botão "descrição" ou "patrocinador". Saiba mais sobre em [``](#vpteammembers).
@@ -107,9 +107,7 @@ const members = [
alguns dos membros escolheram ser apresentados abaixo.
-
+
```
diff --git a/docs/public/vitepress-logo-large.svg b/docs/public/vitepress-logo-large.svg
new file mode 120000
index 00000000..59e331aa
--- /dev/null
+++ b/docs/public/vitepress-logo-large.svg
@@ -0,0 +1 @@
+../../art/vitepress-logo.svg
\ No newline at end of file
diff --git a/docs/public/vitepress-logo-mini.svg b/docs/public/vitepress-logo-mini.svg
deleted file mode 100644
index 47756f7a..00000000
--- a/docs/public/vitepress-logo-mini.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-
diff --git a/docs/public/vitepress-logo-mini.svg b/docs/public/vitepress-logo-mini.svg
new file mode 120000
index 00000000..f7c9b3af
--- /dev/null
+++ b/docs/public/vitepress-logo-mini.svg
@@ -0,0 +1 @@
+../../art/vitepress-logo-mini.svg
\ No newline at end of file
diff --git a/docs/ru/guide/deploy.md b/docs/ru/guide/deploy.md
index 0de4fbe0..ff12be6c 100644
--- a/docs/ru/guide/deploy.md
+++ b/docs/ru/guide/deploy.md
@@ -111,7 +111,7 @@ Cache-Control: max-age=31536000,immutable
- **Build Command:** `npm run docs:build`
- **Output Directory:** `docs/.vitepress/dist`
-- **Node Version:** `18` (или выше)
+- **Node Version:** `20` (или выше)
::: warning ПРЕДУПРЕЖДЕНИЕ
Не включайте такие опции, как _Auto Minify_ для HTML-кода. Он удалит из вывода комментарии, которые имеют значение для Vue. При их удалении могут возникать ошибки несоответствия гидратации.
@@ -163,7 +163,7 @@ Cache-Control: max-age=31536000,immutable
- name: Setup Node
uses: actions/setup-node@v4
with:
- node-version: 20
+ node-version: 22
cache: npm # или pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
diff --git a/docs/ru/guide/extending-default-theme.md b/docs/ru/guide/extending-default-theme.md
index d3e5fe8f..a8f0acc7 100644
--- a/docs/ru/guide/extending-default-theme.md
+++ b/docs/ru/guide/extending-default-theme.md
@@ -123,7 +123,7 @@ export default {
## Слоты макета {#layout-slots}
-Компонент `` темы по умолчанию имеет несколько слотов, которые можно использовать для вставки содержимого в определённые места страницы. Вот пример внедрения компонента в структуру before:
+Компонент `` темы по умолчанию имеет несколько слотов, которые можно использовать для вставки содержимого в определённые места страницы. Вот пример внедрения компонента перед оглавлением:
```js [.vitepress/theme/index.js]
import DefaultTheme from 'vitepress/theme'
@@ -131,8 +131,8 @@ import MyLayout from './MyLayout.vue'
export default {
extends: DefaultTheme,
- // переопределяем макет с помощью компонента-обёртки, который
- // вводит слоты
+ // переопределяем макет с помощью компонента-обёртки,
+ // который внедряет слоты
Layout: MyLayout
}
```
@@ -147,7 +147,7 @@ const { Layout } = DefaultTheme
- Верхнее содержимое моей пользовательской боковой панели
+ Мой пользовательский контент в верхней части боковой панели
diff --git a/docs/ru/guide/i18n.md b/docs/ru/guide/i18n.md
index d698f030..b982eece 100644
--- a/docs/ru/guide/i18n.md
+++ b/docs/ru/guide/i18n.md
@@ -27,7 +27,7 @@ export default defineConfig({
ru: {
label: 'Русский',
lang: 'ru', // необязательный, будет добавлен как атрибут `lang` в тег `html`
- link: '/ru/guide' // по умолчанию /ru/ -- отображается в меню переводов на панели навигации, может быть внешним
+ link: '/ru/guide' // по умолчанию /ru/ -- ссылка в меню переводов на панели навигации, может быть внешней
// другие свойства, специфичные для локали...
}
diff --git a/docs/ru/guide/markdown.md b/docs/ru/guide/markdown.md
index a84fd0f6..b67e1355 100644
--- a/docs/ru/guide/markdown.md
+++ b/docs/ru/guide/markdown.md
@@ -259,7 +259,7 @@ console.log('Привет, VitePress!')
```md
::: raw
-Заворачивается в
+Заворачивается в `
`
:::
```
@@ -844,7 +844,7 @@ export default config
Может быть создана с помощью `.foorc.json`.
```
-**Эквивалентный код**
+**Соответствующий код**
```md
# Документация
@@ -883,7 +883,7 @@ export default config
```
-**Эквивалентный код**
+**Соответствующий код**
```md
# Документация
@@ -899,6 +899,53 @@ export default config
Обратите внимание, что это не приводит к ошибкам, если ваш файл отсутствует. Поэтому при использовании этой функции убедитесь, что содержимое отображается так, как ожидается.
:::
+Вместо регионов VS Code вы также можете использовать якоря заголовков, чтобы включить определённый раздел файла. Например, если у вас есть заголовок в вашем markdown-файле, например:
+
+```md
+## Мой основной раздел
+
+Какой-то контент здесь.
+
+### Мой подраздел
+
+Ещё немного контента здесь.
+
+## Другой раздел
+
+Контент вне `Моего основного раздела`.
+```
+
+Вы можете включить раздел `Мой основной раздел` следующим образом:
+
+```md
+## Мой дополнительный раздел
+
+```
+
+**Соответствующий код**
+
+```md
+## Мой дополнительный раздел
+
+Какой-то контент здесь.
+
+### Мой подраздел
+
+Ещё немного контента здесь.
+```
+
+Здесь `мои-основнои-раздел` — это сгенерированный идентификатор элемента заголовка. Если его нелегко угадать, вы можете открыть файл в браузере и нажать на якорь заголовка (символ `#` слева от заголовка при наведении), чтобы увидеть идентификатор в адресной строке. Или используйте инструменты разработчика браузера для проверки элемента. Кроме того, вы также можете указать идентификатор для файла части следующим образом:
+
+```md
+## Мой основной раздел {#custom-id}
+```
+
+и включить его следующим образом:
+
+```md
+
+```
+
## Математические уравнения {#math-equations}
В настоящее время эта фича предоставляется по желанию. Чтобы включить её, вам нужно установить `markdown-it-mathjax3` и установить значение `true` для опции `markdown.math` в вашем файле конфигурации:
diff --git a/docs/ru/guide/using-vue.md b/docs/ru/guide/using-vue.md
index 8b6051aa..e031c3f7 100644
--- a/docs/ru/guide/using-vue.md
+++ b/docs/ru/guide/using-vue.md
@@ -148,13 +148,13 @@ HTML, обёрнутый `
`, будет отображаться как е
**Разметка**
```md
-Это {{ будет отображаться как есть}}.
+Это {{ будет отображаться как есть }}.
```
**Результат**
-
Это {{ будет отображаться как есть}}
+
Это {{ будет отображаться как есть }}
В качестве альтернативы вы можете обернуть весь абзац в пользовательский контейнер `v-pre`:
@@ -175,7 +175,7 @@ HTML, обёрнутый ``, будет отображаться как е
-## Unescape в блоках кода {#unescape-in-code-blocks}
+## Отключение экранирования в блоках кода {#unescape-in-code-blocks}
По умолчанию все изолированные блоки кода автоматически оборачиваются `v-pre`, поэтому внутри них не будет обрабатываться синтаксис Vue. Чтобы включить интерполяцию в стиле Vue внутри фигурных скобок, можно добавить к языку суффикс `-vue`, например `js-vue`:
@@ -199,7 +199,9 @@ HTML, обёрнутый `
`, будет отображаться как е
VitePress имеет [встроенную поддержку](https://vitejs.dev/guide/features.html#css-pre-processors) для препроцессоров CSS: файлы `.scss`, `.sass`, `.less`, `.styl` и `.stylus`. Для них не нужно устанавливать специфические для Vite плагины, но сам соответствующий препроцессор должен быть установлен:
-```
+::: code-group
+
+```sh [npm]
# .scss и .sass
npm install -D sass
@@ -210,7 +212,41 @@ npm install -D less
npm install -D stylus
```
-Затем вы можете использовать следующее в Markdown и компонентах темы:
+```sh [pnpm]
+# .scss и .sass
+pnpm add -D sass
+
+# .less
+pnpm add -D less
+
+# .styl и .stylus
+pnpm add -D stylus
+```
+
+```sh [yarn]
+# .scss и .sass
+yarn add -D sass
+
+# .less
+yarn add -D less
+
+# .styl и .stylus
+yarn add -D stylus
+```
+
+```sh [bun]
+# .scss и .sass
+bun add -D sass
+
+# .less
+bun add -D less
+
+# .styl и .stylus
+bun add -D stylus
+```
+:::
+
+Затем вы можете использовать соответствующий атрибут `lang` в Markdown и компонентах темы:
```vue