mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
docs: changes in sync Chinese translation (#2548)
This commit is contained in:
parent
5d9ea4f664
commit
f6ed6d3f89
@ -27,7 +27,7 @@ docs/zh-cn/guide.md => http://domain.com/#/zh-cn/guide
|
||||
|
||||
In order to have a sidebar, you can create your own `_sidebar.md` (see [this documentation's sidebar](https://github.com/docsifyjs/docsify/blob/main/docs/_sidebar.md) for an example):
|
||||
|
||||
First, you need to set `loadSidebar` to **true**. Details are available in the [configuration paragraph](configuration.md#loadsidebar).
|
||||
First, you need to set `loadSidebar` to **true**. Details are available in the [configuration paragraph](configuration#loadsidebar).
|
||||
|
||||
```html
|
||||
<!-- index.html -->
|
||||
@ -115,7 +115,7 @@ A page's `title` tag is generated from the _selected_ sidebar item name. For bet
|
||||
|
||||
Once you've created `_sidebar.md`, the sidebar content is automatically generated based on the headers in the markdown files.
|
||||
|
||||
A custom sidebar can also automatically generate a table of contents by setting a `subMaxLevel`, compare [subMaxLevel configuration](configuration.md#submaxlevel).
|
||||
A custom sidebar can also automatically generate a table of contents by setting a `subMaxLevel`, compare [subMaxLevel configuration](configuration#submaxlevel).
|
||||
|
||||
```html
|
||||
<!-- index.html -->
|
||||
|
||||
@ -480,7 +480,7 @@ window.$docsify = {
|
||||
- Type: `Boolean`
|
||||
- Default: `false`
|
||||
|
||||
Render emoji shorthand codes using GitHub-style emoji images or platform-native emoji characters.
|
||||
Render emoji shorthand codes using GitHub-style emoji images or native emoji characters.
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
@ -506,7 +506,7 @@ GitHub-style images when `false`:
|
||||
<img class="emoji" src="https://github.githubassets.com/images/icons/emoji/unicode/1f44e.png" alt="-1">
|
||||
</output>
|
||||
|
||||
Platform-native characters when `true`:
|
||||
Native characters when `true`:
|
||||
|
||||
<output data-lang="output">
|
||||
<span class="emoji">😄︎</span>
|
||||
@ -581,7 +581,7 @@ To disable emoji parsing of individual shorthand codes, replace `:` characters w
|
||||
|
||||
## notFoundPage
|
||||
|
||||
- Type: `Boolean` | `String` | `Object`
|
||||
- Type: `Boolean|String|Object`
|
||||
- Default: `false`
|
||||
|
||||
Display default "404 - Not Found" message:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Cover
|
||||
|
||||
Activate the cover feature by setting `coverpage` to **true**. See [coverpage configuration](configuration.md#coverpage).
|
||||
Activate the cover feature by setting `coverpage` to **true**. See [coverpage configuration](configuration#coverpage).
|
||||
|
||||
## Basic usage
|
||||
|
||||
@ -60,7 +60,7 @@ Alternatively, a background color or image can be specified in the cover page ma
|
||||
|
||||
## Coverpage as homepage
|
||||
|
||||
Normally, the coverpage and the homepage appear at the same time. Of course, you can also separate the coverpage by [`onlyCover`](configuration.md#onlycover) option.
|
||||
Normally, the coverpage and the homepage appear at the same time. Of course, you can also separate the coverpage by [`onlyCover`](configuration#onlycover) option.
|
||||
|
||||
## Multiple covers
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ If you need custom navigation, you can create a HTML-based navigation bar.
|
||||
|
||||
## Markdown
|
||||
|
||||
Alternatively, you can create a custom markdown-based navigation file by setting `loadNavbar` to **true** and creating `_navbar.md`, compare [loadNavbar configuration](configuration.md#loadnavbar).
|
||||
Alternatively, you can create a custom markdown-based navigation file by setting `loadNavbar` to **true** and creating `_navbar.md`, compare [loadNavbar configuration](configuration#loadnavbar).
|
||||
|
||||
```html
|
||||
<!-- index.html -->
|
||||
|
||||
@ -78,7 +78,7 @@ server {
|
||||
|
||||
1. Login to your [Netlify](https://www.netlify.com/) account.
|
||||
2. In the [dashboard](https://app.netlify.com/) page, click **Add New Site**.
|
||||
3. Select Github.
|
||||
3. Select GitHub.
|
||||
4. Choose the repository where you store your docs, in the **Base Directory** add the subfolder where the files are stored. For example, it should be `docs`.
|
||||
5. In the **Build Command** area leave it blank.
|
||||
6. In the **Publish directory** area, if you have added the `docs` in the **Base Directory** you will see the publish directory populated with `docs/`
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Markdown configuration
|
||||
|
||||
**docsify** uses [marked v13+](https://github.com/markedjs/marked) as its Markdown parser. You can customize how it renders your Markdown content to HTML by customizing `renderer`:
|
||||
**docsify** uses [marked](https://github.com/markedjs/marked) as its Markdown parser. You can customize how it renders your Markdown content to HTML by customizing `renderer`:
|
||||
|
||||
```js
|
||||
window.$docsify = {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
## Full text search
|
||||
|
||||
By default, the hyperlink on the current page is recognized and the content is saved in `localStorage`. You can also specify the path to the files.
|
||||
By default, the hyperlink on the current page is recognized and the content is saved in `IndexedDB`. You can also specify the path to the files.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```html
|
||||
@ -188,7 +188,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) is a modern comment component based on GitHub Issue and Preact.
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.css" />
|
||||
@ -197,12 +197,12 @@ Disqus comments. https://disqus.com/
|
||||
<script src="//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.js"></script>
|
||||
<script>
|
||||
const gitalk = new Gitalk({
|
||||
clientID: 'Github Application Client ID',
|
||||
clientSecret: 'Github Application Client Secret',
|
||||
repo: 'Github repo',
|
||||
owner: 'Github repo owner',
|
||||
clientID: 'GitHub Application Client ID',
|
||||
clientSecret: 'GitHub Application Client Secret',
|
||||
repo: 'GitHub repo',
|
||||
owner: 'GitHub repo owner',
|
||||
admin: [
|
||||
'Github repo collaborators, only these guys can initialize github issues',
|
||||
'GitHub repo collaborators, only these guys can initialize github issues',
|
||||
],
|
||||
// facebook-like distraction free mode
|
||||
distractionFreeMode: false,
|
||||
|
||||
@ -39,7 +39,7 @@ const getFixedUrl = req => {
|
||||
url.protocol = self.location.protocol;
|
||||
|
||||
// 2. add query for caching-busting.
|
||||
// Github Pages served with Cache-Control: max-age=600
|
||||
// GitHub Pages served with Cache-Control: max-age=600
|
||||
// max-age on mutable content is error-prone, with SW life of bugs can even extend.
|
||||
// Until cache mode of Fetch API landed, we have to workaround cache-busting with query string.
|
||||
// Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190
|
||||
|
||||
@ -138,7 +138,7 @@ You should set the `data-app` attribute if you changed `el`:
|
||||
</script>
|
||||
```
|
||||
|
||||
Compare [el configuration](configuration.md#el).
|
||||
Compare [el configuration](configuration#el).
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
|
||||
@ -51,7 +51,7 @@ Docsify ignores Vue template syntax within code blocks by default:
|
||||
|
||||
````markdown
|
||||
```
|
||||
{{ message}}
|
||||
{{ message }}
|
||||
```
|
||||
````
|
||||
|
||||
@ -61,7 +61,7 @@ To process Vue template syntax within a code block, wrap the code block in an el
|
||||
<div v-template>
|
||||
|
||||
```
|
||||
{{ message}}
|
||||
{{ message }}
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
@ -2,7 +2,7 @@ import { isMobile } from '../util/env.js';
|
||||
|
||||
/**
|
||||
* Render github corner
|
||||
* @param {Object} data URL for the View Source on Github link
|
||||
* @param {Object} data URL for the View Source on GitHub link
|
||||
* @param {String} cornerExternalLinkTarget value of the target attribute of the link
|
||||
* @return {String} SVG element as string
|
||||
*/
|
||||
@ -20,7 +20,7 @@ export function corner(data, cornerExternalLinkTarget) {
|
||||
cornerExternalLinkTarget = cornerExternalLinkTarget || '_blank';
|
||||
|
||||
return /* html */ `
|
||||
<a href="${data}" target="${cornerExternalLinkTarget}" class="github-corner" aria-label="View source on Github">
|
||||
<a href="${data}" target="${cornerExternalLinkTarget}" class="github-corner" aria-label="View source on GitHub">
|
||||
<svg viewBox="0 0 250 250" aria-hidden="true">
|
||||
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
|
||||
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
|
||||
|
||||
@ -57,11 +57,11 @@ test.describe('Search Plugin Tests', () => {
|
||||
|
||||
## GitHub Pages ignore1 <!-- {docsify-ignore} -->
|
||||
|
||||
There're three places to populate your docs for your Github repository1.
|
||||
There're three places to populate your docs for your GitHub repository1.
|
||||
|
||||
## GitHub Pages ignore2 {docsify-ignore}
|
||||
|
||||
There're three places to populate your docs for your Github repository2.
|
||||
There're three places to populate your docs for your GitHub repository2.
|
||||
`,
|
||||
},
|
||||
scriptURLs: ['/dist/plugins/search.js'],
|
||||
@ -288,7 +288,7 @@ console.log('Hello World');
|
||||
markdown: {
|
||||
homepage: `
|
||||
# Hello World
|
||||
|
||||
|
||||
- [ ] Task 1
|
||||
- [x] SearchHere
|
||||
- [ ] Task 3
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user