Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release]: v4.11.5 #1340

Merged
merged 32 commits into from Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7ea391b
Merge pull request #1283 from docsifyjs/master
sy-records Jul 14, 2020
d4c9247
fix: gitignore was ignoring folders in src, so VS Code search results…
trusktr Jul 16, 2020
e664a34
remove `lib` from pull request template as it is gitignored
trusktr Jul 16, 2020
117405b
Merge pull request #1287 from docsifyjs/fix-gitignore
trusktr Jul 16, 2020
667496b
feat: Add title to sidebar links (#1286)
sy-records Jul 19, 2020
6f9baab
style: Update index.html and scroll.js (#1292)
sy-records Jul 20, 2020
13d4232
docs: Update helpers.md (#1294)
docyx Jul 20, 2020
b869019
fix: Fix search error when exist translations documents (#1300)
sy-records Jul 22, 2020
9f4f79e
fix typo (#1302)
palkan Jul 23, 2020
78775b6
fix: Search plugin: matched text is replaced with search text (#1298)
huangzhhui Jul 24, 2020
d179dde
feat(search): add pathNamespaces option
palkan Jul 24, 2020
aec03d4
Merge pull request #1307 from palkan/feat/search-path-namespaces
anikethsaha Jul 26, 2020
1a64dc8
chore: grammatical changes (#1296)
bharat-patodi Jul 26, 2020
952f4c9
fix: the uncaught typeerror when el is null (#1308)
sy-records Jul 30, 2020
90d283d
fix: convert {docsify-ignore} and {docsify-ignore-all} to HTML commen…
equinusocio Jul 30, 2020
9150678
fix typo (#1309)
sy-records Jul 30, 2020
2048610
fix: {docsify-updated} in the sample code is parsed into time (#1321)
sy-records Aug 1, 2020
750663e
docs: update other cdn (#1325)
sy-records Aug 2, 2020
2bceabc
fix: fallback page should use path not file location (#1301)
palkan Aug 4, 2020
8fe83cf
chore(deps): bump prismjs in /packages/docsify-server-renderer (#1332)
dependabot[bot] Aug 8, 2020
f7be0b0
chore(deps): bump prismjs from 1.19.0 to 1.21.0 (#1331)
dependabot[bot] Aug 8, 2020
086c285
[Snyk] Security upgrade marked from 0.7.0 to 1.1.1 (#1313)
snyk-bot Aug 13, 2020
1dbb547
chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4 (#1205)
dependabot[bot] Aug 14, 2020
3beaa66
fix: upgrade medium-zoom from 1.0.5 to 1.0.6
snyk-bot Aug 17, 2020
13cefa9
Merge pull request #1338 from docsifyjs/snyk-upgrade-7969cf0f96a9957b…
Koooooo-7 Aug 17, 2020
cc071c5
Docs: added carbon ads using docsify-plugin-carbon (#1337)
anikethsaha Aug 17, 2020
59d090f
fix: upgrade tinydate from 1.2.0 to 1.3.0 (#1341)
snyk-bot Aug 18, 2020
5037f0b
chore: Remove the src directory from packages.json's files (#1344)
sy-records Aug 20, 2020
1dc754a
fix typo (#1345)
sy-records Aug 21, 2020
d439bac
fix: packages/docsify-server-renderer/package.json & packages/docsify…
snyk-bot Aug 21, 2020
dfa5616
[build] 4.11.5
sy-records Aug 21, 2020
e474ea8
chore: add changelog 4.11.5
sy-records Aug 21, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 1 addition & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -14,6 +14,7 @@
- [ ] Refactor
- [ ] Docs
- [ ] Build-related changes
- [ ] Repo settings
- [ ] Other, please describe:

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

To avoid wasting your time, it's best to open a **feature request issue** first and wait for approval before working on it.


**Other information:**

---

* [ ] DO NOT include files inside `lib` directory.

10 changes: 5 additions & 5 deletions .gitignore
Expand Up @@ -2,10 +2,10 @@
.DS_Store
.idea
node_modules
themes/
lib/
cypress/integration/examples
cypress/fixtures/docs
/themes/
/lib/
/cypress/integration/examples
/cypress/fixtures/docs

# exceptions
!.gitkeep
!.gitkeep
29 changes: 29 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,32 @@
## [4.11.5](https://github.com/docsifyjs/docsify/compare/v4.11.4...v4.11.5) (2020-08-21)


### Bug Fixes

* Russian language link error ([#1270](https://github.com/docsifyjs/docsify/issues/1270)) ([2a52460](https://github.com/docsifyjs/docsify/commit/2a52460a59448abaf681046fbc5dca642285ae1f))
* {docsify-updated} in the sample code is parsed into time ([#1321](https://github.com/docsifyjs/docsify/issues/1321)) ([2048610](https://github.com/docsifyjs/docsify/commit/2048610aacd4e3c6a592f4247834a726c7ca33fb))
* Add error handling for missing dependencies (fixes [#1210](https://github.com/docsifyjs/docsify/issues/1210)) ([#1232](https://github.com/docsifyjs/docsify/issues/1232)) ([3673001](https://github.com/docsifyjs/docsify/commit/3673001a24cb24c57454f9bc7619de49d2c3a044))
* after setting the background image, the button is obscured ([#1234](https://github.com/docsifyjs/docsify/issues/1234)) ([34d918f](https://github.com/docsifyjs/docsify/commit/34d918f9973bdb8e893248853e3ef7e803d4c253))
* convert {docsify-ignore} and {docsify-ignore-all} to HTML comments ([#1318](https://github.com/docsifyjs/docsify/issues/1318)) ([90d283d](https://github.com/docsifyjs/docsify/commit/90d283d340502456a5d8495df596bb4a02ceb39b))
* fallback page should use path not file location ([#1301](https://github.com/docsifyjs/docsify/issues/1301)) ([2bceabc](https://github.com/docsifyjs/docsify/commit/2bceabcb8e623570540493e2f1d956adf45c99e7))
* Fix search error when exist translations documents ([#1300](https://github.com/docsifyjs/docsify/issues/1300)) ([b869019](https://github.com/docsifyjs/docsify/commit/b8690199006366e86084e9e018def7b9b8f46512))
* gitignore was ignoring folders in src, so VS Code search results or file fuzzy finder were not working, etc ([d4c9247](https://github.com/docsifyjs/docsify/commit/d4c9247b87c0a2701683ed1a17383cfb451cf609))
* packages/docsify-server-renderer/package.json & packages/docsify-server-renderer/package-lock.json to reduce vulnerabilities ([#1250](https://github.com/docsifyjs/docsify/issues/1250)) ([d439bac](https://github.com/docsifyjs/docsify/commit/d439bac93f479d0480799880538fc3104e54c907))
* search can not search the table header ([#1256](https://github.com/docsifyjs/docsify/issues/1256)) ([3f03e78](https://github.com/docsifyjs/docsify/commit/3f03e78418993d8e9a4f5062e10dc79c3753389e))
* Search plugin: matched text is replaced with search text ([#1298](https://github.com/docsifyjs/docsify/issues/1298)) ([78775b6](https://github.com/docsifyjs/docsify/commit/78775b6ee73102cc5ac71c0ee2b392c5f4f6f4f8))
* the uncaught typeerror when el is null ([#1308](https://github.com/docsifyjs/docsify/issues/1308)) ([952f4c9](https://github.com/docsifyjs/docsify/commit/952f4c921b7a6a558c500ca6b105582d39ad36a2))
* Updated docs with instructions for installing specific version (fixes [#780](https://github.com/docsifyjs/docsify/issues/780)) ([#1225](https://github.com/docsifyjs/docsify/issues/1225)) ([b90c948](https://github.com/docsifyjs/docsify/commit/b90c948090e89fa778279c95060dbd7668285658))
* upgrade medium-zoom from 1.0.5 to 1.0.6 ([3beaa66](https://github.com/docsifyjs/docsify/commit/3beaa6666b78518f1ffaa37f6942f3cb08fef896))
* upgrade tinydate from 1.2.0 to 1.3.0 ([#1341](https://github.com/docsifyjs/docsify/issues/1341)) ([59d090f](https://github.com/docsifyjs/docsify/commit/59d090fe9096bc03e259c166634bb75bb2623f85))


### Features

* **search:** add pathNamespaces option ([d179dde](https://github.com/docsifyjs/docsify/commit/d179dde1c71acdcbe66cb762377b123926c55bf2))
* Add title to sidebar links ([#1286](https://github.com/docsifyjs/docsify/issues/1286)) ([667496b](https://github.com/docsifyjs/docsify/commit/667496b85d99b168255f58e60a6bfe902cc6ee03))



## [4.11.4](https://github.com/docsifyjs/docsify/compare/v4.11.3...v4.11.4) (2020-06-18)


Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://docsify.js.org">
<img alt="docsify" src="https://github.com/docsifyjs/docsify/blob/develop/docs/_media/icon.svg">
<img alt="docsify" src="./docs/_media/icon.svg">
</a>
</p>

Expand Down
9 changes: 6 additions & 3 deletions build/build.js
Expand Up @@ -22,7 +22,10 @@ async function build(opts) {
.rollup({
input: opts.input,
plugins: (opts.plugins || []).concat([
buble(),
buble({
transforms: {
dangerousForOf: true
}}),
commonjs(),
nodeResolve(),
replace({
Expand All @@ -33,8 +36,8 @@ async function build(opts) {
onwarn: function (message) {
if (message.code === 'UNRESOLVED_IMPORT') {
throw new Error(
`Could not resolve module ` +
message.source +
`Could not resolve module ` +
message.source +
`. Try running 'npm install' or using rollup's 'external' option if this is an external dependency. ` +
`Module ${message.source} is imported in ${message.importer}`
)
Expand Down
3 changes: 2 additions & 1 deletion cypress/fixtures/tpl/docs.index.html
Expand Up @@ -28,7 +28,7 @@
alias: {
'.*?/awesome':
'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md',
'.*?/changelog':
'/changelog':
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
'/.*/_navbar.md': '/_navbar.md',
'/zh-cn/(.*)':
Expand All @@ -40,6 +40,7 @@
'/es/(.*)':
'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1'
},
fallbackLanguages: ['es'],
auto2top: true,
coverpage: true,
executeScript: true,
Expand Down
9 changes: 9 additions & 0 deletions cypress/integration/routing/fallback.spec.js
@@ -0,0 +1,9 @@
context('config.fallbackLanguages', () => {
it('fallbacks respecting aliases', () => {
cy.visit('http://localhost:3000/#/es/');

cy.get('.sidebar-nav').contains('Changelog').click();

cy.get('#main').should('contain', 'Bug Fixes');
})
});
2 changes: 1 addition & 1 deletion docs/_coverpage.md
@@ -1,6 +1,6 @@
![logo](_media/icon.svg)

# docsify <small>4.11.4</small>
# docsify <small>4.11.5</small>

> A magical documentation site generator.

Expand Down
4 changes: 2 additions & 2 deletions docs/cdn.md
Expand Up @@ -44,7 +44,7 @@ Alternatively, use [compressed files](#compressed-file).

## Other CDN

- http://www.bootcdn.cn/docsify
- https://www.bootcdn.cn/docsify/
- https://cdn.jsdelivr.net/npm/docsify/
- https://cdnjs.com/libraries/docsify

- https://unpkg.com/browse/docsify/
32 changes: 16 additions & 16 deletions docs/configuration.md
Expand Up @@ -12,7 +12,7 @@ You can configure Docsify by defining `window.$docsify` as an object:
</script>
```

The config can also be defined as a function, in which case the first arg is the Docsify `vm` instance. The function should return a config object. This can be useful for referencing `vm` in places like the markdown configuration:
The config can also be defined as a function, in which case the first argument is the Docsify `vm` instance. The function should return a config object. This can be useful for referencing `vm` in places like the markdown configuration:

```html
<script>
Expand All @@ -35,7 +35,7 @@ The config can also be defined as a function, in which case the first arg is the
- Type: `String`
- Default: `#app`

The DOM element to be mounted on initialization. It can be a CSS selector string or an actual HTMLElement.
The DOM element to be mounted on initialization. It can be a CSS selector string or an actual [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement).

```js
window.$docsify = {
Expand All @@ -48,7 +48,7 @@ window.$docsify = {
- Type: `String`
- Default: `null`

Configure the repository url or a string of `username/repo` can add the [GitHub Corner](http://tholman.com/github-corners/) widget in the top right corner of the site.
Configure the repository url, or a string of `username/repo` can add the [GitHub Corner](http://tholman.com/github-corners/) widget in the top right corner of the site.

```js
window.$docsify = {
Expand Down Expand Up @@ -76,7 +76,7 @@ window.$docsify = {
- Type: `Boolean|String`
- Default: `false`

Loads navbar from the Markdown file `_navbar.md` if **true**, or else from the path specified.
Loads navbar from the Markdown file `_navbar.md` if **true**, else loads it from the path specified.

```js
window.$docsify = {
Expand All @@ -93,7 +93,7 @@ window.$docsify = {
- Type: `Boolean|String`
- Default: `false`

Loads sidebar from the Markdown file `_sidebar.md` if **true**, or else from the path specified.
Loads sidebar from the Markdown file `_sidebar.md` if **true**, else loads it from the path specified.

```js
window.$docsify = {
Expand All @@ -110,7 +110,7 @@ window.$docsify = {
- Type : `Boolean`
- Default: `true`

This option will completely hide your sidebar and wont render any content of the side even .
This option will completely hide your sidebar and won't render any content on the side.

```js
window.$docsify = {
Expand Down Expand Up @@ -149,7 +149,7 @@ window.$docsify = {
- Type: `String`
- Default: `README.md`

`README.md` in your docs folder will be treated as homepage for your website, but sometimes you may need to serve another file as your homepage.
`README.md` in your docs folder will be treated as the homepage for your website, but sometimes you may need to serve another file as your homepage.

```js
window.$docsify = {
Expand Down Expand Up @@ -196,7 +196,7 @@ window.$docsify = {
- Type: `Boolean`
- Default: `false`

If **true** links are relative to the current context.
If **true**, links are relative to the current context.

For example, the directory structure is as follows:

Expand Down Expand Up @@ -260,7 +260,7 @@ window.$docsify = {

- Type: `String`

Website logo as it appears in the sidebar, you can resize by CSS.
Website logo as it appears in the sidebar. You can resize it by using CSS.

```js
window.$docsify = {
Expand Down Expand Up @@ -367,7 +367,7 @@ window.$docsify = {

- type: `Boolean`

If `loadSidebar` and `autoHeader` are both enabled, for each link in `_sidebar.md`, prepend a header to the page before converting it to html. Compare [#78](https://github.com/docsifyjs/docsify/issues/78).
If `loadSidebar` and `autoHeader` are both enabled, for each link in `_sidebar.md`, prepend a header to the page before converting it to HTML. Compare [#78](https://github.com/docsifyjs/docsify/issues/78).

```js
window.$docsify = {
Expand Down Expand Up @@ -474,7 +474,7 @@ window.$docsify = {
- type: `String`
- default: `noopener`

Default `'noopener'` (no opener) prevents the newly opened external page (when [externalLinkTarget](#externallinktarget) is `'_blank'`) from having the ability to control our page. No `rel` is set when its not `'_blank'`. See [this post](https://mathiasbynens.github.io/rel-noopener/) for more information about why you may want to use this option.
Default `'noopener'` (no opener) prevents the newly opened external page (when [externalLinkTarget](#externallinktarget) is `'_blank'`) from having the ability to control our page. No `rel` is set when it's not `'_blank'`. See [this post](https://mathiasbynens.github.io/rel-noopener/) for more information about why you may want to use this option.

```js
window.$docsify = {
Expand Down Expand Up @@ -557,13 +557,13 @@ window.$docsify = {

- type: `Array<string>`

List of languages that will fallback to the default language when a page is request and didn't exists for the given local.
List of languages that will fallback to the default language when a page is requested and it doesn't exist for the given local.

Example:

- try to fetch the page of `/de/overview`. If this page exists, it'll be displayed
- then try to fetch the default page `/overview` (depending on the default language). If this page exists, it'll be displayed
- then display 404 page.
- try to fetch the page of `/de/overview`. If this page exists, it'll be displayed.
- then try to fetch the default page `/overview` (depending on the default language). If this page exists, it'll be displayed.
- then display the 404 page.

```js
window.$docsify = {
Expand All @@ -583,7 +583,7 @@ window.$docsify = {
};
```

Load the customised path of the 404 page:
Load the customized path of the 404 page:

```js
window.$docsify = {
Expand Down
4 changes: 2 additions & 2 deletions docs/embed-files.md
Expand Up @@ -62,7 +62,7 @@ Sometimes you don't want to embed a whole file. Maybe because you need just a fe
[filename](_media/example.js ':include :type=code :fragment=demo')
```

In your code file you need to surround the fragment between `/// [demo]` lines (before and after the fragment).
In your code file you need to surround the fragment between `/// [demo]` lines (before and after the fragment).
Alternatively you can use `### [demo]`.

Example:
Expand Down Expand Up @@ -153,7 +153,7 @@ The `LABEL` can be any text you want. It acts as a _fallback_ message if the lin
### Render a codeblock from a gist

The format is the same as the previous section, but with `:type=code` added to the alt text. As with the [Embedded file type](#embedded-file-type) section, the syntax highlighting will be **inferred** from the extension (e.g. `.js` or `.py`), so you can leave the `type` set as `code`.

Here is the format:

```markdown
Expand Down
6 changes: 3 additions & 3 deletions docs/helpers.md
Expand Up @@ -2,7 +2,7 @@

docsify extends Markdown syntax to make your documents more readable.

> Note: For the special code syntax cases, you'd better put them within a code backticks to avoid any conflicting from configurations or emojis.
> Note: For the special code syntax cases, you'd better put them within a code backticks to avoid any conflicting from configurations or emojis.

## important content

Expand Down Expand Up @@ -70,7 +70,7 @@ You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set ti
Only when you both set the `routerMode: 'history'` and `externalLinkTarget: '_self'`, you need add this configuration for those Cross-Origin links.

```md
[example.com](https://example.com/ ':crossorgin')
[example.com](https://example.com/ ':crossorgin')
```

## Github Task Lists
Expand Down Expand Up @@ -124,7 +124,7 @@ Only when you both set the `routerMode: 'history'` and `externalLinkTarget: '_se
## Customise ID for headings

```md
### 你好,世界! :id=hello-world
### Hello, world! :id=hello-world
```

## Markdown in html tag
Expand Down
11 changes: 8 additions & 3 deletions docs/index.html
Expand Up @@ -14,11 +14,15 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/dark.css" title="dark" disabled>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/buble.css" title="buble" disabled>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/pure.css" title="pure" disabled>

<script src="//cdn.jsdelivr.net/npm/docsify-plugin-carbon@1.0.1/index.min.js"></script>
<style>
nav.app-nav li ul {
min-width: 100px;
}

#carbonads {
box-shadow: none !important;
}
</style>
</head>

Expand All @@ -33,7 +37,8 @@
'/zh-cn/(.*)': 'https://cdn.jsdelivr.net/gh/docsifyjs/docs-zh@master/$1',
'/de-de/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1',
'/ru-ru/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1',
'/es/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1'
'/es/(.*)': 'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1',
'/write-a-plugin': 'https://raw.githubusercontent.com/docsifyjs/docsify/master/docs/write-a-plugin.md'
},
auto2top: true,
coverpage: true,
Expand Down Expand Up @@ -62,8 +67,8 @@
'/': 'Search'
}
},
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'),
function (hook, vm) {
hook.beforeEach(function (html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
Expand Down
10 changes: 5 additions & 5 deletions docs/more-pages.md
Expand Up @@ -114,24 +114,24 @@ A custom sidebar can also automatically generate a table of contents by setting

## Ignoring Subheaders

When `subMaxLevel` is set, each header is automatically added to the table of contents by default. If you want to ignore a specific header, add `{docsify-ignore}` to it.
When `subMaxLevel` is set, each header is automatically added to the table of contents by default. If you want to ignore a specific header, add `<!-- {docsify-ignore} -->` to it.

```markdown
# Getting Started

## Header {docsify-ignore}
## Header <!-- {docsify-ignore} -->

This header won't appear in the sidebar table of contents.
```

To ignore all headers on a specific page, you can use `{docsify-ignore-all}` on the first header of the page.
To ignore all headers on a specific page, you can use `<!-- {docsify-ignore-all} -->` on the first header of the page.

```markdown
# Getting Started {docsify-ignore-all}
# Getting Started <!-- {docsify-ignore-all} -->

## Header

This header won't appear in the sidebar table of contents.
```

Both `{docsify-ignore}` and `{docsify-ignore-all}` will not be rendered on the page when used.
Both `<!-- {docsify-ignore} -->` and `<!-- {docsify-ignore-all} -->` will not be rendered on the page when used.