Skip to content

Commit 92b0e39

Browse files
committed
Formatted and organized headings and html blocks for version specification
1 parent 05753ee commit 92b0e39

File tree

1 file changed

+20
-27
lines changed

1 file changed

+20
-27
lines changed

docs/quickstart.md

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ docsify serve docs
3636

3737
## Manual initialization
3838

39-
If you don't like `npm` or have trouble installing the tool, you can manually create `index.html`:
39+
If you don't like `npm` or have trouble installing the tool, you can manually create `index.html` (the code below will load the latest version of docsify automatically. If you want a specific version to avoid any broken elements in the future, [see below](#specifying-docsify-versions)):
4040

4141
```html
4242
<!-- index.html -->
@@ -61,33 +61,26 @@ If you don't like `npm` or have trouble installing the tool, you can manually cr
6161
</html>
6262
```
6363

64-
If you want to install a specific version of docsify, you can manually create `index.html`:
64+
### Specifying docsify versions
65+
66+
?> Note that in both of the examples below, docsify URLs will need to be manually updated when a new major version of docsify is released (e.g. `v4.x.x` => `v5.x.x`). Check the docsify website periodically to see if a new major version has been released.
67+
68+
Specifying a major version in the URL (`@4`) will allow your site will receive non-breaking enhancements (i.e. "minor" updates) and bug fixes (i.e. "patch" updates) automatically. This is the recommended way to load docsify resources.
6569

6670
```html
67-
!-- index.html -->
71+
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/themes/vue.css" />
72+
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
73+
```
6874

69-
<!DOCTYPE html>
70-
<html>
71-
<head>
72-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
73-
<meta name="viewport" content="width=device-width,initial-scale=1">
74-
<meta charset="UTF-8">
75-
<!-- Docsify v4 -->
76-
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/themes/vue.css">
77-
</head>
78-
<body>
79-
<div id="app"></div>
80-
<script>
81-
window.$docsify = {
82-
//...
83-
}
84-
</script>
85-
<!-- Docsify v4 -->
86-
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
87-
</body>
88-
</html>
75+
If you prefer to lock docsify to a specific version, specify the full version after the `@` symbol in the URL. This is the safest way to ensure your site will look and behave the same way regardless of any changes made to future versions of docsify.
76+
77+
```html
78+
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/themes/vue.css">
79+
<script src="//cdn.jsdelivr.net/npm/[email protected]"></script>
8980
```
9081

82+
### Manually preview your site
83+
9184
If you installed python on your system, you can easily use it to run a static server to preview your site.
9285

9386
```bash
@@ -99,17 +92,17 @@ cd docs && python -m SimpleHTTPServer 3000
9992
If you want, you can show a loading dialog before docsify starts to render your documentation:
10093

10194
```html
102-
<!-- index.html -->
95+
<!-- index.html -->
10396

104-
<div id="app">Please wait...</div>
97+
<div id="app">Please wait...</div>
10598
```
10699

107100
You should set the `data-app` attribute if you changed `el`:
108101

109102
```html
110-
<!-- index.html -->
103+
<!-- index.html -->
111104

112-
<div data-app id="main">Please wait...</div>
105+
<div data-app id="main">Please wait...</div>
113106

114107
<script>
115108
window.$docsify = {

0 commit comments

Comments
 (0)