docsify/docs/plugins.md

207 lines
6.4 KiB
Markdown
Raw Normal View History

2017-02-22 21:29:26 +08:00
# List of Plugins
2017-02-13 22:43:58 +08:00
2017-02-22 21:29:26 +08:00
## Full text search
2017-02-13 22:43:58 +08:00
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.
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
<!-- prettier-ignore -->
2017-02-13 22:43:58 +08:00
```html
<script>
window.$docsify = {
search: 'auto', // default
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
search: [
2017-02-13 22:43:58 +08:00
'/', // => /README.md
'/guide', // => /guide.md
'/get-started', // => /get-started.md
'/zh-cn/', // => /zh-cn/README.md
],
2017-03-10 05:19:07 +08:00
// complete configuration parameters
2017-02-13 22:43:58 +08:00
search: {
maxAge: 86400000, // Expiration time, the default one day
paths: [], // or 'auto'
2017-02-19 11:22:34 +08:00
placeholder: 'Type to search',
// Localization
placeholder: {
'/zh-cn/': '搜索',
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
'/': 'Type to search',
},
noData: 'No Results!',
// Localization
noData: {
'/zh-cn/': '找不到结果',
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
'/': 'No Results',
},
// Headline depth, 1 - 6
depth: 2,
hideOtherSidebarContent: false, // whether or not to hide other sidebar content
// To avoid search index collision
// between multiple websites under the same domain
namespace: 'website-1',
// Use different indexes for path prefixes (namespaces).
// NOTE: Only works in 'auto' mode.
//
// When initialiazing an index, we look for the first path from the sidebar.
// If it matches the prefix from the list, we switch to the corresponding index.
pathNamespaces: ['/zh-cn', '/ru-ru', '/ru-ru/v1'],
// You can provide a regexp to match prefixes. In this case,
// the matching substring will be used to identify the index
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
pathNamespaces: /^(\/(zh-cn|ru-ru))?(\/(v1|v2))?/,
},
};
2017-02-13 22:43:58 +08:00
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
2017-02-13 22:43:58 +08:00
```
This plugin ignores diacritical marks when performing a full text search (e.g., "cafe" will also match "café"). Legacy browsers like IE11 require the following [String.normalize()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize) polyfill to ignore diacritical marks:
```html
<script src="//polyfill.io/v3/polyfill.min.js?features=String.prototype.normalize"></script>
```
2017-02-22 21:29:26 +08:00
## Google Analytics
2017-02-13 22:43:58 +08:00
Install the plugin and configure the track id.
```html
<script>
window.$docsify = {
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
ga: 'UA-XXXXX-Y',
};
2017-02-13 22:43:58 +08:00
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/ga.min.js"></script>
2017-02-13 22:43:58 +08:00
```
Configure by `data-ga`.
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
<!-- prettier-ignore -->
2017-03-10 05:19:07 +08:00
```html
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js" data-ga="UA-XXXXX-Y"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/ga.min.js"></script>
2017-03-10 05:19:07 +08:00
```
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
## Emoji
2017-02-13 22:43:58 +08:00
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
Renders a larger collection of emoji shorthand codes. Without this plugin, Docsify is able to render only a limited number of emoji shorthand codes.
!> Deprecated as of v4.13. Docsify no longer requires this plugin for full emoji support.
2017-02-13 22:43:58 +08:00
2017-02-22 21:29:26 +08:00
```html
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/emoji.min.js"></script>
2017-02-13 22:43:58 +08:00
```
2017-03-06 23:57:28 +08:00
## External Script
If the script on the page is an external one (imports a js file via `src` attribute), you'll need this plugin to make it work.
```html
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/external-script.min.js"></script>
2017-03-06 23:57:28 +08:00
```
2017-03-09 20:26:33 +08:00
## Zoom image
2017-11-02 10:43:09 +08:00
Medium's image zoom. Based on [medium-zoom](https://github.com/francoischalifour/medium-zoom).
2017-03-09 20:26:33 +08:00
```html
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/zoom-image.min.js"></script>
2017-03-09 20:26:33 +08:00
```
Exclude the special image
```markdown
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
![](image.png ':no-zoom')
```
## Edit on github
Add `Edit on github` button on every pages. Provided by [@njleonzhang](https://github.com/njleonzhang), see this [document](https://github.com/njleonzhang/docsify-edit-on-github)
## 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.
[Vue](https://njleonzhang.github.io/docsify-demo-box-vue/) and [React](https://njleonzhang.github.io/docsify-demo-box-react/) are both supported.
2017-09-20 09:01:06 +08:00
## 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)
```html
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code/dist/docsify-copy-code.min.js"></script>
```
See [here](https://github.com/jperasmus/docsify-copy-code/blob/master/README.md) for more details.
2017-11-04 13:54:37 +08:00
## Disqus
Disqus comments. https://disqus.com/
```html
<script>
window.$docsify = {
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
disqus: 'shortname',
};
2017-11-04 13:54:37 +08:00
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/disqus.min.js"></script>
2017-11-04 13:54:37 +08:00
```
2017-11-09 20:53:07 +08:00
## Gitalk
2018-04-26 12:34:28 +08:00
[Gitalk](https://github.com/gitalk/gitalk) is a modern comment component based on Github Issue and Preact.
2017-11-09 20:53:07 +08:00
```html
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.css" />
2017-11-09 20:53:07 +08:00
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/gitalk.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.js"></script>
2017-11-09 20:53:07 +08:00
<script>
const gitalk = new Gitalk({
clientID: 'Github Application Client ID',
clientSecret: 'Github Application Client Secret',
repo: 'Github repo',
owner: 'Github repo owner',
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
admin: [
'Github repo collaborators, only these guys can initialize github issues',
],
2017-11-09 20:53:07 +08:00
// facebook-like distraction free mode
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746) * Render native emoji with image fallback Fix #779 * Deprecate emoji plugin * Add emoji tests * Remove console.log statement * Fix emoji image alt attribute * Set nativeEmoji to false by default (non-breaking) * Fix parsing emoji in HTML comments and script tags * Add nativeEmoji and update noEmoji details * Add Emoji plugin deprecation notice * Fix ESLint issues * Create build:emoji task - Auto-generate emoji data from GitHub API - Auto-generate emoji markdown for website - Add emoji page to navigation * Fix rendering of GitHub emoji without unicode * Adjust and match size of native and image emoji * Update emoji test snapshot * Update docs test snapshot * Fix ci/codesandbox error * Update native emoji font-stack * Fix rendering of native multi-character emoji * Kick GitHub Workflow * Replace rollup’s uglify plugin with terser * Switch “npm ci” instead of “npm i” for stability * Change emoji data from default to named export * Revert "Replace rollup’s uglify plugin with terser" This reverts commit 7ba85136361c72839516900d91cca806fac94fee. * Revert "Switch “npm ci” instead of “npm i” for stability" This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0. * Revert "Change emoji data from default to named export" This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c. * Specify codesandbox template and node version * Update codesandbox config * Revert "Revert "Replace rollup’s uglify plugin with terser"" This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8. * Revert "Revert "Revert "Replace rollup’s uglify plugin with terser""" This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47. * Update codesandbox config * Revert "Update codesandbox config" This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023. * Fix codesandbox uglify error * Emoji docs tweaks * Restore and update emoji plugin code * Restore and update emoji plugin docs * Prettier updates * Match lowercase shortcodes only Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-06 12:25:09 +08:00
distractionFreeMode: false,
});
2017-11-09 20:53:07 +08:00
</script>
```
2018-06-29 21:33:17 +08:00
## Pagination
Pagination for docsify. By [@imyelo](https://github.com/imyelo)
```html
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-pagination/dist/docsify-pagination.min.js"></script>
```
Click [here](https://github.com/imyelo/docsify-pagination#readme) to get more information.
## Tabs
A docsify.js plugin for displaying tabbed content from markdown.
2018-11-01 14:05:10 +08:00
- [Documentation & Demos](https://jhildenbiddle.github.io/docsify-tabs)
Provided by [@jhildenbiddle](https://github.com/jhildenbiddle/docsify-tabs).
2018-11-01 14:05:10 +08:00
## More plugins
See [awesome-docsify](awesome?id=plugins)