Skip to content

Commit 54b060c

Browse files
authored
Merge branch 'develop' into snyk-fix-a60eef8bae53e8da31495b734ee57cb4
2 parents e31095e + 5037f0b commit 54b060c

36 files changed

+412
-273
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [ ] Refactor
1515
- [ ] Docs
1616
- [ ] Build-related changes
17+
- [ ] Repo settings
1718
- [ ] Other, please describe:
1819

1920
If changing the UI of default theme, please provide the **before/after** screenshot:
@@ -44,11 +45,3 @@ If adding a **new feature**, the PR's description includes:
4445
- [ ] Related tests have been updated
4546

4647
To avoid wasting your time, it's best to open a **feature request issue** first and wait for approval before working on it.
47-
48-
49-
**Other information:**
50-
51-
---
52-
53-
* [ ] DO NOT include files inside `lib` directory.
54-

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
.DS_Store
33
.idea
44
node_modules
5-
themes/
6-
lib/
7-
cypress/integration/examples
8-
cypress/fixtures/docs
5+
/themes/
6+
/lib/
7+
/cypress/integration/examples
8+
/cypress/fixtures/docs
99

1010
# exceptions
11-
!.gitkeep
11+
!.gitkeep

README.md

Lines changed: 8 additions & 2 deletions
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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ async function build(opts) {
2222
.rollup({
2323
input: opts.input,
2424
plugins: (opts.plugins || []).concat([
25-
buble(),
25+
buble({
26+
transforms: {
27+
dangerousForOf: true
28+
}}),
2629
commonjs(),
2730
nodeResolve(),
2831
replace({
@@ -33,8 +36,8 @@ async function build(opts) {
3336
onwarn: function (message) {
3437
if (message.code === 'UNRESOLVED_IMPORT') {
3538
throw new Error(
36-
`Could not resolve module ` +
37-
message.source +
39+
`Could not resolve module ` +
40+
message.source +
3841
`. Try running 'npm install' or using rollup's 'external' option if this is an external dependency. ` +
3942
`Module ${message.source} is imported in ${message.importer}`
4043
)

cypress/fixtures/tpl/docs.index.html

Lines changed: 105 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,112 @@
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+
fallbackLanguages: ['es'],
44+
auto2top: true,
45+
coverpage: true,
46+
executeScript: true,
47+
loadSidebar: true,
48+
loadNavbar: true,
49+
mergeNavbar: true,
50+
maxLevel: 4,
51+
subMaxLevel: 2,
52+
ga: 'UA-106147152-1',
53+
matomo: {
54+
host: '//matomo.thunderwave.de',
55+
id: 6
56+
},
57+
name: 'docsify',
58+
search: {
59+
noData: {
60+
'/de-de/': 'Keine Ergebnisse!',
61+
'/zh-cn/': '没有结果!',
62+
'/': 'No results!'
7863
},
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>
64+
paths: 'auto',
65+
placeholder: {
66+
'/de-de/': 'Suche',
67+
'/zh-cn/': '搜索',
68+
'/': 'Search'
69+
}
70+
},
71+
formatUpdated: '{MM}/{DD} {HH}:{mm}',
72+
plugins: [
73+
function (hook, vm) {
74+
hook.beforeEach(function (html) {
75+
if (/githubusercontent\.com/.test(vm.route.file)) {
76+
url = vm.route.file
77+
.replace('raw.githubusercontent.com', 'github.com')
78+
.replace(/\/master/, '/blob/master')
79+
} else {
80+
url =
81+
'https://github.com/docsifyjs/docsify/blob/master/docs/' +
82+
vm.route.file
83+
}
84+
var editHtml = '[:memo: Edit Document](' + url + ')\n'
85+
return (
86+
editHtml +
87+
html +
88+
'\n\n----\n\n' +
89+
'<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>'
90+
)
91+
})
92+
}
93+
]
94+
}
95+
</script>
96+
<script src="lib/docsify.min.js"></script>
97+
<script src="lib/plugins/search.min.js"></script>
98+
<script src="lib/plugins/ga.min.js"></script>
99+
<script src="lib/plugins/matomo.min.js"></script>
100+
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
101+
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
102+
<script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script>
111103

112-
<script>
113-
;((window.gitter = {}).chat = {}).options = {
104+
<script>
105+
; ((window.gitter = {}).chat = {}).options = {
114106
room: 'docsifyjs/Lobby'
115107
}
116-
</script>
117-
<script
118-
src="https://sidecar.gitter.im/dist/sidecar.v1.js"
119-
async
120-
defer
121-
></script>
122-
</body>
123-
</html>
108+
</script>
109+
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
110+
</body>
111+
112+
</html>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
context('config.fallbackLanguages', () => {
2+
it('fallbacks respecting aliases', () => {
3+
cy.visit('http://localhost:3000/#/es/');
4+
5+
cy.get('.sidebar-nav').contains('Changelog').click();
6+
7+
cy.get('#main').should('contain', 'Bug Fixes');
8+
})
9+
});

cypress/integration/sidebar/config.spec.js

Lines changed: 0 additions & 1 deletion
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

Lines changed: 7 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 0 deletions
Loading

docs/_navbar.md

Lines changed: 1 addition & 1 deletion
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/cdn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Alternatively, use [compressed files](#compressed-file).
4444

4545
## Other CDN
4646

47-
- http://www.bootcdn.cn/docsify
47+
- https://www.bootcdn.cn/docsify/
4848
- https://cdn.jsdelivr.net/npm/docsify/
4949
- https://cdnjs.com/libraries/docsify
50-
50+
- https://unpkg.com/browse/docsify/

0 commit comments

Comments
 (0)