Translate some English content to Chinese (#6)
* Update README.md * Update README.md * Translate some untranslated part of this doc * Translate the untranslated part of this doc * Translate the untranslated part of this doc * 翻译未翻译内容 * Update helpers.md
This commit is contained in:
parent
fa84309926
commit
7c8e523de3
|
@ -29,6 +29,6 @@ docsify 是一个动态生成文档网站的工具。不同于 GitBook、Hexo
|
|||
|
||||
如果你觉得 docsify 对你有帮助,或者想对我微小的工作一点资瓷,欢迎给我[捐赠](https://github.com/QingWei-Li/donate)。
|
||||
|
||||
## Community
|
||||
## 社区
|
||||
|
||||
Users and development team are in the [Gitter](https://gitter.im/docsifyjs/Lobby).
|
||||
在[Gitter](https://gitter.im/docsifyjs/Lobby)的社区里可以找到docsify的用户和开发者团队。
|
||||
|
|
|
@ -177,9 +177,9 @@ window.$docsify = {
|
|||
|
||||
## logo
|
||||
|
||||
- Type: `String`
|
||||
- 类型: `String`
|
||||
|
||||
Website logo as it appears in the sidebar, you can resize by CSS.
|
||||
在侧边栏中出现的网站图标,你可以使用`CSS`来更改大小
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
|
@ -311,7 +311,7 @@ window.$docsify = {
|
|||
|
||||
## noEmoji
|
||||
|
||||
- type: `Boolean`
|
||||
- 类型: `Boolean`
|
||||
|
||||
禁用 emoji 解析。
|
||||
|
||||
|
@ -323,7 +323,7 @@ window.$docsify = {
|
|||
|
||||
## mergeNavbar
|
||||
|
||||
- type: `Boolean`
|
||||
- 类型: `Boolean`
|
||||
|
||||
小屏设备下合并导航栏到侧边栏。
|
||||
|
||||
|
@ -335,7 +335,7 @@ window.$docsify = {
|
|||
|
||||
## formatUpdated
|
||||
|
||||
- type: `String|Function`
|
||||
- 类型: `String|Function`
|
||||
|
||||
我们可以显示文档更新日期通过 **{docsify-updated<span>}</span>** 变量. 并且格式化日期通过 `formatUpdated`。参考 https://github.com/lukeed/tinydate#patterns
|
||||
|
||||
|
@ -353,8 +353,8 @@ window.$docsify = {
|
|||
|
||||
## externalLinkTarget
|
||||
|
||||
- type: `String`
|
||||
- default: `_blank`
|
||||
- 类型: `String`
|
||||
- 默认: `_blank`
|
||||
|
||||
当前默认为 \_blank, 配置一下就可以:
|
||||
|
||||
|
@ -366,8 +366,8 @@ window.$docsify = {
|
|||
|
||||
## routerMode
|
||||
|
||||
- type: `String`
|
||||
- default: `hash`
|
||||
- 类型: `String`
|
||||
- 默认: `hash`
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
|
@ -389,7 +389,7 @@ window.$docsify = {
|
|||
|
||||
## requestHeaders
|
||||
|
||||
- type: `Object`
|
||||
- 类型: `Object`
|
||||
|
||||
设置请求资源的请求头。
|
||||
|
||||
|
@ -403,7 +403,7 @@ window.$docsify = {
|
|||
|
||||
## ext
|
||||
|
||||
- type: `String`
|
||||
- 类型: `String`
|
||||
|
||||
资源的文件扩展名。
|
||||
|
||||
|
@ -415,15 +415,15 @@ window.$docsify = {
|
|||
|
||||
## fallbackLanguages
|
||||
|
||||
- type: `Array<string>`
|
||||
- 类型: `Array<string>`
|
||||
|
||||
List of languages that will fallback to the default language when a page is request and didn't exists for the given local.
|
||||
一个语言列表。在浏览这个列表中的语言的翻译文档时都会在请求到一个对应语言的翻译文档不存在时显示默认语言的同名文档
|
||||
|
||||
Example:
|
||||
|
||||
- try to fetch the page of `/de/overview`. If this page exists, it'll be displayed
|
||||
- then try to fetch the default page `/overview` (depending on the default language). If this page exists, it'll be displayed
|
||||
- then display 404 page.
|
||||
- 尝试访问`/de/overview`,如果存在则显示
|
||||
- 如果不存在则尝试`/overview`(取决于默认语言),如果存在即显示
|
||||
- 如果也不存在,显示404页面
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
|
@ -433,9 +433,9 @@ window.$docsify = {
|
|||
|
||||
## notFoundPage
|
||||
|
||||
- type: `Boolean` | `String` | `Object`
|
||||
- 类型: `Boolean` | `String` | `Object`
|
||||
|
||||
Load the `_404.md` file:
|
||||
在找不到指定页面时加载`_404.md`:
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
|
@ -443,7 +443,7 @@ window.$docsify = {
|
|||
};
|
||||
```
|
||||
|
||||
Load the customised path of the 404 page:
|
||||
加载自定义404页面:
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
|
@ -451,7 +451,7 @@ window.$docsify = {
|
|||
};
|
||||
```
|
||||
|
||||
Load the right 404 page according to the localisation:
|
||||
加载正确的本地化过的404页面:
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
|
@ -462,4 +462,4 @@ window.$docsify = {
|
|||
};
|
||||
```
|
||||
|
||||
> Note: The options with fallbackLanguages didn't work with the `notFoundPage` options.
|
||||
> 注意: 配置过`fallbackLanguages`这个选项的页面与这个选项`notFoundPage`冲突。
|
||||
|
|
|
@ -58,13 +58,13 @@ server {
|
|||
|
||||
## Netlify
|
||||
|
||||
1. Login to your [Netlify](https://www.netlify.com/) account.
|
||||
2. In the [dashboard](https://app.netlify.com/) page, click **New site from Git**.
|
||||
3. Choose a repository where you store your docs, leave the **Build Command** area blank, fill in the Publish directory area with the directory of your `index.html`, for example it should be docs if you populated it at `docs/index.html`.
|
||||
1. 登陆你的[Netlify](https://www.netlify.com/)账号
|
||||
2. 在[dashboard](https://app.netlify.com/)页上点击 **New site from Git**.
|
||||
3. 选择那个你用来存储文档的git仓库,将 **Build Command** 留空, 将 **Publish directory** 区域填入你的`index.html`所在的目录,例如:填入`docs`(如果你的`index.html`的相对路径是`docs/index.html`的话).
|
||||
|
||||
### HTML5 router
|
||||
|
||||
When using the HTML5 router, you need to set up redirect rules that redirect all requests to your `index.html`, it's pretty simple when you're using Netlify, populate a `\redirects` file in the docs directory and you're all set:
|
||||
当使用HTML5路由时,你需要设置一条将所有请求重定向到你的`index.html`的重定向规则。当你使用Netlify时这相当简单,在你的**Publish Directory**下创建一个`\redirects`文件,写进以下内容,然后——:tada:就好了:
|
||||
|
||||
```sh
|
||||
/* /index.html 200
|
||||
|
|
|
@ -71,7 +71,7 @@ docsify 扩展了一些 Markdown 语法,可以让文档更易读。
|
|||
- [ ] bim
|
||||
- [ ] lim
|
||||
|
||||
## Image resizing
|
||||
## 图片缩放
|
||||
|
||||
```md
|
||||
![logo](https://docsify.js.org/_media/icon.svg ':size=50x100')
|
||||
|
|
18
plugins.md
18
plugins.md
|
@ -84,11 +84,9 @@
|
|||
|
||||
## Demo code with instant preview and jsfiddle integration
|
||||
|
||||
With this plugin, sample code can be rendered on the page instantly, so that the readers can see the preview immediately.
|
||||
When readers expand the demo box, the source code and description are shown there. if they click the button `Try in Jsfiddle`,
|
||||
`jsfiddle.net` will be open with the code of this sample, which allow readers to revise the code and try on their own.
|
||||
使用这个插件,示例代码可以在页面上立刻渲染,这样就可以立刻看到效果。当示例框被展开时,源码和描述会被显示出来,如果他们点击`Try in Jsfiddle`这个按钮,将会在`jsfiddle.net`中打开一个包含这些示例代码的项目,这样就可以修改源码和测试了。
|
||||
|
||||
[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/) and [React](https://njleonzhang.github.io/docsify-demo-box-react/) are both supported.
|
||||
docsify同时支持[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/)和[React](https://njleonzhang.github.io/docsify-demo-box-react/)版本的插件。
|
||||
|
||||
## 图片缩放 - Zoom image
|
||||
|
||||
|
@ -108,9 +106,9 @@ Medium's 风格的图片缩放插件. 基于 [medium-zoom](https://github.com/fr
|
|||
|
||||
在每一页上添加 `Edit on github` 按钮. 由第三方库提供, 查看 [document](https://github.com/njleonzhang/docsify-edit-on-github)
|
||||
|
||||
## Copy to Clipboard
|
||||
## 复制到剪贴板
|
||||
|
||||
Add a simple `Click to copy` button to all preformatted code blocks to effortlessly allow users to copy example code from your docs. Provided by [@jperasmus](https://github.com/jperasmus)
|
||||
在所有的代码块上添加一个简单的`Click to copy`按钮来允许用户从你的文档中轻易地复制代码。由[@jperasmus](https://github.com/jperasmus)提供。
|
||||
|
||||
```html
|
||||
<script src="//unpkg.com/docsify-copy-code"></script>
|
||||
|
@ -120,7 +118,7 @@ See [here](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md)
|
|||
|
||||
## Disqus
|
||||
|
||||
Disqus comments. https://disqus.com/
|
||||
Disqus评论系统支持。 https://disqus.com/
|
||||
|
||||
```html
|
||||
<script>
|
||||
|
@ -133,7 +131,7 @@ Disqus comments. https://disqus.com/
|
|||
|
||||
## Gitalk
|
||||
|
||||
[Gitalk](https://github.com/gitalk/gitalk) is a modern comment component based on Github Issue and Preact.
|
||||
[Gitalk](https://github.com/gitalk/gitalk),一个现代化的,基于Preact和Github Issue的评论系统。
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="//unpkg.com/gitalk/dist/gitalk.css">
|
||||
|
@ -153,9 +151,9 @@ Disqus comments. https://disqus.com/
|
|||
</script>
|
||||
```
|
||||
|
||||
## Pagination
|
||||
## [Pagination](https://github.com/imyelo/docsify-pagination#readme)
|
||||
|
||||
Pagination for docsify. By [@imyelo](https://github.com/imyelo)
|
||||
docsify的分页导航插件,由[@imyelo](https://github.com/imyelo)提供。
|
||||
|
||||
```html
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
|
|
Loading…
Reference in New Issue