You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+13-19Lines changed: 13 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -388,7 +388,7 @@ You can update the config parameters passed in on the _index.html_ page. There a
388
388
**Links**
389
389
390
390
- For available parameters, these are documented on the _Docsify_[Configuration](https://docsify.js.org/#/configuration) page.
391
-
- For defaults - see _Docsify_[config.js](https://github.com/docsifyjs/docsify/blob/develop/src/core/config.js) script.
391
+
- For defaults, see the _Docsify_repo's [src/core/config.js](https://github.com/docsifyjs/docsify/blob/develop/src/core/config.js) script.
392
392
- To see an app config in use, see [index.html](https://gi?id=twitter-policiesthub.com/MichaelCurrin/docsify-js-template/blob/master/docs/index.html) of DocsifyJS Template project.
393
393
394
394
@@ -414,7 +414,7 @@ window.$docsify = {
414
414
415
415
// Name which appears at the top of the sidebar.
416
416
name:'docsify'
417
-
}
417
+
};
418
418
```
419
419
420
420
**Homepage**
@@ -477,19 +477,12 @@ Load this plugin in `head` tag.
477
477
478
478
!> **Important:** This will not work at the end of the body like most plugins, since the plugin's global variable needs be available when the app is configured.
479
479
480
-
Configure the plugin. Here is the format at the explanation.
- Example based on this repo, where the docs site is in the `docs` directory.
503
496
```javascript
504
-
var docBase = 'https://github.com/MichaelCurrin/docsify-js-tutorial/blob/master/docs/'
505
-
EditOnGithubPlugin.create(docBase)
497
+
var docBase = 'https://github.com/MichaelCurrin/docsify-js-tutorial/blob/master/docs/';
498
+
EditOnGithubPlugin.create(docBase);
506
499
```
507
500
- `docEditBase`
508
501
- Optional.
@@ -514,30 +507,31 @@ Arguments:
514
507
EditOnGithubPlugin.create(
515
508
repo,
516
509
null,
517
-
'Improve this page',
518
-
)
510
+
'Improve this page'
511
+
);
519
512
```
520
513
521
-
522
-
Example:
514
+
Full example:
523
515
524
516
```javascript
525
517
var repo = 'https://github.com/MichaelCurrin/docsify-js-tutorial';
526
518
527
519
window.$docsify = {
528
520
name: 'DocsifyJS Tutorial',
529
521
repo: repo,
522
+
530
523
plugins: [
531
524
EditOnGithubPlugin.create(
532
-
repo + '/blob/master/docs/',
533
-
null,
534
-
'Improve this page'
525
+
repo + '/blob/master/docs/'
535
526
)
536
527
],
528
+
};
537
529
```
538
530
539
531
?> Note that `repo` is defined first and then used in two places. This makes the code easy to maintain as it avoids duplication.
540
532
533
+
?> Note that plugins are generally not defined on app config inside the `plugins` field, but it applies here at least. Docsify handles it [here](https://github.com/docsifyjs/docsify/blob/develop/src/plugins/front-matter/index.js).
0 commit comments