Skip to content

Commit

Permalink
Merge branch 'main' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Pandapip1 committed Apr 22, 2024
2 parents 4c27721 + 0048787 commit 309e6a8
Show file tree
Hide file tree
Showing 101 changed files with 11,338 additions and 3,369 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -15,3 +15,4 @@ examples-temp
node_modules
pnpm-global
TODOs.md
*.timestamp-*.mjs
53 changes: 53 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,56 @@
## [1.1.3](https://github.com/vuejs/vitepress/compare/v1.1.1...v1.1.3) (2024-04-18)

### Bug Fixes

- **build/regression:** markdown backslash escapes not working ([d02d1e9](https://github.com/vuejs/vitepress/commit/d02d1e923aacdb1e8061a3f76af30e8a13518277)), closes [#3808](https://github.com/vuejs/vitepress/issues/3808)

## [1.1.1](https://github.com/vuejs/vitepress/compare/v1.1.0...v1.1.1) (2024-04-18)

### Bug Fixes

- **client:** don't reload page on hash change ([#3777](https://github.com/vuejs/vitepress/issues/3777)) ([74b725a](https://github.com/vuejs/vitepress/commit/74b725a224438ef776fed25ee82274429d94ac83))
- let vue compiler handle entity decoding ([f86ac56](https://github.com/vuejs/vitepress/commit/f86ac56b78da76f3061e6537b897bb13c1ed802d))
- hot updating config file suppresses error logs ([#3592](https://github.com/vuejs/vitepress/issues/3592)) ([cd5adf3](https://github.com/vuejs/vitepress/commit/cd5adf3011d677263c93ce6f8066aaa7870b1dfc))

# [1.1.0](https://github.com/vuejs/vitepress/compare/v1.0.2...v1.1.0) (2024-04-09)

### Bug Fixes

- **client:** hashchange should only be triggered for same page navigations ([#3768](https://github.com/vuejs/vitepress/issues/3768)) ([2a9fc2a](https://github.com/vuejs/vitepress/commit/2a9fc2a26b829bb3f28067ac6f4a41bc1e8b7a1e))
- **client:** emit correct `Event` instance in hashchange event
- **theme:** remove small layout shift on `On this page` button ([#3767](https://github.com/vuejs/vitepress/issues/3767)) ([5f28e74](https://github.com/vuejs/vitepress/commit/5f28e74abfc984cdc7e0d9d9f7b7e15cb2b46923))

### Features

- **client:** add `hash` property to `useData()`
- **theme:** update Inter to version 4 ([#3693](https://github.com/vuejs/vitepress/issues/3693)) ([#3694](https://github.com/vuejs/vitepress/issues/3694)) ([ffafa31](https://github.com/vuejs/vitepress/commit/ffafa31b9204f996f4b819684214fa631c224575))

## [1.0.2](https://github.com/vuejs/vitepress/compare/v1.0.1...v1.0.2) (2024-04-01)

### Bug Fixes

- **theme:** text containing html not showing properly in mobile nav menu ([3c8b4c7](https://github.com/vuejs/vitepress/commit/3c8b4c706051592dd2cca0ae57e293254cbb51ce))

## [1.0.1](https://github.com/vuejs/vitepress/compare/v1.0.0...v1.0.1) (2024-03-22)

### Bug Fixes

- **build:** vendor vue-demi to avoid resolution issues with yarn berry ([#3680](https://github.com/vuejs/vitepress/issues/3680)) ([5d3cb96](https://github.com/vuejs/vitepress/commit/5d3cb96ac364413aa9eb494bc91744bd8f4a2c79))

# [1.0.0](https://github.com/vuejs/vitepress/compare/v1.0.0-rc.45...v1.0.0) (2024-03-21)

### Bug Fixes

- **build:** resolve pattern relative to srcDir instead of root in createContentLoader ([#3638](https://github.com/vuejs/vitepress/issues/3638)) ([59183e9](https://github.com/vuejs/vitepress/commit/59183e9cef112a004c8a8e2b365478af657858b0))
- **localSearch:** remove empty titles that may appear in search results ([#3665](https://github.com/vuejs/vitepress/issues/3665)) ([f7aef3c](https://github.com/vuejs/vitepress/commit/f7aef3ca23dae39e226c85d7bb2579dbf7c758f3))
- **theme:** fixed sidebar expand caret showing when no children are present ([#3657](https://github.com/vuejs/vitepress/issues/3657)) ([e13f932](https://github.com/vuejs/vitepress/commit/e13f93292ce1a2b1d5ba161fddfe947a1824a2b0))
- **theme:** ignore inner-page items in next/prev link ([#3663](https://github.com/vuejs/vitepress/issues/3663)) ([b50a8a1](https://github.com/vuejs/vitepress/commit/b50a8a132577693817a15ab43fc4cc22670a8a65))
- **theme:** local nav separator not visible on pages having no outline ([1909041](https://github.com/vuejs/vitepress/commit/190904171500ad22998c8666080fd58c867a59b5))

### Features

- **theme:** allow selectively disabling external link icon on navbar items ([#3607](https://github.com/vuejs/vitepress/issues/3607)) ([5f6297c](https://github.com/vuejs/vitepress/commit/5f6297cb3df98926154235f31570e75820d4ea16))

# [1.0.0-rc.45](https://github.com/vuejs/vitepress/compare/v1.0.0-rc.44...v1.0.0-rc.45) (2024-03-06)

### Bug Fixes
Expand Down
5 changes: 4 additions & 1 deletion docs/.vitepress/config/index.ts
Expand Up @@ -3,12 +3,15 @@ import { shared } from './shared'
import { en } from './en'
import { zh } from './zh'
import { pt } from './pt'
import { ru } from './ru'

export default defineConfig({
...shared,
locales: {
root: { label: 'English', ...en },
zh: { label: '简体中文', ...zh },
pt: { label: 'Português', ...pt }
pt: { label: 'Português', ...pt },
ru: { label: 'Русский', ...ru },
ko: { label: '한국어', lang: 'ko-KR', link: 'https://vitepress.vuejs.kr/' }
}
})
208 changes: 208 additions & 0 deletions docs/.vitepress/config/ru.ts
@@ -0,0 +1,208 @@
import { createRequire } from 'module'
import { defineConfig, type DefaultTheme } from 'vitepress'

const require = createRequire(import.meta.url)
const pkg = require('vitepress/package.json')

export const ru = defineConfig({
lang: 'ru-RU',
description: 'Генератор статических сайтов на основе Vite и Vue.',

themeConfig: {
nav: nav(),

sidebar: {
'/ru/guide/': { base: '/ru/guide/', items: sidebarGuide() },
'/ru/reference/': { base: '/ru/reference/', items: sidebarReference() }
},

editLink: {
pattern: 'https://github.com/vuejs/vitepress/edit/main/docs/:path',
text: 'Редактировать страницу'
},

footer: {
message: 'Опубликовано под лицензией MIT.',
copyright: '© 2019 – настоящее время, Эван Ю'
},

outline: { label: 'Содержание страницы' },

docFooter: {
prev: 'Предыдущая страница',
next: 'Следующая страница'
},

lastUpdated: {
text: 'Обновлено'
},

darkModeSwitchLabel: 'Оформление',
lightModeSwitchTitle: 'Переключить на светлую тему',
darkModeSwitchTitle: 'Переключить на тёмную тему',
sidebarMenuLabel: 'Меню',
returnToTopLabel: 'Вернуться к началу',
langMenuLabel: 'Изменить язык'
}
})

function nav(): DefaultTheme.NavItem[] {
return [
{
text: 'Руководство',
link: '/ru/guide/what-is-vitepress',
activeMatch: '/ru/guide/'
},
{
text: 'Справочник',
link: '/ru/reference/site-config',
activeMatch: '/ru/reference/'
},
{
text: pkg.version,
items: [
{
text: 'Изменения',
link: 'https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md'
},
{
text: 'Вклад',
link: 'https://github.com/vuejs/vitepress/blob/main/.github/contributing.md'
}
]
}
]
}

function sidebarGuide(): DefaultTheme.SidebarItem[] {
return [
{
text: 'Введение',
collapsed: false,
items: [
{ text: 'Что такое VitePress?', link: 'what-is-vitepress' },
{ text: 'Первые шаги', link: 'getting-started' },
{ text: 'Маршрутизация', link: 'routing' },
{ text: 'Развёртывание', link: 'deploy' }
]
},
{
text: 'Написание',
collapsed: false,
items: [
{ text: 'Расширения Markdown', link: 'markdown' },
{ text: 'Обработка ресурсов', link: 'asset-handling' },
{ text: 'Метаданные', link: 'frontmatter' },
{ text: 'Использование Vue в Markdown', link: 'using-vue' },
{ text: 'Интернационализация', link: 'i18n' }
]
},
{
text: 'Настройка',
collapsed: false,
items: [
{ text: 'Пользовательская тема', link: 'custom-theme' },
{
text: 'Расширение темы по умолчанию',
link: 'extending-default-theme'
},
{
text: 'Загрузка данных в режиме реального времени',
link: 'data-loading'
},
{ text: 'Совместимость с SSR', link: 'ssr-compat' },
{ text: 'Подключение к CMS', link: 'cms' }
]
},
{
text: 'Экспериментально',
collapsed: false,
items: [
{ text: 'Режим MPA', link: 'mpa-mode' },
{ text: 'Генерация карты сайта', link: 'sitemap-generation' }
]
},
{ text: 'Конфигурация и API', base: '/ru/reference/', link: 'site-config' }
]
}

function sidebarReference(): DefaultTheme.SidebarItem[] {
return [
{
text: 'Справочник',
items: [
{ text: 'Конфигурация сайта', link: 'site-config' },
{ text: 'Конфигурация метаданных', link: 'frontmatter-config' },
{ text: 'Runtime API', link: 'runtime-api' },
{ text: 'Командная строка', link: 'cli' },
{
text: 'Тема по умолчанию',
base: '/ru/reference/default-theme-',
items: [
{ text: 'Обзор', link: 'config' },
{ text: 'Навигация', link: 'nav' },
{ text: 'Сайдбар', link: 'sidebar' },
{ text: 'Главная страница', link: 'home-page' },
{ text: 'Подвал', link: 'footer' },
{ text: 'Макет', link: 'layout' },
{ text: 'Значки', link: 'badge' },
{ text: 'Страница команды', link: 'team-page' },
{
text: 'Предыдущая и следующая страницы',
link: 'prev-next-links'
},
{ text: 'Ссылка для редактирования', link: 'edit-link' },
{ text: 'Последнее обновление', link: 'last-updated' },
{ text: 'Поиск', link: 'search' },
{ text: 'Carbon Ads (реклама)', link: 'carbon-ads' }
]
}
]
}
]
}

export const search: DefaultTheme.AlgoliaSearchOptions['locales'] = {
ru: {
placeholder: 'Поиск в документации',
translations: {
button: {
buttonText: 'Поиск',
buttonAriaLabel: 'Поиск'
},
modal: {
searchBox: {
resetButtonTitle: 'Сбросить поиск',
resetButtonAriaLabel: 'Сбросить поиск',
cancelButtonText: 'Отменить поиск',
cancelButtonAriaLabel: 'Отменить поиск'
},
startScreen: {
recentSearchesTitle: 'История поиска',
noRecentSearchesText: 'Нет истории поиска',
saveRecentSearchButtonTitle: 'Сохранить в истории поиска',
removeRecentSearchButtonTitle: 'Удалить из истории поиска',
favoriteSearchesTitle: 'Избранное',
removeFavoriteSearchButtonTitle: 'Удалить из избранного'
},
errorScreen: {
titleText: 'Невозможно получить результаты',
helpText: 'Вам может потребоваться проверить подключение к Интернету'
},
footer: {
selectText: 'выбрать',
navigateText: 'перейти',
closeText: 'закрыть',
searchByText: 'поставщик поиска'
},
noResultsScreen: {
noResultsText: 'Нет результатов для',
suggestedQueryText: 'Вы можете попытаться узнать',
reportMissingResultsText:
'Считаете, что поиск даёт ложные результаты?',
reportMissingResultsLinkText: 'Нажмите на кнопку «Обратная связь»'
}
}
}
}
}
3 changes: 2 additions & 1 deletion docs/.vitepress/config/shared.ts
@@ -1,6 +1,7 @@
import { defineConfig } from 'vitepress'
import { search as zhSearch } from './zh'
import { search as ptSearch } from './pt'
import { search as ruSearch } from './ru'

export const shared = defineConfig({
title: 'VitePress',
Expand Down Expand Up @@ -55,7 +56,7 @@ export const shared = defineConfig({
appId: '8J64VVRP8K',
apiKey: 'a18e2f4cc5665f6602c5631fd868adfd',
indexName: 'vitepress',
locales: { ...zhSearch, ...ptSearch }
locales: { ...zhSearch, ...ptSearch, ...ruSearch }
}
},

Expand Down
48 changes: 48 additions & 0 deletions docs/guide/deploy.md
Expand Up @@ -287,3 +287,51 @@ Refer [Creating and Deploying a VitePress App To Edgio](https://docs.edg.io/guid
### Kinsta Static Site Hosting

You can deploy your Vitepress website on [Kinsta](https://kinsta.com/static-site-hosting/) by following these [instructions](https://kinsta.com/docs/vitepress-static-site-example/).

### Stormkit

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

### Nginx

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`.

```nginx
server {
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
listen 80;
server_name _;
index index.html;
location / {
# content location
root /app;
# exact matches -> reverse clean urls -> folders -> not found
try_files $uri $uri.html $uri/ =404;
# non existent pages
error_page 404 /404.html;
# a folder without index.html raises 403 in this setup
error_page 403 /404.html;
# adjust caching headers
# files in the assets folder have hashes filenames
location ~* ^/assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}
}
```

This configuration assumes that your built VitePress site is located in the `/app` directory on your server. Adjust the `root` directive accordingly if your site's files are located elsewhere.

::: warning Do not default to index.html
The try_files resolution must not default to index.html like in other Vue applications. This would result in an invalid page state.
:::

Further information can be found in the [official nginx documentation](https://nginx.org/en/docs/), in these issues [#2837](https://github.com/vuejs/vitepress/discussions/2837), [#3235](https://github.com/vuejs/vitepress/issues/3235) as well as in this [blog post](https://blog.mehdi.cc/articles/vitepress-cleanurls-on-nginx-environment#readings) by Mehdi Merah.

0 comments on commit 309e6a8

Please sign in to comment.