Skip to content

docs: changes in sync Chinese translation #2548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/adding-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
Expand Down Expand Up @@ -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 -->
Expand Down
6 changes: 3 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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>
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions docs/cover.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/custom-navbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
Expand Down
2 changes: 1 addition & 1 deletion docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/`
Expand Down
2 changes: 1 addition & 1 deletion docs/markdown.md
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
14 changes: 7 additions & 7 deletions docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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" />
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion docs/pwa.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions docs/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Docsify ignores Vue template syntax within code blocks by default:

````markdown
```
{{ message}}
{{ message }}
```
````

Expand All @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions src/core/render/tpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/search.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -288,7 +288,7 @@ console.log('Hello World');
markdown: {
homepage: `
# Hello World

- [ ] Task 1
- [x] SearchHere
- [ ] Task 3
Expand Down