-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
1,097 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# 评论 | ||
|
||
配置评论组件。 | ||
|
||
## Introduce | ||
|
||
通过 `comment` 配置评论组件, 暂时只支持 `vssue`。 | ||
|
||
## Usage | ||
|
||
使用方式如下: | ||
|
||
```js | ||
// micro-app.vuepress.config.js | ||
module.exports = { | ||
comment: { | ||
type: 'vssue', // default: vssue | ||
platform: 'github', // default: github | ||
// 其他的 Vssue 配置 | ||
owner: 'OWNER_OF_REPO', | ||
repo: 'NAME_OF_REPO', | ||
clientId: 'YOUR_CLIENT_ID', | ||
clientSecret: 'YOUR_CLIENT_SECRET', | ||
} | ||
} | ||
``` | ||
|
||
## Options | ||
|
||
### type | ||
|
||
- 类型: `string` | ||
- 默认值: `vssue` | ||
|
||
选择评论组件类型。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Google Analytics | ||
|
||
配置 `Google Analytics` 参数。 | ||
|
||
## Usage | ||
|
||
使用方式如下: | ||
|
||
```js | ||
// micro-app.vuepress.config.js | ||
module.exports = { | ||
GAID: '' // UA-00000000-0 | ||
} | ||
``` | ||
|
||
**参考:** | ||
|
||
- [plugin-google-analytics](https://v1.vuepress.vuejs.org/zh/plugin/official/plugin-google-analytics.html) | ||
|
||
## Options | ||
|
||
### GAID | ||
|
||
- 类型: `string` | ||
- 默认值: `undefined` | ||
|
||
提供 Google Analytics ID 以启用集成。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 重定向 | ||
|
||
配置评论组件。 | ||
|
||
## Introduce | ||
|
||
VuePress 内置了多语言系统,但你必须提供一个默认语言,否则直接访问 `/` 将只能得到 404。 | ||
然而,提供默认语言往往又意味着不那么友好的项目结构(因为默认语言下的文件会比其他语言低一级),我们有时也希望网站保留 `/` 用于更加智能地重定向(比如根据 `navigator.language` 判断用户所使用的语言自动定向到相关页面)。 | ||
`vuepress-plugin-redirect` 就是这样一个自动重定向的插件。当然,它所能做的事情不止是自动匹配语言,你可以通过定制你的重定向器实现任何页面到子页面的重定向。 | ||
|
||
因此我们再多语言时,集成了此插件。 | ||
|
||
## Usage | ||
|
||
使用方式如下: | ||
|
||
```js | ||
// micro-app.vuepress.config.js | ||
module.exports = { | ||
redirect: false // default: true | ||
} | ||
``` | ||
|
||
## Options | ||
|
||
### redirect | ||
|
||
- 类型: `boolean | Object` | ||
- 默认值: `true` | ||
|
||
当参数为 `false` 时,禁用该插件。 | ||
|
||
当参数为一个对象时,请参考:[vuepress-plugin-redirect](https://vuepress.github.io/zh/plugins/redirect/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
--- | ||
title: 介绍 | ||
tag: | ||
- abc | ||
--- | ||
|
||
# 介绍 | ||
|
||
`@micro-app/plugin-vuepress` 只是作为 `VuePress` 的增强,用于 `@micro-app` 系列的文档输出插件。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<template> | ||
<div :class="$style.root" v-if="visible"> | ||
<Vssue v-if="type === 'vssue'" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'Comment', | ||
computed: { | ||
visible() { | ||
return !!this.$themeConfig.comment; | ||
}, | ||
comment() { | ||
return this.$themeConfig.comment || {}; | ||
}, | ||
type() { | ||
return this.comment.type || 'vssue'; | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="stylus" module> | ||
.root { | ||
max-width: 820px; | ||
margin: 60px auto 30px; | ||
} | ||
</style> |
Oops, something went wrong.