diff --git a/docs/cdn.md b/docs/cdn.md
index 05fff3c28..52c992464 100644
--- a/docs/cdn.md
+++ b/docs/cdn.md
@@ -6,7 +6,7 @@ Recommended: [jsDelivr](//cdn.jsdelivr.net), which will reflect the latest versi
```html
-
+
@@ -18,7 +18,10 @@ Alternatively, use [compressed files](#compressed-file).
```html
-
+
@@ -28,7 +31,10 @@ Alternatively, use [compressed files](#compressed-file).
```html
-
+
@@ -36,7 +42,10 @@ Alternatively, use [compressed files](#compressed-file).
```html
-
+
diff --git a/docs/cover.md b/docs/cover.md
index bf8c3c54e..1be3b39ce 100644
--- a/docs/cover.md
+++ b/docs/cover.md
@@ -11,8 +11,8 @@ Set `coverpage` to **true**, and create a `_coverpage.md`:
```
@@ -81,7 +81,7 @@ Now, you can set
```js
window.$docsify = {
- coverpage: ['/', '/zh-cn/']
+ coverpage: ['/', '/zh-cn/'],
};
```
@@ -91,7 +91,7 @@ Or a special file name
window.$docsify = {
coverpage: {
'/': 'cover.md',
- '/zh-cn/': 'cover.md'
- }
+ '/zh-cn/': 'cover.md',
+ },
};
```
diff --git a/docs/custom-navbar.md b/docs/custom-navbar.md
index 0d05a243f..d1722fbd5 100644
--- a/docs/custom-navbar.md
+++ b/docs/custom-navbar.md
@@ -27,8 +27,8 @@ Alternatively, you can create a custom markdown-based navigation file by setting
```
@@ -36,8 +36,8 @@ Alternatively, you can create a custom markdown-based navigation file by setting
```markdown
-* [En](/)
-* [chinese](/zh-cn/)
+- [En](/)
+- [chinese](/zh-cn/)
```
!> You need to create a `.nojekyll` in `./docs` to prevent GitHub Pages from ignoring files that begin with an underscore.
@@ -51,19 +51,19 @@ You can create sub-lists by indenting items that are under a certain parent.
```markdown
-* Getting started
+- Getting started
- * [Quick start](quickstart.md)
- * [Writing more pages](more-pages.md)
- * [Custom navbar](custom-navbar.md)
- * [Cover page](cover.md)
+ - [Quick start](quickstart.md)
+ - [Writing more pages](more-pages.md)
+ - [Custom navbar](custom-navbar.md)
+ - [Cover page](cover.md)
-* Configuration
- * [Configuration](configuration.md)
- * [Themes](themes.md)
- * [Using plugins](plugins.md)
- * [Markdown configuration](markdown.md)
- * [Language highlight](language-highlight.md)
+- Configuration
+ - [Configuration](configuration.md)
+ - [Themes](themes.md)
+ - [Using plugins](plugins.md)
+ - [Markdown configuration](markdown.md)
+ - [Language highlight](language-highlight.md)
```
renders as
@@ -80,7 +80,7 @@ If you use the [emoji plugin](plugins#emoji):
@@ -91,6 +91,6 @@ you could, for example, use flag emojis in your custom navbar Markdown file:
```markdown
-* [:us:, :uk:](/)
-* [:cn:](/zh-cn/)
+- [:us:, :uk:](/)
+- [:cn:](/zh-cn/)
```
diff --git a/docs/deploy.md b/docs/deploy.md
index 9ac3ca50f..ce6a82a07 100644
--- a/docs/deploy.md
+++ b/docs/deploy.md
@@ -96,14 +96,14 @@ When using the HTML5 router, you need to set up redirect rules that redirect all
## AWS Amplify
-1. Set the routerMode in the Docsify project `index.html` to *history* mode.
+1. Set the routerMode in the Docsify project `index.html` to _history_ mode.
```html
```
@@ -125,17 +125,15 @@ frontend:
- '**/*'
cache:
paths: []
-
```
6. Add the following Redirect rules in their displayed order. Note that the second record is a PNG image where you can change it with any image format you are using.
| Source address | Target address | Type |
-|----------------|----------------|---------------|
-| /<*>.md | /<*>.md | 200 (Rewrite) |
-| /<*>.png | /<*>.png | 200 (Rewrite) |
-| /<*> | /index.html | 200 (Rewrite) |
-
+| -------------- | -------------- | ------------- |
+| /<\*>.md | /<\*>.md | 200 (Rewrite) |
+| /<\*>.png | /<\*>.png | 200 (Rewrite) |
+| /<\*> | /index.html | 200 (Rewrite) |
## Docker
@@ -144,10 +142,10 @@ frontend:
You need prepare the initial files instead of making them inside the container.
See the [Quickstart](https://docsify.js.org/#/quickstart) section for instructions on how to create these files manually or using [docsify-cli](https://github.com/docsifyjs/docsify-cli).
- ```sh
- index.html
- README.md
- ```
+ ```sh
+ index.html
+ README.md
+ ```
- Create Dockerfile
@@ -180,4 +178,3 @@ frontend:
```sh
docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo
```
-
diff --git a/docs/embed-files.md b/docs/embed-files.md
index 936494bcb..f06d121f8 100644
--- a/docs/embed-files.md
+++ b/docs/embed-files.md
@@ -26,11 +26,11 @@ Currently, file extensions are automatically recognized and embedded in differen
These types are supported:
-* **iframe** `.html`, `.htm`
-* **markdown** `.markdown`, `.md`
-* **audio** `.mp3`
-* **video** `.mp4`, `.ogg`
-* **code** other file extension
+- **iframe** `.html`, `.htm`
+- **markdown** `.markdown`, `.md`
+- **audio** `.mp3`
+- **video** `.mp4`, `.ogg`
+- **code** other file extension
Of course, you can force the specified type. For example, a Markdown file can be embedded as a code block by setting `:type=code`.
@@ -74,6 +74,7 @@ Example:
If you embed the file as `iframe`, `audio` and `video`, then you may need to set the attributes of these tags.
?> Note, for the `audio` and `video` types, docsify adds the `controls` attribute by default. When you want add more attributes, the `controls` attribute need to be added manually if need be.
+
```md
[filename](_media/example.mp4 ':include :type=video controls width=100%')
```
@@ -114,11 +115,11 @@ Start by viewing a gist on `gist.github.com`. For the purposes of this guide, we
Identify the following items from the gist:
-Field | Example | Description
---- | --- | ---
-**Username** | `anikethsaha` | The gist's owner.
-**Gist ID** | `c2bece08f27c4277001f123898d16a7c` | Identifier for the gist. This is fixed for the gist's lifetime.
-**Filename** | `content.md` | Select a name of a file in the gist. This needed even on a single-file gist for embedding to work.
+| Field | Example | Description |
+| ------------ | ---------------------------------- | -------------------------------------------------------------------------------------------------- |
+| **Username** | `anikethsaha` | The gist's owner. |
+| **Gist ID** | `c2bece08f27c4277001f123898d16a7c` | Identifier for the gist. This is fixed for the gist's lifetime. |
+| **Filename** | `content.md` | Select a name of a file in the gist. This needed even on a single-file gist for embedding to work. |
You will need those to build the _raw gist URL_ for the target file. This has the following format:
diff --git a/docs/language-highlight.md b/docs/language-highlight.md
index e95823d03..0ea9b6618 100644
--- a/docs/language-highlight.md
+++ b/docs/language-highlight.md
@@ -2,10 +2,10 @@
Docsify uses [Prism](https://prismjs.com) to highlight code blocks in your pages. Prism supports the following languages by default:
-* Markup - `markup`, `html`, `xml`, `svg`, `mathml`, `ssml`, `atom`, `rss`
-* CSS - `css`
-* C-like - `clike`
-* JavaScript - `javascript`, `js`
+- Markup - `markup`, `html`, `xml`, `svg`, `mathml`, `ssml`, `atom`, `rss`
+- CSS - `css`
+- C-like - `clike`
+- JavaScript - `javascript`, `js`
Support for [additional languages](https://prismjs.com/#supported-languages) is available by loading the language-specific [grammar files](https://cdn.jsdelivr.net/npm/prismjs@1/components/) via CDN:
@@ -29,7 +29,7 @@ echo "hello"
```
```php
-function getAdder(int $x): int
+function getAdder(int $x): int
{
return 123;
}
@@ -48,18 +48,19 @@ echo "hello"
```
```php
-function getAdder(int $x): int
+function getAdder(int $x): int
{
return 123;
}
```
## Highlighting Dynamic Content
+
Code blocks [dynamically created from javascript](https://docsify.js.org/#/configuration?id=executescript) can be highlighted using the method `Prism.highlightElement` like so:
```javascript
-const code = document.createElement("code");
+const code = document.createElement('code');
code.innerHTML = "console.log('Hello World!')";
-code.setAttribute("class", "lang-javascript");
+code.setAttribute('class', 'lang-javascript');
Prism.highlightElement(code);
```
diff --git a/docs/markdown.md b/docs/markdown.md
index 6adc7f035..5cca17b92 100644
--- a/docs/markdown.md
+++ b/docs/markdown.md
@@ -9,10 +9,10 @@ window.$docsify = {
renderer: {
link() {
// ...
- }
- }
- }
-}
+ },
+ },
+ },
+};
```
?> Configuration Options Reference: [marked documentation](https://marked.js.org/#/USING_ADVANCED.md)
@@ -24,9 +24,9 @@ window.$docsify = {
markdown(marked, renderer) {
// ...
- return marked
- }
-}
+ return marked;
+ },
+};
```
## Supports mermaid
@@ -43,14 +43,17 @@ window.$docsify = {
markdown: {
renderer: {
code(code, lang) {
- if (lang === "mermaid") {
+ if (lang === 'mermaid') {
return /* html */ `
-