Skip to content

Commit

Permalink
Merge branch 'main' into theme-hope
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Feb 6, 2024
2 parents fcf8475 + deb5598 commit c21de39
Show file tree
Hide file tree
Showing 18 changed files with 344 additions and 339 deletions.
4 changes: 0 additions & 4 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ icon: bi:terminal-fill

# Command Line Interface

<NpmBadge package="@vuepress/cli" />

VuePress CLI is provided by [@vuepress/cli](https://www.npmjs.com/package/@vuepress/cli) package. It is included by the [vuepress](https://www.npmjs.com/package/vuepress) package, and you can also install it separately.

Run `vuepress --help` to get following help messages:

```
Expand Down
31 changes: 28 additions & 3 deletions docs/reference/client-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,37 @@ icon: fa6-brands:chrome

# Client API

<NpmBadge package="@vuepress/client" />

Client API is provided by [@vuepress/client](https://www.npmjs.com/package/@vuepress/client) package, which is also available as `vuepress/client`.
Client API can be imported from `vuepress/client`.

## Composition API

### useClientData

- Details:

Returns all the client data ref objects.

Each property can also be accessed by the following composition APIs.

- Example:

```vue
<script setup lang="ts">
import { useClientData } from 'vuepress/client'
const {
pageData,
pageFrontmatter,
pageHead,
pageHeadTitle,
pageLang,
routeLocale,
siteData,
siteLocaleData,
} = useClientData()
</script>
```

### usePageData

- Details:
Expand Down
2 changes: 0 additions & 2 deletions docs/reference/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ icon: fa6-solid:puzzle-piece

# Built-in Components

<NpmBadge package="@vuepress/client" />

## ClientOnly

- Usage:
Expand Down
3 changes: 0 additions & 3 deletions docs/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ icon: fa6-solid:gear

# Config

<NpmBadge package="@vuepress/cli" />
<NpmBadge package="@vuepress/core" />

## Site Config

### base
Expand Down
3 changes: 0 additions & 3 deletions docs/reference/frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ icon: fa-solid:bars

# Frontmatter

<NpmBadge package="@vuepress/client" />
<NpmBadge package="@vuepress/markdown" />

## date

- Type: `string`
Expand Down
4 changes: 1 addition & 3 deletions docs/reference/node-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ icon: fa6-brands:node-js

# Node API

<NpmBadge package="@vuepress/core" />

Node API is provided by [@vuepress/core](https://www.npmjs.com/package/@vuepress/core) package, which is also available as `vuepress/core`.
Node API can be imported from `vuepress/core`.

## App

Expand Down
4 changes: 1 addition & 3 deletions docs/reference/plugin-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ icon: fa6-solid:plug

# Plugin API

<NpmBadge package="@vuepress/core" />

Plugin API is supported by [@vuepress/core](https://www.npmjs.com/package/@vuepress/core) package. You could check out [Node API](./node-api.md) for how to use the VuePress app instance in plugin hooks.
You could check out [Node API](./node-api.md) for how to use the VuePress app instance in plugin hooks.

## Overview

Expand Down
4 changes: 1 addition & 3 deletions docs/reference/theme-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ icon: fa6-solid:palette

# Theme API

<NpmBadge package="@vuepress/core" />

VuePress theme also works as a plugin, so Theme API can accept all the options of [Plugin API](./plugin-api.md) with following differences.
A VuePress theme also works as a plugin, so Theme API can accept all the options of [Plugin API](./plugin-api.md) with following differences.

## Basic Options

Expand Down
4 changes: 0 additions & 4 deletions docs/zh/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ icon: bi:terminal-fill

# 命令行接口

<NpmBadge package="@vuepress/cli" />

VuePress 命令行接口是由 [@vuepress/cli](https://www.npmjs.com/package/@vuepress/cli) 包提供的。它包含在 [vuepress](https://www.npmjs.com/package/vuepress) 包之中,当然你也可以单独安装它。

执行 `vuepress --help` 来获取下列帮助信息:

```
Expand Down
31 changes: 28 additions & 3 deletions docs/zh/reference/client-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,36 @@ icon: fa6-brands:chrome

# 客户端 API

<NpmBadge package="@vuepress/client" />
客户端 API 可以通过 `vuepress/client` 来引入。

客户端 API 是由 [@vuepress/client](https://www.npmjs.com/package/@vuepress/client) Package 提供的,同时也可以通过 `vuepress/client` 来引入。
## 组合式 API

## Composition API
### useClientData

- 详情:

返回所有客户端数据的 Ref 对象。

每个属性也可以通过下列的组合式 API 来访问。

- 示例:

```vue
<script setup lang="ts">
import { useClientData } from 'vuepress/client'
const {
pageData,
pageFrontmatter,
pageHead,
pageHeadTitle,
pageLang,
routeLocale,
siteData,
siteLocaleData,
} = useClientData()
</script>
```

### usePageData

Expand Down
2 changes: 0 additions & 2 deletions docs/zh/reference/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ icon: fa6-solid:puzzle-piece

# 内置组件

<NpmBadge package="@vuepress/client" />

## ClientOnly

- 使用:
Expand Down
3 changes: 0 additions & 3 deletions docs/zh/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ icon: fa6-solid:gear

# 配置

<NpmBadge package="@vuepress/cli" />
<NpmBadge package="@vuepress/core" />

## 站点配置

### base
Expand Down
3 changes: 0 additions & 3 deletions docs/zh/reference/frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ icon: fa-solid:bars

# Frontmatter

<NpmBadge package="@vuepress/client" />
<NpmBadge package="@vuepress/markdown" />

## date

- 类型: `string`
Expand Down
4 changes: 1 addition & 3 deletions docs/zh/reference/node-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ icon: fa6-brands:node-js

# Node API

<NpmBadge package="@vuepress/core" />

Node API 是由 [@vuepress/core](https://www.npmjs.com/package/@vuepress/core) 包提供的,同时也可以通过 `vuepress/core` 来引入。
Node API 可以通过 `vuepress/core` 来引入。

## App

Expand Down
4 changes: 1 addition & 3 deletions docs/zh/reference/plugin-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ icon: fa6-solid:plug

# 插件 API

<NpmBadge package="@vuepress/core" />

插件 API 是由 [@vuepress/core](https://www.npmjs.com/package/@vuepress/core) 包支持的。你可以查看 [Node API](./node-api.md) 来了解如何使用插件 Hooks 中的 VuePress App 实例。
你可以查看 [Node API](./node-api.md) 来了解如何使用插件 Hooks 中的 VuePress App 实例。

## 概览

Expand Down
2 changes: 0 additions & 2 deletions docs/zh/reference/theme-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ icon: fa6-solid:palette

# 主题 API

<NpmBadge package="@vuepress/core" />

VuePress 主题同样是一个插件,因此主题 API 可以接收 [插件 API](./plugin-api.md) 的所有选项,但存在以下差别:

## 基础配置项
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuepress/docs",
"version": "2.0.0-rc.2",
"version": "2.0.0-rc.3",
"private": true,
"type": "module",
"scripts": {
Expand All @@ -26,18 +26,18 @@
},
"prettier": "prettier-config-vuepress",
"dependencies": {
"@vuepress/bundler-vite": "2.0.0-rc.6",
"@vuepress/bundler-webpack": "2.0.0-rc.6",
"@vuepress/plugin-docsearch": "2.0.0-rc.11",
"@vuepress/plugin-google-analytics": "2.0.0-rc.11",
"@vuepress/plugin-register-components": "2.0.0-rc.11",
"@vuepress/plugin-shiki": "2.0.0-rc.11",
"@vuepress/theme-default": "2.0.0-rc.11",
"@vuepress/bundler-vite": "2.0.0-rc.7",
"@vuepress/bundler-webpack": "2.0.0-rc.7",
"@vuepress/plugin-docsearch": "2.0.0-rc.12",
"@vuepress/plugin-google-analytics": "2.0.0-rc.12",
"@vuepress/plugin-register-components": "2.0.0-rc.12",
"@vuepress/plugin-shiki": "2.0.0-rc.12",
"@vuepress/theme-default": "2.0.0-rc.12",
"anywhere": "^1.6.0",
"sass-loader": "^14.1.0",
"vue": "^3.4.15",
"vuepress": "2.0.0-rc.6",
"vuepress-theme-hope": "2.0.0-rc.22"
"vuepress": "2.0.0-rc.7",
"vuepress-theme-hope": "2.0.0-rc.23"
},
"devDependencies": {
"@commitlint/cli": "^18.6.0",
Expand Down
Loading

0 comments on commit c21de39

Please sign in to comment.