Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 57b109a

Browse files
Update README.md
1 parent c18df88 commit 57b109a

File tree

1 file changed

+30
-27
lines changed

1 file changed

+30
-27
lines changed

β€Ždocs/README.mdβ€Ž

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# DocsifyJS Tutorial
2-
> How to build a docs site using _DocsifyJS_ and _Github Pages_
2+
> How to build a docs site using _DocsifyJS_ and _GitHub Pages_
3+
4+
[![MichaelCurrin - docsify-js-tutorial](https://img.shields.io/static/v1?label=MichaelCurrin&message=docsify-js-tutorial&color=blue&logo=github)](https://github.com/MichaelCurrin/docsify-js-tutorial)
5+
[![stars - docsify-js-tutorial](https://img.shields.io/github/stars/MichaelCurrin/docsify-js-tutorial?style=social)](https://github.com/MichaelCurrin/docsify-js-tutorial)
6+
[![forks - docsify-js-tutorial](https://img.shields.io/github/forks/MichaelCurrin/docsify-js-tutorial?style=social)](https://github.com/MichaelCurrin/docsify-js-tutorial)
37

48
[![GitHub tag](https://img.shields.io/github/tag/MichaelCurrin/docsify-js-tutorial?color=3271a8)](https://GitHub.com/MichaelCurrin/docsify-js-tutorial/tags/)
59
[![License](https://img.shields.io/badge/License-MIT-3271a8)](https://github.com/MichaelCurrin/docsify-js-tutorial/blob/master/README.md#license)
610

711
[![Made with Docsify latest](https://img.shields.io/npm/v/docsify?label=docsify&color=3271a8)](https://docsify.js.org/)
812

9-
Convert your **docs** folder into a pretty docs website - using [DocsifyJS](https://docsify.js.org/) and some minimal setup instructions. This project's site itself is also running on _DocsifyJS_. :tada:
13+
Convert your **docs** folder into a pretty docs website - using a lightweight JS library called [DocsifyJS](https://docsify.js.org/) and some minimal set up instructions. This project's site itself is also running on _DocsifyJS_. :tada:
1014

1115
?> _DocsifyJS_ is sometimes just called _Docsify_ in this guide. Also known as _Docsify.js_.
1216

@@ -24,17 +28,17 @@ This project is for you if you answer _yes_ to any of the following:
2428
- Looking for a template which is based on real world use?
2529

2630

27-
## Setup a _Docsify_ site to run
31+
## Set up a _Docsify_ site to run
2832

2933
This project provides three approaches for choosing a Docsify site to run:
3034

3135
- Use the [Quickstart local server](#quickstart-local-server)
3236
- Clone this repo and start serving the docs repo immediately.
3337
- [Setup your own docs site](#setup-your-own-docs-site) from scratch
34-
- Convert your _docs_ directory into a docs site hosted on Github Pages. Copy from some templates files to get up and running with as little effort as possible.
38+
- Convert your _docs_ directory into a docs site hosted on GitHub Pages. Copy from some templates files to get up and running with as little effort as possible.
3539
- Use my [DocsifyJS Template](https://github.com/michaelcurrin/docsify-js-template/) repo
3640
- A minimal template which goes with this tutorial.
37-
- Click [Use this template](https://img.shields.io/badge/Use_this_template-green.svg?style=for-the-badge) to add a copy to you own repos. you'll be able to starting serving a site on Github Pages or locally.
41+
- Click [Use this template](https://img.shields.io/badge/Use_this_template-green.svg?style=for-the-badge) to add a copy to you own repos. you'll be able to starting serving a site on GitHub Pages or locally.
3842

3943
_Note: The instructions in this repo are intended for Linux and macOS environments._
4044

@@ -68,7 +72,7 @@ This great [article](https://dev.to/evilmartians/keeping-oss-documentation-with-
6872
6973
### My projects
7074

71-
- [DocsifyJS Tutorial](https://github.com/michaelcurrin/docsify-js-tutorial/) repo on Github.
75+
- [DocsifyJS Tutorial](https://github.com/michaelcurrin/docsify-js-tutorial/) repo on GitHub.
7276
- [DocsifyJS Template](https://michaelcurrin.github.io/docsify-js-template/) project.
7377
- [MkDocs Quickstart](https://michaelcurrin.github.io/mkdocs-quickstart/) project
7478
- As an alternative to Docsify, try this demo / tutorial / template around MkDocs.
@@ -104,7 +108,7 @@ Main components of a _Docsify_ site:
104108
- Optional.
105109
- Describes the menu layout for the **top right menu**.
106110

107-
Once you have that setup in _docs_ directory and have pushed to Github, you can setup Github Pages serving the _docs_ directory. Note: _Docsify_ also works with _Netlify_ as per their docs, but this project just considers the Github Pages case.
111+
Once you have that setup in _docs_ directory and have pushed to GitHub, you can setup GitHub Pages serving the _docs_ directory. Note: _Docsify_ also works with _Netlify_ as per their docs, but this project just considers the GitHub Pages case.
108112

109113
### Linking to pages
110114

@@ -290,7 +294,7 @@ Docsify provides a cover page - a simple page that a visitor sees before scrolli
290294

291295
If you want to use it, make sure `coverpage: true` is set in your app config.
292296

293-
Then create and edit a *docs/_coverpage.md* file. You can also use the template project's [cover page](https://raw.githubusercontent.com/MichaelCurrin/docsify-js-template/master/docs/_coverpage.md) on Github as a reference.
297+
Then create and edit a *docs/_coverpage.md* file. You can also use the template project's [cover page](https://raw.githubusercontent.com/MichaelCurrin/docsify-js-template/master/docs/_coverpage.md) on GitHub as a reference.
294298

295299
You can add additional buttons to the bottom of the homepage, but there should be no gaps between the lines in your file. And the _last_ one will be solid while the others will be transparent.
296300

@@ -339,7 +343,7 @@ Not covered here - see [jhildenbiddle/docsify-themeable](https://github.com/jhil
339343

340344
Optionally set a theme color. This affects how some content looks, such as quoted blocks, underlined text and buttons. This will default to theme's default if not set manually. i.e. green for _Vue_ and blue for _Buble_.
341345

342-
```js
346+
```javascript
343347
window.$docsify = {
344348
themeColor: '#3F51B5',
345349
};
@@ -413,7 +417,7 @@ Here is a some useful button styling I added to a site. The [Bess CSS Button Gen
413417

414418
### 7. Advanced configuration
415419

416-
The configuration steps above already get you a prettier and more usable site in my opinion than the barebones one which the _Docsify_ `init` command or their _Quickstart_ guide gives you. This section covers advanced steps - you may skip these and jump straight to the [Github Pages](#setup-github-pages-site) section.
420+
The configuration steps above already get you a prettier and more usable site in my opinion than the barebones one which the _Docsify_ `init` command or their _Quickstart_ guide gives you. This section covers advanced steps - you may skip these and jump straight to the [GitHub Pages](#setup-github-pages-site) section.
417421

418422
#### App configuration
419423

@@ -533,18 +537,18 @@ Also of interest:
533537
- [Awesome plugins](https://docsify.js.org/#/awesome?id=plugins)
534538

535539

536-
##### Use the Edit on Github plugin
540+
##### Use the Edit on GitHub plugin
537541

538-
Load and configure this plugin to add the `Edit on Github` link in the top right of each page (excluding the cover page).
542+
Load and configure this plugin to add the `Edit on GitHub` link in the top right of each page (excluding the cover page).
539543

540-
- [njleonzhang/docsify-edit-on-github](https://github.com/njleonzhang/docsify-edit-on-github) on Github.
544+
- [njleonzhang/docsify-edit-on-github](https://github.com/njleonzhang/docsify-edit-on-github) on GitHub.
541545

542546

543547
Load this plugin near the end of the `head` tag.
544548

545549
!> **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.
546550
547-
```javascript
551+
```html
548552
<script src="//unpkg.com/docsify-edit-on-github/index.js"></script>
549553
```
550554
@@ -556,7 +560,7 @@ Configure the plugin - see below.
556560
Function call:
557561
558562
```javascript
559-
EditOnGithubPlugin.create(docBase)
563+
EditOnGitHubPlugin.create(docBase)
560564
```
561565
562566
Here we just use one argument and ignore rest.
@@ -565,7 +569,7 @@ Arguments:
565569
566570
- `docBase`
567571
- Required.
568-
- It should be a full URL to the **document folder** of your Github project.
572+
- It should be a full URL to the **document folder** of your GitHub project.
569573
- Here is the general form - use your own repo details and typically `BRANCH` is `master` and `DIRECTORY` is `docs`.
570574
```
571575
https://github.com/USERNAME/REPONAME/blob/BRANCH/DIRECTORY/'
@@ -574,7 +578,7 @@ Arguments:
574578
```javascript
575579
var docBase = 'https://github.com/MichaelCurrin/docsify-js-tutorial/blob/master/docs/';
576580

577-
EditOnGithubPlugin.create(docBase);
581+
EditOnGitHubPlugin.create(docBase);
578582
```
579583
580584
Full example:
@@ -587,7 +591,7 @@ window.$docsify = {
587591
repo: repo,
588592

589593
plugins: [
590-
EditOnGithubPlugin.create(
594+
EditOnGitHubPlugin.create(
591595
repo + '/blob/master/docs/'
592596
)
593597
],
@@ -605,7 +609,7 @@ Then save and view the site.
605609
Function call:
606610
607611
```javascript
608-
EditOnGithubPlugin.create(docBase, docEditBase, title)
612+
EditOnGitHubPlugin.create(docBase, docEditBase, title)
609613
```
610614
611615
Arguments:
@@ -619,21 +623,21 @@ Arguments:
619623
- Set to override the message. e.g. `'Improve this page'` or `'Edit on GitHub'` or `'πŸ“ Edit this page'`.
620624
- Example:
621625
```javascript
622-
EditOnGithubPlugin.create(
626+
EditOnGitHubPlugin.create(
623627
repo,
624628
null,
625629
'Improve this page'
626630
);
627631
```
628632
629633
630-
## Setup Github Pages site
634+
## Set up GitHub Pages site
631635
632636
If you followed the steps above, you'll have a locally running docs site.
633637

634-
Now, commit and push the files to Github.
638+
Now, commit and push the files to GitHub.
635639

636-
Next, edit your repo's setting on Github. Select the option to serve the `docs` directory of the `master` branch as Github Pages site. When you refresh the settings page, then you will see a link to your site there.
640+
Next, edit your repo's setting on GitHub. Select the option to serve the `docs` directory of the `master` branch as GitHub Pages site. When you refresh the settings page, then you will see a link to your site there.
637641
638642
Open the link in the browser.
639643
@@ -737,7 +741,7 @@ Raw markdown:
737741
738742
!> Do not put two embed items in a sequence without some characters in between, otherwise you will get a JS error rending the page. Putting an empty line between them is **not** sufficient.
739743
740-
!> If you embed a URL of a Github file, remember to use the _Raw_ URL otherwise you will get an error.
744+
!> If you embed a URL of a GitHub file, remember to use the _Raw_ URL otherwise you will get an error.
741745
742746
743747
### Use DocsifyJS styling
@@ -858,7 +862,7 @@ This approach is ideal for scoring higher on search engines, as the pre-rendered
858862

859863
This command is easy to run locally.
860864

861-
Unfortunately this solution does **not** work on static site solutions like Github Pages or Netlify. The Docsify docs recommend using the `now` command to publish a Node.js app for free to [vercel.com/](https://vercel.com/) (previously [zeit.co](https://zeit.co/)).
865+
Unfortunately this solution does **not** work on static site solutions like GitHub Pages or Netlify. The Docsify docs recommend using the `now` command to publish a Node.js app for free to [vercel.com/](https://vercel.com/) (previously [zeit.co](https://zeit.co/)).
862866

863867

864868
## Static site vs SPA
@@ -873,10 +877,9 @@ See [Server-Side Rendering](https://docsify.js.org/#/ssr) section of the _Docsif
873877

874878
I don't think it'll includes a sitemap file.
875879

876-
877880
### Why not use a static site generator?
878881

879-
_Docsify_ is a SPA, not a static-site generator.
882+
_Docsify_ is a SPA, not a static-site generator.Thoughthis should hopefully change when Docsify version 5 comes out.
880883

881884
_Jekyll_ and _Hugo_ are excellent options for static site generators. They can use themes suited to documentation and they can build off of a _docs_ directory. If you want to read more about those, see my [resources](https://github.com/MichaelCurrin/static-sites-generator-resources) project.
882885

0 commit comments

Comments
(0)

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /