Skip to content

Commit e58992f

Browse files
authored
Merge branch 'develop' into snyk-fix-3ec1f5a2835b0c7ec854adb3461e3a96
2 parents cf80416 + f7be0b0 commit e58992f

File tree

6 files changed

+25
-13
lines changed

6 files changed

+25
-13
lines changed

cypress/fixtures/tpl/docs.index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
alias: {
2929
'.*?/awesome':
3030
'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md',
31-
'.*?/changelog':
31+
'/changelog':
3232
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
3333
'/.*/_navbar.md': '/_navbar.md',
3434
'/zh-cn/(.*)':
@@ -40,6 +40,7 @@
4040
'/es/(.*)':
4141
'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1'
4242
},
43+
fallbackLanguages: ['es'],
4344
auto2top: true,
4445
coverpage: true,
4546
executeScript: true,
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+
});

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/

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/docsify-server-renderer/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/fetch/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export function fetchMixin(proto) {
123123
this._loadSideAndNav(path, qs, loadSidebar, cb)
124124
),
125125
_ => {
126-
this._fetchFallbackPage(file, qs, cb) || this._fetch404(file, qs, cb);
126+
this._fetchFallbackPage(path, qs, cb) || this._fetch404(file, qs, cb);
127127
}
128128
);
129129

@@ -209,7 +209,9 @@ export function fetchMixin(proto) {
209209
return false;
210210
}
211211

212-
const newPath = path.replace(new RegExp(`^/${local}`), '');
212+
const newPath = this.router.getFile(
213+
path.replace(new RegExp(`^/${local}`), '')
214+
);
213215
const req = request(newPath + qs, true, requestHeaders);
214216

215217
req.then(

0 commit comments

Comments
 (0)