Skip to content

Commit

Permalink
Docs: Fix plugin insertion order in docs (#1850)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhildenbiddle authored Aug 2, 2022
1 parent 682bf96 commit 19e40c2
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

1 comment on commit 19e40c2

@vercel
Copy link

@vercel vercel bot commented on 19e40c2 Aug 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.