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

Skip to content

Commit 909fdda

Browse files
Update README.md
1 parent ce18991 commit 909fdda

File tree

1 file changed

+37
-16
lines changed

1 file changed

+37
-16
lines changed

docs/README.md

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -477,17 +477,22 @@ Load this plugin near the end of the `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.
480+
Configure the plugin.
481+
482+
483+
**Basic usage**
484+
485+
Function call:
481486

482487
```javascript
483-
EditOnGithubPlugin.create(docBase, docEditBase, title)
488+
EditOnGithubPlugin.create(docBase)
484489
```
485490

486491
Arguments:
487492

488493
- `docBase`
489494
- Required.
490-
- It should be a full path to your doc's site directory on Github.
495+
- It should be a full URL to the **document folder** of your Github project.
491496
- Here is the general form - use your own repo details and typically `BRANCH` is `master` and `DIRECTORY` is `docs`.
492497
```
493498
https://github.com/USERNAME/REPONAME/blob/BRANCH/DIRECTORY/'
@@ -498,19 +503,6 @@ Arguments:
498503
499504
EditOnGithubPlugin.create(docBase);
500505
```
501-
- `docEditBase`
502-
- Optional - defaults to the first argument if not set.
503-
- `title`
504-
- Optional - defaults to `'Edit on Github`.
505-
- Set to override the message.
506-
- Example:
507-
```javascript
508-
EditOnGithubPlugin.create(
509-
repo,
510-
null,
511-
'Improve this page'
512-
);
513-
```
514506
515507
Full example:
516508
@@ -533,6 +525,35 @@ window.$docsify = {
533525

534526
?> 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).
535527

528+
Then save and view the site.
529+
530+
**Advanced usage**
531+
532+
Function call:
533+
534+
```javascript
535+
EditOnGithubPlugin.create(docBase, docEditBase, title)
536+
```
537+
538+
Arguments:
539+
540+
- `docBase`
541+
- As in above section.
542+
- `docEditBase`
543+
- Optional - defaults to the first argument if not set.
544+
- `title`
545+
- Optional - defaults to `'Edit on Github`.
546+
- Set to override the message.
547+
- Example:
548+
```javascript
549+
EditOnGithubPlugin.create(
550+
repo,
551+
null,
552+
'Improve this page'
553+
);
554+
```
555+
556+
536557

537558
## Setup Github Pages site
538559

0 commit comments

Comments
 (0)