mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-11-29 18:48:14 +08:00
Docs: Fix plugin insertion order in docs (#1850)
This commit is contained in:
parent
682bf967ae
commit
19e40c2075
@ -22,6 +22,8 @@ window.$docsify = {
|
||||
Alternatively, a plugin can be stored in a separate file and "installed" using a standard `<script>` tag:
|
||||
|
||||
```js
|
||||
// docsify-plugin-myplugin.js
|
||||
|
||||
(function () {
|
||||
var myPlugin = function (hook, vm) {
|
||||
// ...
|
||||
@ -29,7 +31,7 @@ Alternatively, a plugin can be stored in a separate file and "installed" using a
|
||||
|
||||
// Add plugin to docsify's plugin array
|
||||
$docsify = $docsify || {};
|
||||
$docsify.plugins = [].concat(myPlugin, $docsify.plugins || []);
|
||||
$docsify.plugins = [].concat($docsify.plugins || [], myPlugin);
|
||||
})();
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user