Docs: Fix plugin insertion order in docs (#1850)

This commit is contained in:
John Hildenbiddle 2022-08-02 12:27:23 -05:00 committed by GitHub
parent 682bf967ae
commit 19e40c2075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
})();
```