Skip to content

Commit b90c948

Browse files
authored
fix: Updated docs with instructions for installing specific version (fixes #780) (#1225)
* feat: Updated docs with instructions for installing specific version * Removed path and name from script tag * Updated stylesheet with specific version * Formatted and organized headings and html blocks for version specification * Removed html block for latest version
1 parent 3673001 commit b90c948

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

docs/quickstart.md

+26-6
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ If you don't like `npm` or have trouble installing the tool, you can manually cr
4747
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
4848
<meta name="viewport" content="width=device-width,initial-scale=1">
4949
<meta charset="UTF-8">
50-
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css">
50+
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/themes/vue.css" />
5151
</head>
5252
<body>
5353
<div id="app"></div>
@@ -56,11 +56,31 @@ If you don't like `npm` or have trouble installing the tool, you can manually cr
5656
//...
5757
}
5858
</script>
59-
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
59+
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
6060
</body>
6161
</html>
6262
```
6363

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.
69+
70+
```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+
```
74+
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/docsify@4.11.4/themes/vue.css">
79+
<script src="//cdn.jsdelivr.net/npm/docsify@4.11.4"></script>
80+
```
81+
82+
### Manually preview your site
83+
6484
If you installed python on your system, you can easily use it to run a static server to preview your site.
6585

6686
```bash
@@ -72,17 +92,17 @@ cd docs && python -m SimpleHTTPServer 3000
7292
If you want, you can show a loading dialog before docsify starts to render your documentation:
7393

7494
```html
75-
<!-- index.html -->
95+
<!-- index.html -->
7696

77-
<div id="app">Please wait...</div>
97+
<div id="app">Please wait...</div>
7898
```
7999

80100
You should set the `data-app` attribute if you changed `el`:
81101

82102
```html
83-
<!-- index.html -->
103+
<!-- index.html -->
84104

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

87107
<script>
88108
window.$docsify = {

0 commit comments

Comments
 (0)