Skip to content

Commit 05d650e

Browse files
authored
Merge branch 'develop' into master
2 parents 366500f + 0268594 commit 05d650e

File tree

19 files changed

+335
-183
lines changed

19 files changed

+335
-183
lines changed

README.md

+8-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
@@ -123,3 +123,9 @@ This project exists thanks to all the people who contribute. [[Contribute](CONTR
123123
## License
124124

125125
[MIT](LICENSE)
126+
127+
## Special Thanks
128+
129+
_Vercel_ has given us a Pro account.
130+
131+
<a href="https://vercel.com/?utm_source=docsifyjsdocs" target="_blank"><img src="docs/_media/vercel_logo.svg" width="100px"></a>

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

+7-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
@@ -30,3 +30,9 @@ Please consider donating if you think docsify is helpful to you or that my work
3030
## Community
3131

3232
Users and the development team are usually in the [Gitter chat room](https://gitter.im/docsifyjs/Lobby).
33+
34+
## Special Thanks
35+
36+
_Vercel_ has given us a Pro account.
37+
38+
<a href="https://vercel.com/?utm_source=docsifyjsdocs" target="_blank"><img src="_media/vercel_logo.svg" width="100px"></a>

docs/_coverpage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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/_media/vercel_logo.svg

+1
Loading

docs/_navbar.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
- [:cn: 中文](/zh-cn/)
44
- [:de: Deutsch](/de-de/)
55
- [:es: Spanish](/es/)
6-
- [:ru: Russian](/ru/)
6+
- [:ru: Russian](/ru-ru/)

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)