Skip to content

Commit 5ca330c

Browse files
jhildenbiddleKoooooo-7
authored andcommitted
Docs: Fix plugin insertion order in docs (#1850)
1 parent da157fe commit 5ca330c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: docs/write-a-plugin.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ window.$docsify = {
2222
Alternatively, a plugin can be stored in a separate file and "installed" using a standard `<script>` tag:
2323

2424
```js
25+
// docsify-plugin-myplugin.js
26+
2527
(function () {
2628
var myPlugin = function (hook, vm) {
2729
// ...
2830
};
2931

3032
// Add plugin to docsify's plugin array
3133
$docsify = $docsify || {};
32-
$docsify.plugins = [].concat(myPlugin, $docsify.plugins || []);
34+
$docsify.plugins = [].concat($docsify.plugins || [], myPlugin);
3335
})();
3436
```
3537

0 commit comments

Comments
 (0)