Skip to content

Commit

Permalink
Merge branch 'fix-issue1069' of https://github.com/Koooooo-7/docsify
Browse files Browse the repository at this point in the history
…into fix-issue1069
  • Loading branch information
Koooooo-7 committed Aug 27, 2020
2 parents cab0352 + 2233562 commit 6db5af4
Show file tree
Hide file tree
Showing 13 changed files with 152 additions and 64 deletions.
20 changes: 0 additions & 20 deletions .github/stale.yml

This file was deleted.

62 changes: 50 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
## [4.11.6](https://github.com/docsifyjs/docsify/compare/v4.11.5...v4.11.6) (2020-08-22)


### Bug Fixes

* Add patch for {docsify-ignore} and {docsify-ignore-all} ([ce31607](https://github.com/docsifyjs/docsify/commit/ce316075e033afdbeb43ce01e284a29fe1870e38))



## [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 Expand Up @@ -57,8 +95,8 @@
* emojis in titles not working correctly and update ([#1016](https://github.com/docsifyjs/docsify/issues/1016)) ([b3d9b96](https://github.com/docsifyjs/docsify/commit/b3d9b966dfbb6f456c2c457da1d2a366e85d9190))
* searching table content ([6184e50](https://github.com/docsifyjs/docsify/commit/6184e502629932ca71fdd0a1b10150d118f5a7c8))
* stage modified files as part of pre-commit hook ([#985](https://github.com/docsifyjs/docsify/issues/985)) ([5b77b0f](https://github.com/docsifyjs/docsify/commit/5b77b0f628f056b7ebb6d0b617561d19964516a2))
* config initialization and coercion ([#861](https://github.com/docsifyjs/docsify/pull/861))
* strip indent when embedding code fragment ([#996](https://github.com/docsifyjs/docsify/pull/996))
* config initialization and coercion ([#861](https://github.com/docsifyjs/docsify/pull/861))
* strip indent when embedding code fragment ([#996](https://github.com/docsifyjs/docsify/pull/996))
* Ensure autoHeader dom result is similar to parsed H1 ([#811](https://github.com/docsifyjs/docsify/pull/811))
* upgrade docsify from 4.9.4 to 4.10.2 ([#1054](https://github.com/docsifyjs/docsify/issues/1054)) ([78290b2](https://github.com/docsifyjs/docsify/commit/78290b21038a3ae09c4c7438bd89b14ca4c02805))
* upgrade medium-zoom from 1.0.4 to 1.0.5 ([39ebd73](https://github.com/docsifyjs/docsify/commit/39ebd73021290439180878cae32e663b9e60e214))
Expand All @@ -77,29 +115,29 @@

### Docs

* update docs for the `name` config option ([#992](https://github.com/docsifyjs/docsify/pull/992))
* update docs for the `name` config option ([#992](https://github.com/docsifyjs/docsify/pull/992))
* about cache ([#854](https://github.com/docsifyjs/docsify/pull/854))
* removed FOSSA badge
* documented `__colon__` tip ([#1025](https://github.com/docsifyjs/docsify/pull/1025))

### Chore

* Migrate relative links to absolute in embedded markdown ([#867](https://github.com/docsifyjs/docsify/pull/867))
* smarter scroll behavior ([#744](https://github.com/docsifyjs/docsify/pull/744))
* smarter scroll behavior ([#744](https://github.com/docsifyjs/docsify/pull/744))
* improve basic layout style ([#884](https://github.com/docsifyjs/docsify/pull/884))
* There are currently {three=>four} themes available. ([#892](https://github.com/docsifyjs/docsify/pull/892))
* Added a redirect for images to show up in Amplify ([#918](https://github.com/docsifyjs/docsify/pull/918))
* There are currently {three=>four} themes available. ([#892](https://github.com/docsifyjs/docsify/pull/892))
* Added a redirect for images to show up in Amplify ([#918](https://github.com/docsifyjs/docsify/pull/918))
* removed the escaping of the name of sidebar ([#991](https://github.com/docsifyjs/docsify/pull/991))
* Eslint fixes for v4x ([#989](https://github.com/docsifyjs/docsify/pull/989))
* added github Actions for CI ([#1000](https://github.com/docsifyjs/docsify/pull/1000))
* Eslint fixes for v4x ([#989](https://github.com/docsifyjs/docsify/pull/989))
* added github Actions for CI ([#1000](https://github.com/docsifyjs/docsify/pull/1000))
* Add a prepare script. ([#1010](https://github.com/docsifyjs/docsify/pull/1010))
* chore(GH-action): using ubuntu 16 and removed node 8 from CI
* chore(GH-action): using ubuntu 16 and removed node 8 from CI
* chore: add config ([#1014](https://github.com/docsifyjs/docsify/pull/1014))
* chore(stale): added enhancement label to exemptlabels
* chore(stale): added bug label to exemptlabels
* .markdown-section max-width 800px to 80% ([#1017](https://github.com/docsifyjs/docsify/pull/1017))
* changed the CDN from unpkg to jsDelivr #1020 ([#1022](https://github.com/docsifyjs/docsify/pull/1022))
* migrate CI to github, refactore CI and npm scripts, linting fixes ([#1023](https://github.com/docsifyjs/docsify/pull/1023))
* .markdown-section max-width 800px to 80% ([#1017](https://github.com/docsifyjs/docsify/pull/1017))
* changed the CDN from unpkg to jsDelivr #1020 ([#1022](https://github.com/docsifyjs/docsify/pull/1022))
* migrate CI to github, refactore CI and npm scripts, linting fixes ([#1023](https://github.com/docsifyjs/docsify/pull/1023))
* chore(readme): added CI badges and fixed the logo issue
* added new linter config ([#1028](https://github.com/docsifyjs/docsify/pull/1028))

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 Expand Up @@ -84,7 +84,7 @@ So that you can start straight away.

- Fork it!
- Create your feature branch: `git checkout -b my-new-feature`
- Commit your changes: `git commit -am 'Add some feature'`
- Commit your changes: `git add . && git commit -m 'Add some feature'`
- Push to the branch: `git push origin my-new-feature`
- Submit a pull request

Expand Down
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![logo](_media/icon.svg)

# docsify <small>4.11.4</small>
# docsify <small>4.11.6</small>

> A magical documentation site generator.
Expand Down
7 changes: 6 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
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/[email protected]/index.min.js"></script>
<style>
nav.app-nav li ul {
min-width: 100px;
}

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

Expand Down Expand Up @@ -64,6 +68,7 @@
}
},
plugins: [
DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'),
function (hook, vm) {
hook.beforeEach(function (html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
Expand Down
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@
<link rel="stylesheet" href="/themes/dark.css" title="dark" disabled>
<link rel="stylesheet" href="/themes/buble.css" title="buble" disabled>
<link rel="stylesheet" href="/themes/pure.css" title="pure" disabled>
<script src="//cdn.jsdelivr.net/npm/[email protected]/index.min.js"></script>
<style>
nav.app-nav li ul {
min-width: 100px;
}

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

Expand Down Expand Up @@ -56,6 +61,7 @@
pathNamespaces: ['/zh-cn', '/de-de', '/ru-ru', '/es']
},
plugins: [
DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'),
function (hook, vm) {
hook.beforeEach(function (html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docsify",
"version": "4.11.4",
"version": "4.11.6",
"description": "A magical documentation generator.",
"author": {
"name": "qingwei-li",
Expand All @@ -17,7 +17,6 @@
"unpkg": "lib/docsify.min.js",
"files": [
"lib",
"src",
"themes"
],
"scripts": {
Expand Down Expand Up @@ -59,11 +58,11 @@
"dependencies": {
"dompurify": "^2.0.8",
"marked": "^1.1.1",
"medium-zoom": "^1.0.5",
"medium-zoom": "^1.0.6",
"opencollective-postinstall": "^2.0.2",
"prismjs": "^1.19.0",
"strip-indent": "^3.0.0",
"tinydate": "^1.0.0",
"tinydate": "^1.3.0",
"tweezer.js": "^1.4.0"
},
"devDependencies": {
Expand Down
21 changes: 11 additions & 10 deletions packages/docsify-server-renderer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/docsify-server-renderer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docsify-server-renderer",
"version": "4.11.4",
"version": "4.11.6",
"description": "docsify server renderer",
"author": {
"name": "qingwei-li",
Expand All @@ -16,7 +16,7 @@
},
"dependencies": {
"debug": "^4.1.1",
"docsify": "^4.11.2",
"docsify": "^4.11.4",
"dompurify": "^2.0.8",
"node-fetch": "^2.6.0",
"resolve-pathname": "^3.0.0"
Expand Down
14 changes: 13 additions & 1 deletion src/core/render/compiler.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import marked from 'marked';
import { isAbsolutePath, getPath, getParentPath } from '../router/util';
import { isFn, merge, cached, isPrimitive } from '../util/core';
import { tree as treeTpl } from './tpl';
Expand All @@ -11,7 +12,6 @@ import { paragraphCompiler } from './compiler/paragraph';
import { taskListCompiler } from './compiler/taskList';
import { taskListItemCompiler } from './compiler/taskListItem';
import { linkCompiler } from './compiler/link';
import marked from 'marked';

const cachedLinks = {};

Expand Down Expand Up @@ -214,12 +214,24 @@ export class Compiler {
nextToc.ignoreSubHeading = true;
}

if (/{docsify-ignore}/g.test(str)) {
str = str.replace('{docsify-ignore}', '');
nextToc.title = str;
nextToc.ignoreSubHeading = true;
}

if (/<!-- {docsify-ignore-all} -->/g.test(str)) {
str = str.replace('<!-- {docsify-ignore-all} -->', '');
nextToc.title = removeAtag(str);
nextToc.ignoreAllSubs = true;
}

if (/{docsify-ignore-all}/g.test(str)) {
str = str.replace('{docsify-ignore-all}', '');
nextToc.title = str;
nextToc.ignoreAllSubs = true;
}

const slug = slugify(config.id || str);
const url = router.toURL(router.getCurrentPath(), { id: slug });
nextToc.slug = url;
Expand Down
12 changes: 12 additions & 0 deletions src/core/render/compiler/headline.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,24 @@ export const headingCompiler = ({ renderer, router, _self }) =>
nextToc.ignoreSubHeading = true;
}

if (/{docsify-ignore}/g.test(str)) {
str = str.replace('{docsify-ignore}', '');
nextToc.title = str;
nextToc.ignoreSubHeading = true;
}

if (/<!-- {docsify-ignore-all} -->/g.test(str)) {
str = str.replace('<!-- {docsify-ignore-all} -->', '');
nextToc.title = str;
nextToc.ignoreAllSubs = true;
}

if (/{docsify-ignore-all}/g.test(str)) {
str = str.replace('{docsify-ignore-all}', '');
nextToc.title = str;
nextToc.ignoreAllSubs = true;
}

const slug = slugify(config.id || str);
const url = router.toURL(router.getCurrentPath(), { id: slug });
nextToc.slug = url;
Expand Down
Loading

0 comments on commit 6db5af4

Please sign in to comment.