Skip to content

Commit

Permalink
Merge branch 'develop' into docsify-class
Browse files Browse the repository at this point in the history
* develop:
  docs: removed codefund docs and plugin (#1262)
  docs: remove bundle size from the home page and documentation (#1257)
  fix: search can not search the table header (#1256)
  fix: after setting the background image, the button is obscured (#1234)
  Fix: fixed onlycover flag in mobile (#1243)
  fix: Updated docs with instructions for installing specific version (fixes #780) (#1225)
  fix: Add error handling for missing dependencies (fixes #1210) (#1232)
  [documdocs:  deploy docsify in docker. (#1241)
  docs: Add embed gist instructions to Embed Files (fixes #932 ) (#1238)
  chore: add changelog 4.11.4
  [build] 4.11.4
  feat: added html sanitizer for remote rendering (#1128)
  • Loading branch information
trusktr committed Jul 4, 2020
2 parents e3f5719 + c78cb11 commit fc71b56
Show file tree
Hide file tree
Showing 24 changed files with 996 additions and 931 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Expand Up @@ -19,6 +19,7 @@ module.exports = {
rules: {
'prettier/prettier': ['error'],
camelcase: ['warn'],
'no-useless-escape': ['warn'],
curly: ['error', 'all'],
'dot-notation': ['error'],
eqeqeq: ['error'],
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,32 @@
## [4.11.4](https://github.com/docsifyjs/docsify/compare/v4.11.3...v4.11.4) (2020-06-18)


### Bug Fixes

* consistent location of search result ([e9dd2de](https://github.com/docsifyjs/docsify/commit/e9dd2de384b81619aae2bcbf92f52721cb76a177))
* cover overlapping sidebar by removing z-index ([0bf03f5](https://github.com/docsifyjs/docsify/commit/0bf03f58103037d100b1635cf3989c8d3672b4ba))
* cross-origin url cannot be redirected when "externalLinkTarget" is set to "_self" and "routerMode" is set to "history". ([#1062](https://github.com/docsifyjs/docsify/issues/1062)) ([fd2cec6](https://github.com/docsifyjs/docsify/commit/fd2cec6bd66c46d6957811fefae4c615c3052a4f)), closes [#1046](https://github.com/docsifyjs/docsify/issues/1046) [#1046](https://github.com/docsifyjs/docsify/issues/1046) [#1046](https://github.com/docsifyjs/docsify/issues/1046)
* default html img resize if no height included ([#1065](https://github.com/docsifyjs/docsify/issues/1065)) ([9ff4d06](https://github.com/docsifyjs/docsify/commit/9ff4d0677304bc190e7bd9e89bbbdc64895197fa))
* fixed target and rel issue (fixes [#1183](https://github.com/docsifyjs/docsify/issues/1183)) ([3d662a5](https://github.com/docsifyjs/docsify/commit/3d662a5bf71bbfef077cfbc478df241d794f55a0))
* Inconsistent search and body rendering ([dcb0aae](https://github.com/docsifyjs/docsify/commit/dcb0aaea99efbd68175f1d1aeb5076b6dde9801e))
* rendering cover width bug ([717991c](https://github.com/docsifyjs/docsify/commit/717991c90cf709f4da91fe32610129de6529266b))
* search does not find the contents of the table ([#1198](https://github.com/docsifyjs/docsify/issues/1198)) ([31010e4](https://github.com/docsifyjs/docsify/commit/31010e4979b3d3ab4bd247a09c4ac5fd1405eaa8))
* The search error after setting the ID in the title ([#1159](https://github.com/docsifyjs/docsify/issues/1159)) ([6e554f8](https://github.com/docsifyjs/docsify/commit/6e554f8ebd3d4a2c5c7e4f66cff3dfe2b6aa1e31))
* upgrade docsify from 4.10.2 to 4.11.2 ([60b7f89](https://github.com/docsifyjs/docsify/commit/60b7f89b373b0d48ec8406a51eddeaed8126696d))


### Features

* added html sanitizer for remote rendering ([#1128](https://github.com/docsifyjs/docsify/issues/1128)) ([714ef29](https://github.com/docsifyjs/docsify/commit/714ef29afe779a6db5c4761ebaacdfc70ee2d8dd))
* update src/core/index.js to export all global APIs, deprecate old globals in favor of a single global DOCSIFY, and add tests for this ([7e002bf](https://github.com/docsifyjs/docsify/commit/7e002bf939d7837843908417b5445b4f8d36c1cd))


### Reverts

* Revert "Updated docs site dark and light mode with switch and redesigned search bar using docsify-darklight-theme" (#1207) ([26cb940](https://github.com/docsifyjs/docsify/commit/26cb940b51d34ee584b8425012a336f38a4abd76)), closes [#1207](https://github.com/docsifyjs/docsify/issues/1207) [#1182](https://github.com/docsifyjs/docsify/issues/1182)



## [4.11.3](https://github.com/docsifyjs/docsify/compare/v4.11.2...v4.11.3) (2020-03-24)


Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -11,7 +11,7 @@
<p align="center">
<a href="#backers"><img alt="Backers on Open Collective" src="https://opencollective.com/docsify/backers/badge.svg?style=flat-square"></a>
<a href="#sponsors">
<img alt="Sponsors on Open Collective" src="https://opencollective.com/docsify/sponsors/badge.svg?style=flat-square"></a>
<img alt="Sponsors on Open Collective" src="https://opencollective.com/docsify/sponsors/badge.svg?style=flat-square"></a>
<a><img src="https://github.com/docsifyjs/docsify/workflows/Unit%20tests%20Suite/badge.svg?branch=develop&amp;event=push" alt="Unit tests Suite"></a>
<a><img src="https://github.com/docsifyjs/docsify/workflows/Linting%20Checks/badge.svg?branch=develop&amp;event=push" alt="Linting Checks"></a>
<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>
Expand Down Expand Up @@ -41,7 +41,7 @@
## Features

- No statically built html files
- Simple and lightweight (~21kB gzipped)
- Simple and lightweight
- Smart full-text search plugin
- Multiple themes
- Useful plugin API
Expand Down
12 changes: 11 additions & 1 deletion build/build.js
Expand Up @@ -29,7 +29,17 @@ async function build(opts) {
__VERSION__: version,
'process.env.SSR': false
})
])
]),
onwarn: function (message) {
if (message.code === 'UNRESOLVED_IMPORT') {
throw new Error(
`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}`
)
}
}
})
.then(function (bundle) {
var dest = 'lib/' + (opts.output || opts.input)
Expand Down
220 changes: 104 additions & 116 deletions cypress/fixtures/tpl/docs.index.html
@@ -1,123 +1,111 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>docsify-e2e-tests</title>
<link rel="icon" href="_media/favicon.ico" />
<meta
name="google-site-verification"
content="6t0LoIeFksrjF4c9sqUEsVXiQNxLp2hgoqo0KryT-sE"
/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta
name="keywords"
content="doc,docs,documentation,gitbook,creator,generator,github,jekyll,github-pages"
/>
<meta name="description" content="A magical documentation generator." />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0"
/>
<link rel="stylesheet" href="lib/themes/vue.css" title="vue" />
<link rel="stylesheet" href="lib/themes/dark.css" title="dark" disabled />
<link rel="stylesheet" href="lib/themes/buble.css" title="buble" disabled />
<link rel="stylesheet" href="lib/themes/pure.css" title="pure" disabled />
<script src="//unpkg.com/docsify-plugin-codefund/index.js"></script>
<style>
nav.app-nav li ul {
min-width: 100px;
}
</style>
</head>

<body>
<div id="app">Loading Docsify e2e tests suite...</div>
<script>
window.$docsify = {
alias: {
'.*?/awesome':
'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md',
'.*?/changelog':
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
'/.*/_navbar.md': '/_navbar.md',
'/zh-cn/(.*)':
'https://raw.githubusercontent.com/docsifyjs/docs-zh/master/$1',
'/de-de/(.*)':
'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1',
'/ru/(.*)':
'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1',
'/es/(.*)':
'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1'
},
auto2top: true,
coverpage: true,
executeScript: true,
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true,
maxLevel: 4,
subMaxLevel: 2,
ga: 'UA-106147152-1',
matomo: {
host: '//matomo.thunderwave.de',
id: 6
},
name: 'docsify',
search: {
noData: {
'/de-de/': 'Keine Ergebnisse!',
'/zh-cn/': '没有结果!',
'/': 'No results!'
},
paths: 'auto',
placeholder: {
'/de-de/': 'Suche',
'/zh-cn/': '搜索',
'/': 'Search'
}
<head>
<meta charset="UTF-8" />
<title>docsify-e2e-tests</title>
<link rel="icon" href="_media/favicon.ico" />
<meta name="google-site-verification" content="6t0LoIeFksrjF4c9sqUEsVXiQNxLp2hgoqo0KryT-sE" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="keywords" content="doc,docs,documentation,gitbook,creator,generator,github,jekyll,github-pages" />
<meta name="description" content="A magical documentation generator." />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<link rel="stylesheet" href="lib/themes/vue.css" title="vue" />
<link rel="stylesheet" href="lib/themes/dark.css" title="dark" disabled />
<link rel="stylesheet" href="lib/themes/buble.css" title="buble" disabled />
<link rel="stylesheet" href="lib/themes/pure.css" title="pure" disabled />
<style>
nav.app-nav li ul {
min-width: 100px;
}
</style>
</head>

<body>
<div id="app">Loading Docsify e2e tests suite...</div>
<script>
window.$docsify = {
alias: {
'.*?/awesome':
'https://raw.githubusercontent.com/docsifyjs/awesome-docsify/master/README.md',
'.*?/changelog':
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
'/.*/_navbar.md': '/_navbar.md',
'/zh-cn/(.*)':
'https://raw.githubusercontent.com/docsifyjs/docs-zh/master/$1',
'/de-de/(.*)':
'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1',
'/ru/(.*)':
'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1',
'/es/(.*)':
'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1'
},
auto2top: true,
coverpage: true,
executeScript: true,
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true,
maxLevel: 4,
subMaxLevel: 2,
ga: 'UA-106147152-1',
matomo: {
host: '//matomo.thunderwave.de',
id: 6
},
name: 'docsify',
search: {
noData: {
'/de-de/': 'Keine Ergebnisse!',
'/zh-cn/': '没有结果!',
'/': 'No results!'
},
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
function(hook, vm) {
hook.beforeEach(function(html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
.replace(/\/master/, '/blob/master')
} else {
url =
'https://github.com/docsifyjs/docsify/blob/master/docs/' +
vm.route.file
}
var editHtml = '[:memo: Edit Document](' + url + ')\n'
return (
editHtml +
html +
'\n\n----\n\n' +
'<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>'
)
})
}
]
}
</script>
<script src="lib/docsify.min.js"></script>
<script src="lib/plugins/search.min.js"></script>
<script src="lib/plugins/ga.min.js"></script>
<script src="lib/plugins/matomo.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script>
paths: 'auto',
placeholder: {
'/de-de/': 'Suche',
'/zh-cn/': '搜索',
'/': 'Search'
}
},
formatUpdated: '{MM}/{DD} {HH}:{mm}',
plugins: [
function (hook, vm) {
hook.beforeEach(function (html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
.replace(/\/master/, '/blob/master')
} else {
url =
'https://github.com/docsifyjs/docsify/blob/master/docs/' +
vm.route.file
}
var editHtml = '[:memo: Edit Document](' + url + ')\n'
return (
editHtml +
html +
'\n\n----\n\n' +
'<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>'
)
})
}
]
}
</script>
<script src="lib/docsify.min.js"></script>
<script src="lib/plugins/search.min.js"></script>
<script src="lib/plugins/ga.min.js"></script>
<script src="lib/plugins/matomo.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-markdown.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-nginx.min.js"></script>

<script>
;((window.gitter = {}).chat = {}).options = {
<script>
; ((window.gitter = {}).chat = {}).options = {
room: 'docsifyjs/Lobby'
}
</script>
<script
src="https://sidecar.gitter.im/dist/sidecar.v1.js"
async
defer
></script>
</body>
</html>
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
</body>

</html>
1 change: 0 additions & 1 deletion cypress/integration/sidebar/config.spec.js
Expand Up @@ -157,7 +157,6 @@ context('sidebar.configurations', () => {
'disqus',
'gitalk',
'pagination',
'codefund',
'tabs',
'more-plugins',
];
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Expand Up @@ -11,7 +11,7 @@ See the [Quick start](quickstart.md) guide for more details.
## Features

- No statically built html files
- Simple and lightweight (~21kB gzipped)
- Simple and lightweight
- Smart full-text search plugin
- Multiple themes
- Useful plugin API
Expand Down
4 changes: 2 additions & 2 deletions docs/_coverpage.md
@@ -1,10 +1,10 @@
![logo](_media/icon.svg)

# docsify <small>4.11.3</small>
# docsify <small>4.11.4</small>

> A magical documentation site generator.
- Simple and lightweight (~21kB gzipped)
- Simple and lightweight
- No statically built html files
- Multiple themes

Expand Down
2 changes: 1 addition & 1 deletion docs/cover.md
Expand Up @@ -26,7 +26,7 @@ Set `coverpage` to **true**, and create a `_coverpage.md`:

> A magical documentation site generator.

- Simple and lightweight (~21kB gzipped)
- Simple and lightweight
- No statically built html files
- Multiple themes

Expand Down
46 changes: 46 additions & 0 deletions docs/deploy.md
Expand Up @@ -135,3 +135,49 @@ frontend:
| /<*>.md | /<*>.md | 200 (Rewrite) |
| /<*>.png | /<*>.png | 200 (Rewrite) |
| /<*> | /index.html | 200 (Rewrite) |


## Docker

- Create docsify files

You need prepare the initial files instead of making in container.
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).

```sh
index.html
README.md
```

- Create dockerfile

```Dockerfile
FROM node:latest
LABEL description="A demo Dockerfile for build Docsify."
WORKDIR /docs
RUN npm install -g docsify-cli@latest
EXPOSE 3000/tcp
ENTRYPOINT docsify serve .

```

So, current directory structure should be this:

```sh
index.html
README.md
Dockerfile
```

- Build docker image

```sh
docker build -f Dockerfile -t docsify/demo .
```

- Run docker image

```sh
docker run -itp 3000:3000 --name=docsify -v $(pwd):/docs docsify/demo
```

0 comments on commit fc71b56

Please sign in to comment.