Skip to content

Commit fc71b56

Browse files
committed
Merge branch 'develop' into docsify-class
* develop: docs: removed codefund docs and plugin (#1262) docs: remove bundle size from the home page and documentation (#1257) fix: search can not search the table header (#1256) fix: after setting the background image, the button is obscured (#1234) Fix: fixed onlycover flag in mobile (#1243) fix: Updated docs with instructions for installing specific version (fixes #780) (#1225) fix: Add error handling for missing dependencies (fixes #1210) (#1232) [documdocs: deploy docsify in docker. (#1241) docs: Add embed gist instructions to Embed Files (fixes #932 ) (#1238) chore: add changelog 4.11.4 [build] 4.11.4 feat: added html sanitizer for remote rendering (#1128)
2 parents e3f5719 + c78cb11 commit fc71b56

24 files changed

+996
-931
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module.exports = {
1919
rules: {
2020
'prettier/prettier': ['error'],
2121
camelcase: ['warn'],
22+
'no-useless-escape': ['warn'],
2223
curly: ['error', 'all'],
2324
'dot-notation': ['error'],
2425
eqeqeq: ['error'],

CHANGELOG.md

+29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
## [4.11.4](https://github.com/docsifyjs/docsify/compare/v4.11.3...v4.11.4) (2020-06-18)
2+
3+
4+
### Bug Fixes
5+
6+
* consistent location of search result ([e9dd2de](https://github.com/docsifyjs/docsify/commit/e9dd2de384b81619aae2bcbf92f52721cb76a177))
7+
* cover overlapping sidebar by removing z-index ([0bf03f5](https://github.com/docsifyjs/docsify/commit/0bf03f58103037d100b1635cf3989c8d3672b4ba))
8+
* cross-origin url cannot be redirected when "externalLinkTarget" is set to "_self" and "routerMode" is set to "history". ([#1062](https://github.com/docsifyjs/docsify/issues/1062)) ([fd2cec6](https://github.com/docsifyjs/docsify/commit/fd2cec6bd66c46d6957811fefae4c615c3052a4f)), closes [#1046](https://github.com/docsifyjs/docsify/issues/1046) [#1046](https://github.com/docsifyjs/docsify/issues/1046) [#1046](https://github.com/docsifyjs/docsify/issues/1046)
9+
* default html img resize if no height included ([#1065](https://github.com/docsifyjs/docsify/issues/1065)) ([9ff4d06](https://github.com/docsifyjs/docsify/commit/9ff4d0677304bc190e7bd9e89bbbdc64895197fa))
10+
* fixed target and rel issue (fixes [#1183](https://github.com/docsifyjs/docsify/issues/1183)) ([3d662a5](https://github.com/docsifyjs/docsify/commit/3d662a5bf71bbfef077cfbc478df241d794f55a0))
11+
* Inconsistent search and body rendering ([dcb0aae](https://github.com/docsifyjs/docsify/commit/dcb0aaea99efbd68175f1d1aeb5076b6dde9801e))
12+
* rendering cover width bug ([717991c](https://github.com/docsifyjs/docsify/commit/717991c90cf709f4da91fe32610129de6529266b))
13+
* search does not find the contents of the table ([#1198](https://github.com/docsifyjs/docsify/issues/1198)) ([31010e4](https://github.com/docsifyjs/docsify/commit/31010e4979b3d3ab4bd247a09c4ac5fd1405eaa8))
14+
* The search error after setting the ID in the title ([#1159](https://github.com/docsifyjs/docsify/issues/1159)) ([6e554f8](https://github.com/docsifyjs/docsify/commit/6e554f8ebd3d4a2c5c7e4f66cff3dfe2b6aa1e31))
15+
* upgrade docsify from 4.10.2 to 4.11.2 ([60b7f89](https://github.com/docsifyjs/docsify/commit/60b7f89b373b0d48ec8406a51eddeaed8126696d))
16+
17+
18+
### Features
19+
20+
* added html sanitizer for remote rendering ([#1128](https://github.com/docsifyjs/docsify/issues/1128)) ([714ef29](https://github.com/docsifyjs/docsify/commit/714ef29afe779a6db5c4761ebaacdfc70ee2d8dd))
21+
* update src/core/index.js to export all global APIs, deprecate old globals in favor of a single global DOCSIFY, and add tests for this ([7e002bf](https://github.com/docsifyjs/docsify/commit/7e002bf939d7837843908417b5445b4f8d36c1cd))
22+
23+
24+
### Reverts
25+
26+
* Revert "Updated docs site dark and light mode with switch and redesigned search bar using docsify-darklight-theme" (#1207) ([26cb940](https://github.com/docsifyjs/docsify/commit/26cb940b51d34ee584b8425012a336f38a4abd76)), closes [#1207](https://github.com/docsifyjs/docsify/issues/1207) [#1182](https://github.com/docsifyjs/docsify/issues/1182)
27+
28+
29+
130
## [4.11.3](https://github.com/docsifyjs/docsify/compare/v4.11.2...v4.11.3) (2020-03-24)
231

332

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<p align="center">
1212
<a href="#backers"><img alt="Backers on Open Collective" src="https://opencollective.com/docsify/backers/badge.svg?style=flat-square"></a>
1313
<a href="#sponsors">
14-
<img alt="Sponsors on Open Collective" src="https://opencollective.com/docsify/sponsors/badge.svg?style=flat-square"></a>
14+
<img alt="Sponsors on Open Collective" src="https://opencollective.com/docsify/sponsors/badge.svg?style=flat-square"></a>
1515
<a><img src="https://github.com/docsifyjs/docsify/workflows/Unit%20tests%20Suite/badge.svg?branch=develop&amp;event=push" alt="Unit tests Suite"></a>
1616
<a><img src="https://github.com/docsifyjs/docsify/workflows/Linting%20Checks/badge.svg?branch=develop&amp;event=push" alt="Linting Checks"></a>
1717
<a><img src="https://github.com/docsifyjs/docsify/workflows/Testing%20the%20e2e%20test%20suites/badge.svg?branch=develop&amp;event=push" alt="Testing the e2e test suites"></a>
@@ -41,7 +41,7 @@
4141
## Features
4242

4343
- No statically built html files
44-
- Simple and lightweight (~21kB gzipped)
44+
- Simple and lightweight
4545
- Smart full-text search plugin
4646
- Multiple themes
4747
- Useful plugin API

build/build.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,17 @@ async function build(opts) {
2929
__VERSION__: version,
3030
'process.env.SSR': false
3131
})
32-
])
32+
]),
33+
onwarn: function (message) {
34+
if (message.code === 'UNRESOLVED_IMPORT') {
35+
throw new Error(
36+
`Could not resolve module ` +
37+
message.source +
38+
`. Try running 'npm install' or using rollup's 'external' option if this is an external dependency. ` +
39+
`Module ${message.source} is imported in ${message.importer}`
40+
)
41+
}
42+
}
3343
})
3444
.then(function (bundle) {
3545
var dest = 'lib/' + (opts.output || opts.input)

cypress/fixtures/tpl/docs.index.html

+104-116
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,111 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<title>docsify-e2e-tests</title>
6-
<link rel="icon" href="_media/favicon.ico" />
7-
<meta
8-
name="google-site-verification"
9-
content="6t0LoIeFksrjF4c9sqUEsVXiQNxLp2hgoqo0KryT-sE"
10-
/>
11-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
12-
<meta
13-
name="keywords"
14-
content="doc,docs,documentation,gitbook,creator,generator,github,jekyll,github-pages"
15-
/>
16-
<meta name="description" content="A magical documentation generator." />
17-
<meta
18-
name="viewport"
19-
content="width=device-width, initial-scale=1.0, minimum-scale=1.0"
20-
/>
21-
<link rel="stylesheet" href="lib/themes/vue.css" title="vue" />
22-
<link rel="stylesheet" href="lib/themes/dark.css" title="dark" disabled />
23-
<link rel="stylesheet" href="lib/themes/buble.css" title="buble" disabled />
24-
<link rel="stylesheet" href="lib/themes/pure.css" title="pure" disabled />
25-
<script src="//unpkg.com/docsify-plugin-codefund/index.js"></script>
26-
<style>
27-
nav.app-nav li ul {
28-
min-width: 100px;
29-
}
30-
</style>
31-
</head>
323

33-
<body>
34-
<div id="app">Loading Docsify e2e tests suite...</div>
35-
<script>
36-
window.$docsify = {
37-
alias: {
38-
'.*?/awesome':
39-
'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md',
40-
'.*?/changelog':
41-
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
42-
'/.*/_navbar.md': '/_navbar.md',
43-
'/zh-cn/(.*)':
44-
'https://raw.githubusercontent.com/docsifyjs/docs-zh/master/$1',
45-
'/de-de/(.*)':
46-
'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1',
47-
'/ru/(.*)':
48-
'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1',
49-
'/es/(.*)':
50-
'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1'
51-
},
52-
auto2top: true,
53-
coverpage: true,
54-
executeScript: true,
55-
loadSidebar: true,
56-
loadNavbar: true,
57-
mergeNavbar: true,
58-
maxLevel: 4,
59-
subMaxLevel: 2,
60-
ga: 'UA-106147152-1',
61-
matomo: {
62-
host: '//matomo.thunderwave.de',
63-
id: 6
64-
},
65-
name: 'docsify',
66-
search: {
67-
noData: {
68-
'/de-de/': 'Keine Ergebnisse!',
69-
'/zh-cn/': '没有结果!',
70-
'/': 'No results!'
71-
},
72-
paths: 'auto',
73-
placeholder: {
74-
'/de-de/': 'Suche',
75-
'/zh-cn/': '搜索',
76-
'/': 'Search'
77-
}
4+
<head>
5+
<meta charset="UTF-8" />
6+
<title>docsify-e2e-tests</title>
7+
<link rel="icon" href="_media/favicon.ico" />
8+
<meta name="google-site-verification" content="6t0LoIeFksrjF4c9sqUEsVXiQNxLp2hgoqo0KryT-sE" />
9+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
10+
<meta name="keywords" content="doc,docs,documentation,gitbook,creator,generator,github,jekyll,github-pages" />
11+
<meta name="description" content="A magical documentation generator." />
12+
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
13+
<link rel="stylesheet" href="lib/themes/vue.css" title="vue" />
14+
<link rel="stylesheet" href="lib/themes/dark.css" title="dark" disabled />
15+
<link rel="stylesheet" href="lib/themes/buble.css" title="buble" disabled />
16+
<link rel="stylesheet" href="lib/themes/pure.css" title="pure" disabled />
17+
<style>
18+
nav.app-nav li ul {
19+
min-width: 100px;
20+
}
21+
</style>
22+
</head>
23+
24+
<body>
25+
<div id="app">Loading Docsify e2e tests suite...</div>
26+
<script>
27+
window.$docsify = {
28+
alias: {
29+
'.*?/awesome':
30+
'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md',
31+
'.*?/changelog':
32+
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
33+
'/.*/_navbar.md': '/_navbar.md',
34+
'/zh-cn/(.*)':
35+
'https://raw.githubusercontent.com/docsifyjs/docs-zh/master/$1',
36+
'/de-de/(.*)':
37+
'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1',
38+
'/ru/(.*)':
39+
'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1',
40+
'/es/(.*)':
41+
'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1'
42+
},
43+
auto2top: true,
44+
coverpage: true,
45+
executeScript: true,
46+
loadSidebar: true,
47+
loadNavbar: true,
48+
mergeNavbar: true,
49+
maxLevel: 4,
50+
subMaxLevel: 2,
51+
ga: 'UA-106147152-1',
52+
matomo: {
53+
host: '//matomo.thunderwave.de',
54+
id: 6
55+
},
56+
name: 'docsify',
57+
search: {
58+
noData: {
59+
'/de-de/': 'Keine Ergebnisse!',
60+
'/zh-cn/': '没有结果!',
61+
'/': 'No results!'
7862
},
79-
formatUpdated: '{MM}/{DD} {HH}:{mm}',
80-
plugins: [
81-
function(hook, vm) {
82-
hook.beforeEach(function(html) {
83-
if (/githubusercontent\.com/.test(vm.route.file)) {
84-
url = vm.route.file
85-
.replace('raw.githubusercontent.com', 'github.com')
86-
.replace(/\/master/, '/blob/master')
87-
} else {
88-
url =
89-
'https://github.com/docsifyjs/docsify/blob/master/docs/' +
90-
vm.route.file
91-
}
92-
var editHtml = '[:memo: Edit Document](' + url + ')\n'
93-
return (
94-
editHtml +
95-
html +
96-
'\n\n----\n\n' +
97-
'<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>'
98-
)
99-
})
100-
}
101-
]
102-
}
103-
</script>
104-
<script src="lib/docsify.min.js"></script>
105-
<script src="lib/plugins/search.min.js"></script>
106-
<script src="lib/plugins/ga.min.js"></script>
107-
<script src="lib/plugins/matomo.min.js"></script>
108-
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
109-
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
110-
<script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script>
63+
paths: 'auto',
64+
placeholder: {
65+
'/de-de/': 'Suche',
66+
'/zh-cn/': '搜索',
67+
'/': 'Search'
68+
}
69+
},
70+
formatUpdated: '{MM}/{DD} {HH}:{mm}',
71+
plugins: [
72+
function (hook, vm) {
73+
hook.beforeEach(function (html) {
74+
if (/githubusercontent\.com/.test(vm.route.file)) {
75+
url = vm.route.file
76+
.replace('raw.githubusercontent.com', 'github.com')
77+
.replace(/\/master/, '/blob/master')
78+
} else {
79+
url =
80+
'https://github.com/docsifyjs/docsify/blob/master/docs/' +
81+
vm.route.file
82+
}
83+
var editHtml = '[:memo: Edit Document](' + url + ')\n'
84+
return (
85+
editHtml +
86+
html +
87+
'\n\n----\n\n' +
88+
'<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>'
89+
)
90+
})
91+
}
92+
]
93+
}
94+
</script>
95+
<script src="lib/docsify.min.js"></script>
96+
<script src="lib/plugins/search.min.js"></script>
97+
<script src="lib/plugins/ga.min.js"></script>
98+
<script src="lib/plugins/matomo.min.js"></script>
99+
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
100+
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
101+
<script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script>
111102

112-
<script>
113-
;((window.gitter = {}).chat = {}).options = {
103+
<script>
104+
; ((window.gitter = {}).chat = {}).options = {
114105
room: 'docsifyjs/Lobby'
115106
}
116-
</script>
117-
<script
118-
src="https://sidecar.gitter.im/dist/sidecar.v1.js"
119-
async
120-
defer
121-
></script>
122-
</body>
123-
</html>
107+
</script>
108+
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
109+
</body>
110+
111+
</html>

cypress/integration/sidebar/config.spec.js

-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ context('sidebar.configurations', () => {
157157
'disqus',
158158
'gitalk',
159159
'pagination',
160-
'codefund',
161160
'tabs',
162161
'more-plugins',
163162
];

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See the [Quick start](quickstart.md) guide for more details.
1111
## Features
1212

1313
- No statically built html files
14-
- Simple and lightweight (~21kB gzipped)
14+
- Simple and lightweight
1515
- Smart full-text search plugin
1616
- Multiple themes
1717
- Useful plugin API

docs/_coverpage.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
![logo](_media/icon.svg)
22

3-
# docsify <small>4.11.3</small>
3+
# docsify <small>4.11.4</small>
44

55
> A magical documentation site generator.
66
7-
- Simple and lightweight (~21kB gzipped)
7+
- Simple and lightweight
88
- No statically built html files
99
- Multiple themes
1010

docs/cover.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Set `coverpage` to **true**, and create a `_coverpage.md`:
2626

2727
> A magical documentation site generator.
2828

29-
- Simple and lightweight (~21kB gzipped)
29+
- Simple and lightweight
3030
- No statically built html files
3131
- Multiple themes
3232

docs/deploy.md

+46
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,49 @@ frontend:
135135
| /<*>.md | /<*>.md | 200 (Rewrite) |
136136
| /<*>.png | /<*>.png | 200 (Rewrite) |
137137
| /<*> | /index.html | 200 (Rewrite) |
138+
139+
140+
## Docker
141+
142+
- Create docsify files
143+
144+
You need prepare the initial files instead of making in container.
145+
See the [Quickstart](https://docsify.js.org/#/quickstart) section for instructions on how to create these files manually or using [docsify-cli](https://github.com/docsifyjs/docsify-cli).
146+
147+
```sh
148+
index.html
149+
README.md
150+
```
151+
152+
- Create dockerfile
153+
154+
```Dockerfile
155+
FROM node:latest
156+
LABEL description="A demo Dockerfile for build Docsify."
157+
WORKDIR /docs
158+
RUN npm install -g docsify-cli@latest
159+
EXPOSE 3000/tcp
160+
ENTRYPOINT docsify serve .
161+
162+
```
163+
164+
So, current directory structure should be this:
165+
166+
```sh
167+
index.html
168+
README.md
169+
Dockerfile
170+
```
171+
172+
- Build docker image
173+
174+
```sh
175+
docker build -f Dockerfile -t docsify/demo .
176+
```
177+
178+
- Run docker image
179+
180+
```sh
181+
docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo
182+
```
183+

0 commit comments

Comments
 (0)