@@ -4,7 +4,7 @@ A docsify plugin is a function with the ability to execute custom JavaScript cod
44
55## Setup
66
7- Docsify plugins can be added directly to the ` plugins ` array.
7+ Docsify plugins can be added directly to the ` plugins ` array:
88
99``` js
1010window .$docsify = {
@@ -19,7 +19,7 @@ window.$docsify = {
1919};
2020```
2121
22- Alternatively, a plugin can be stored in a separate file and "installed" using a standard ` <script> ` tag.
22+ Alternatively, a plugin can be stored in a separate file and "installed" using a standard ` <script> ` tag:
2323
2424``` js
2525(function () {
@@ -98,7 +98,7 @@ Lifecycle hooks are provided via the `hook` argument passed to the plugin functi
9898
9999### init()
100100
101- Invoked one time when docsify script is initialized
101+ Invoked one time when docsify script is initialized.
102102
103103``` js
104104hook .init (function () {
@@ -108,7 +108,7 @@ hook.init(function () {
108108
109109### mounted()
110110
111- Invoked one time when the docsify instance has mounted on the DOM
111+ Invoked one time when the docsify instance has mounted on the DOM.
112112
113113``` js
114114hook .mounted (function () {
@@ -118,7 +118,7 @@ hook.mounted(function () {
118118
119119### beforeEach()
120120
121- Invoked on each page load before new markdown is transformed to HTML
121+ Invoked on each page load before new markdown is transformed to HTML.
122122
123123``` js
124124hook .beforeEach (function (markdown ) {
@@ -143,7 +143,7 @@ hook.beforeEach(function (markdown, next) {
143143
144144### afterEach()
145145
146- Invoked on each page load after new markdown has been transformed to HTML
146+ Invoked on each page load after new markdown has been transformed to HTML.
147147
148148``` js
149149hook .afterEach (function (html ) {
@@ -161,14 +161,14 @@ hook.afterEach(function (html, next) {
161161 } catch (err) {
162162 // ...
163163 } finally {
164- next (markdown );
164+ next (html );
165165 }
166166});
167167```
168168
169169### doneEach()
170170
171- Invoked on each page load after new HTML has been appended to the DOM
171+ Invoked on each page load after new HTML has been appended to the DOM.
172172
173173``` js
174174hook .doneEach (function () {
@@ -178,7 +178,7 @@ hook.doneEach(function () {
178178
179179### ready()
180180
181- Invoked one time after rendering the initial page
181+ Invoked one time after rendering the initial page.
182182
183183``` js
184184hook .ready (function () {
0 commit comments