Skip to content

Commit

Permalink
Docs: Fix plugin insertion order in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jhildenbiddle committed Aug 2, 2022
1 parent 682bf96 commit 6c63cdd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/write-a-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ 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) {
// ...
};

// Add plugin to docsify's plugin array
$docsify = $docsify || {};
$docsify.plugins = [].concat(myPlugin, $docsify.plugins || []);
$docsify.plugins = [].concat($docsify.plugins || [], myPlugin);
})();
```

Expand Down

0 comments on commit 6c63cdd

Please sign in to comment.