Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 62ae6eb

Browse files
Update README.md
1 parent 50670d9 commit 62ae6eb

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

docs/README.md

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ You can update the config parameters passed in on the _index.html_ page. There a
388388
**Links**
389389

390390
- 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.
392392
- 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.
393393

394394

@@ -414,7 +414,7 @@ window.$docsify = {
414414

415415
// Name which appears at the top of the sidebar.
416416
name: 'docsify'
417-
}
417+
};
418418
```
419419

420420
**Homepage**
@@ -477,19 +477,12 @@ Load this plugin in `head` tag.
477477

478478
!> **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.
479479

480-
Configure the plugin. Here is the format at the explanation.
480+
Configure the plugin. Here is the format:n.
481481

482482
```javascript
483483
EditOnGithubPlugin.create(docBase, docEditBase, title)
484484
```
485485

486-
Minimum:
487-
488-
```
489-
EditOnGithubPlugin.create(docBase, docEditBase, title)
490-
```
491-
492-
493486
Arguments:
494487

495488
- `docBase`
@@ -501,8 +494,8 @@ Arguments:
501494
```
502495
- Example based on this repo, where the docs site is in the `docs` directory.
503496
```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);
506499
```
507500
- `docEditBase`
508501
- Optional.
@@ -514,30 +507,31 @@ Arguments:
514507
EditOnGithubPlugin.create(
515508
repo,
516509
null,
517-
'Improve this page',
518-
)
510+
'Improve this page'
511+
);
519512
```
520513
521-
522-
Example:
514+
Full example:
523515
524516
```javascript
525517
var repo = 'https://github.com/MichaelCurrin/docsify-js-tutorial';
526518
527519
window.$docsify = {
528520
name: 'DocsifyJS Tutorial',
529521
repo: repo,
522+
530523
plugins: [
531524
EditOnGithubPlugin.create(
532-
repo + '/blob/master/docs/',
533-
null,
534-
'Improve this page'
525+
repo + '/blob/master/docs/'
535526
)
536527
],
528+
};
537529
```
538530

539531
?> Note that `repo` is defined first and then used in two places. This makes the code easy to maintain as it avoids duplication.
540532

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).
534+
541535

542536
## Setup Github Pages site
543537

0 commit comments

Comments
 (0)