Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0586fe7174 | ||
|
|
3d0bfd6c39 |
@@ -2,10 +2,4 @@
|
|||||||
packages/docsify-server-renderer/build.js
|
packages/docsify-server-renderer/build.js
|
||||||
node_modules
|
node_modules
|
||||||
build
|
build
|
||||||
server.js
|
server.js
|
||||||
cypress
|
|
||||||
lib
|
|
||||||
themes
|
|
||||||
build
|
|
||||||
docs/
|
|
||||||
**/*.md
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"extends": "xo-space/browser",
|
||||||
|
"rules": {
|
||||||
|
"semi": [2, "never"],
|
||||||
|
"no-return-assign": "off",
|
||||||
|
"no-unused-expressions": "off",
|
||||||
|
"no-new-func": "off",
|
||||||
|
"no-multi-assign": "off",
|
||||||
|
"no-mixed-operators": "off",
|
||||||
|
"max-params": "off",
|
||||||
|
"no-script-url": "off",
|
||||||
|
"camelcase": "off",
|
||||||
|
"no-warning-comments": "off"
|
||||||
|
},
|
||||||
|
"globals": {
|
||||||
|
"Docsify": true,
|
||||||
|
"$docsify": true,
|
||||||
|
"process": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
parser: 'babel-eslint',
|
|
||||||
parserOptions: {
|
|
||||||
sourceType: 'module',
|
|
||||||
ecmaVersion: 2019,
|
|
||||||
},
|
|
||||||
env: {
|
|
||||||
jest: true,
|
|
||||||
browser: true,
|
|
||||||
node: true,
|
|
||||||
es6: true,
|
|
||||||
},
|
|
||||||
plugins: ['prettier', 'import'],
|
|
||||||
extends: ['eslint:recommended', 'plugin:import/recommended'],
|
|
||||||
settings: {
|
|
||||||
'import/ignore': ['node_modules', '.json$'],
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
'prettier/prettier': ['error'],
|
|
||||||
camelcase: ['warn'],
|
|
||||||
curly: ['error', 'all'],
|
|
||||||
'dot-notation': ['error'],
|
|
||||||
eqeqeq: ['error'],
|
|
||||||
'handle-callback-err': ['error'],
|
|
||||||
'new-cap': ['error'],
|
|
||||||
'no-alert': ['error'],
|
|
||||||
'no-caller': ['error'],
|
|
||||||
'no-eval': ['error'],
|
|
||||||
'no-labels': ['error'],
|
|
||||||
'no-lonely-if': ['error'],
|
|
||||||
'no-new': ['error'],
|
|
||||||
'no-proto': ['error'],
|
|
||||||
'no-return-assign': ['error'],
|
|
||||||
'no-self-compare': ['error'],
|
|
||||||
'no-shadow': ['warn'],
|
|
||||||
'no-shadow-restricted-names': ['error'],
|
|
||||||
'no-useless-call': ['error'],
|
|
||||||
'no-var': ['error'],
|
|
||||||
'no-void': ['error'],
|
|
||||||
'no-with': ['error'],
|
|
||||||
radix: ['error'],
|
|
||||||
'spaced-comment': ['error', 'always'],
|
|
||||||
strict: ['error', 'global'],
|
|
||||||
yoda: ['error', 'never'],
|
|
||||||
|
|
||||||
// Import rules
|
|
||||||
// Search way how integrate with `lerna`
|
|
||||||
'import/no-unresolved': 'off',
|
|
||||||
'import/imports-first': ['error'],
|
|
||||||
'import/newline-after-import': ['error'],
|
|
||||||
'import/no-duplicates': ['error'],
|
|
||||||
'import/no-mutable-exports': ['error'],
|
|
||||||
'import/no-named-as-default': ['error'],
|
|
||||||
'import/no-named-as-default-member': ['error'],
|
|
||||||
'import/order': ['warn'],
|
|
||||||
},
|
|
||||||
globals: {
|
|
||||||
Docsify: 'writable',
|
|
||||||
$docsify: 'writable',
|
|
||||||
dom: 'writable',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
open_collective: docsify
|
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<!-- Love docsify? Please consider supporting our collective:
|
||||||
|
👉 https://opencollective.com/docsify/donate -->
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
|
|
||||||
---
|
|
||||||
<!-- Please don't delete this template or we'll close your issue -->
|
|
||||||
<!-- Please use English language -->
|
|
||||||
<!-- Before creating an issue please make sure you are using the latest version of Docsify. -->
|
|
||||||
<!-- Please ask questions on StackOverflow: https://stackoverflow.com/questions/ask?tags=docsify -->
|
|
||||||
<!-- Please ask questions on gitter: https://gitter.im/docsifyjs/Lobby -->
|
|
||||||
|
|
||||||
## Bug Report
|
|
||||||
|
|
||||||
#### Steps to reproduce
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### What is current behaviour
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### What is the expected behaviour
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### Other relevant information
|
|
||||||
|
|
||||||
<!-- (Update "[ ]" to "[x]" to check a box) -->
|
|
||||||
- [ ] Bug does still occur when all/other plugins are disabled?
|
|
||||||
|
|
||||||
- Your OS:
|
|
||||||
- Node.js version:
|
|
||||||
- npm/yarn version:
|
|
||||||
- Browser version:
|
|
||||||
- Docsify version:
|
|
||||||
- Docsify plugins:
|
|
||||||
|
|
||||||
<!-- Love docsify? Please consider supporting our collective:
|
|
||||||
👉 https://opencollective.com/docsify/donate -->
|
|
||||||
|
|
||||||
#### Please create a reproducible sandbox
|
|
||||||
|
|
||||||
[](https://codesandbox.io/s/307qqv236)
|
|
||||||
|
|
||||||
#### Mention the docsify version in which this bug was not present (if any)
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
---
|
|
||||||
name: Feature request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
|
|
||||||
---
|
|
||||||
<!-- Please don't delete this template or we'll close your issue -->
|
|
||||||
<!-- Please use English language -->
|
|
||||||
<!-- Before creating an issue please make sure you are using the latest version of Docsify. -->
|
|
||||||
<!-- Please ask questions on StackOverflow 👉 https://stackoverflow.com/questions/ask?tags=docsify -->
|
|
||||||
|
|
||||||
## Feature request
|
|
||||||
|
|
||||||
#### What problem does this feature solve?
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### What does the proposed API look like?
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### How should this be implemented in your opinion?
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### Are you willing to work on this yourself?
|
|
||||||
@@ -1,54 +1,5 @@
|
|||||||
<!-- Please use English language -->
|
Please makes sure these boxes are checked before submitting your PR, thank you!
|
||||||
<!-- Please don't delete this template -->
|
|
||||||
|
|
||||||
<!-- PULL REQUEST TEMPLATE -->
|
|
||||||
<!-- (Update "[ ]" to "[x]" to check a box) -->
|
|
||||||
|
|
||||||
**Summary**
|
|
||||||
|
|
||||||
**What kind of change does this PR introduce?** (check at least one)
|
|
||||||
|
|
||||||
- [ ] Bugfix
|
|
||||||
- [ ] Feature
|
|
||||||
- [ ] Code style update
|
|
||||||
- [ ] Refactor
|
|
||||||
- [ ] Docs
|
|
||||||
- [ ] Build-related changes
|
|
||||||
- [ ] Other, please describe:
|
|
||||||
|
|
||||||
If changing the UI of default theme, please provide the **before/after** screenshot:
|
|
||||||
|
|
||||||
**Does this PR introduce a breaking change?** (check one)
|
|
||||||
|
|
||||||
- [ ] Yes
|
|
||||||
- [ ] No
|
|
||||||
|
|
||||||
If yes, please describe the impact and migration path for existing applications:
|
|
||||||
|
|
||||||
**The PR fulfills these requirements:**
|
|
||||||
|
|
||||||
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
|
|
||||||
|
|
||||||
You have tested in the following browsers: (Providing a detailed version will be better.)
|
|
||||||
|
|
||||||
- [ ] Chrome
|
|
||||||
- [ ] Firefox
|
|
||||||
- [ ] Safari
|
|
||||||
- [ ] Edge
|
|
||||||
- [ ] IE
|
|
||||||
|
|
||||||
If adding a **new feature**, the PR's description includes:
|
|
||||||
|
|
||||||
- [ ] A convincing reason for adding this feature
|
|
||||||
- [ ] Related documents have been updated
|
|
||||||
- [ ] 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:**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
|
* [ ] Make sure you are merging your commits to `master` branch.
|
||||||
|
* [ ] Add some descriptions and refer relative issues for you PR.
|
||||||
* [ ] DO NOT include files inside `lib` directory.
|
* [ ] DO NOT include files inside `lib` directory.
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
# Number of days of inactivity before an issue becomes stale
|
|
||||||
daysUntilStale: 60
|
|
||||||
# Number of days of inactivity before a stale issue is closed
|
|
||||||
daysUntilClose: 7
|
|
||||||
# Issues with these labels will never be considered stale
|
|
||||||
exemptLabels:
|
|
||||||
- pinned
|
|
||||||
- security
|
|
||||||
- On hold
|
|
||||||
- enhancement
|
|
||||||
- bug
|
|
||||||
# Label to use when marking an issue as stale
|
|
||||||
staleLabel: wontfix
|
|
||||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
|
||||||
markComment: >
|
|
||||||
This issue has been automatically marked as stale because it has not had
|
|
||||||
recent activity. It will be closed if no further activity occurs. Thank you
|
|
||||||
for your contributions.
|
|
||||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
|
||||||
closeComment: false
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
name: Testing the e2e test suites
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-16.04
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [10.x, 12.x, 13.x]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- name: bootstrap
|
|
||||||
run: npm run bootstrap
|
|
||||||
- name: Build
|
|
||||||
run: npm run build
|
|
||||||
- name: end to end
|
|
||||||
run: npm run test:e2e
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
name: Linting Checks
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-16.04
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [10.x, 12.x, 13.x]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- name: bootstrap
|
|
||||||
run: npm run bootstrap
|
|
||||||
- name: Build
|
|
||||||
run: npm run build
|
|
||||||
- name: Linting
|
|
||||||
run: npm run lint
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
name: Unit tests Suite
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-16.04
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [10.x, 12.x, 13.x]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- name: bootstrap
|
|
||||||
run: npm run bootstrap
|
|
||||||
- name: Build
|
|
||||||
run: npm run build
|
|
||||||
- name: Unit tests
|
|
||||||
run: npm run test
|
|
||||||
@@ -1,11 +1,7 @@
|
|||||||
*.log
|
*.log
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.idea
|
/themes/*
|
||||||
|
!.gitkeep
|
||||||
node_modules
|
node_modules
|
||||||
themes/
|
/lib/
|
||||||
lib/
|
.idea
|
||||||
cypress/integration/examples
|
|
||||||
cypress/fixtures/docs
|
|
||||||
|
|
||||||
# exceptions
|
|
||||||
!.gitkeep
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
tasks:
|
|
||||||
- command: gp await-port 3000 && sleep 3 && gp preview $(gp url 3000)
|
|
||||||
- init: npm install
|
|
||||||
command: npm run dev
|
|
||||||
ports:
|
|
||||||
- port: 3000
|
|
||||||
onOpen: ignore
|
|
||||||
vscode:
|
|
||||||
extensions:
|
|
||||||
- sysoev.language-stylus@1.11.0:xX39oruAJ5UQzTNVRdbBaQ==
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
singleQuote: true,
|
|
||||||
trailingComma: 'es5',
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
sudo: false
|
||||||
|
language: node_js
|
||||||
|
node_js: stable
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"prettier.eslintIntegration": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,144 +1,3 @@
|
|||||||
## [4.11.3](https://github.com/docsifyjs/docsify/compare/v4.11.2...v4.11.3) (2020-03-24)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* fix: digit issue with sidebar (complete REVERT to old method) ([154abf5](https://github.com/docsifyjs/docsify/commit/154abf59a6153e84b018fcdffa86892776d6da7d))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [4.11.2](https://github.com/docsifyjs/docsify/compare/v4.11.1...v4.11.2) (2020-03-09)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* fixed rendering of color in coverpage issue ([406670c](https://github.com/docsifyjs/docsify/commit/406670c3d619a627142900fd45019fb8ce00f60a))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [4.11.1](https://github.com/docsifyjs/docsify/compare/v4.11.0...v4.11.1) (2020-03-09)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [4.11.0](https://github.com/docsifyjs/docsify/compare/v4.10.2...v4.11.0) (2020-03-09)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* 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))
|
|
||||||
* 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))
|
|
||||||
* upgrade prismjs from 1.17.1 to 1.19.0 ([9981c43](https://github.com/docsifyjs/docsify/commit/9981c4361ad690d0ed32cf1fb5b48cc5b9f770bb))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* configure pre-commit hook ([#983](https://github.com/docsifyjs/docsify/issues/983)) ([eea41a1](https://github.com/docsifyjs/docsify/commit/eea41a1207c46533ea9c6c59d82e2c94aa4dd70e))
|
|
||||||
* Add a prepare script. ([efbea24](https://github.com/docsifyjs/docsify/commit/efbea24de71f2287993b52ed1cef1a2dd6a53f81))
|
|
||||||
* added capability to add css class and id to images + links + refactoring ([#820](https://github.com/docsifyjs/docsify/issues/820)) ([724ac02](https://github.com/docsifyjs/docsify/commit/724ac024ddfc28e93d8b5dd909e722747286fa00))
|
|
||||||
* added dark mode to docs closes [#1031](https://github.com/docsifyjs/docsify/issues/1031) ([dc43d3c](https://github.com/docsifyjs/docsify/commit/dc43d3c512c2f04750e76176c25ece626ae7fe2a))
|
|
||||||
* new option `hideSidebar` ([#1026](https://github.com/docsifyjs/docsify/issues/1026)) ([b7547f1](https://github.com/docsifyjs/docsify/commit/b7547f151e928b3a0eb6a94b2af36023da4fa877))
|
|
||||||
* new option `topMargin` ([#1045](https://github.com/docsifyjs/docsify/pull/1045)) ([8faee03](https://github.com/docsifyjs/docsify/pull/1024/commits/b53ea1e304d3a2782b125c1d8711295d88faee03))
|
|
||||||
|
|
||||||
|
|
||||||
### Docs
|
|
||||||
|
|
||||||
* 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))
|
|
||||||
* 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))
|
|
||||||
* 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))
|
|
||||||
* 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: 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))
|
|
||||||
* chore(readme): added CI badges and fixed the logo issue
|
|
||||||
* added new linter config ([#1028](https://github.com/docsifyjs/docsify/pull/1028))
|
|
||||||
|
|
||||||
|
|
||||||
## [4.10.2](https://github.com/docsifyjs/docsify/compare/v4.10.0...v4.10.2) (2019-12-16)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [4.10.0](https://github.com/docsifyjs/docsify/compare/v4.9.4...v4.10.0) (2019-12-16)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* fixed security alert for chokidar(update dep) ([a62b037](https://github.com/docsifyjs/docsify/commit/a62b037becb36941c11c8eab6e4d83df8db85af3))
|
|
||||||
* npm audit issues ([#934](https://github.com/docsifyjs/docsify/issues/934)) ([615205c](https://github.com/docsifyjs/docsify/commit/615205cfdb7aea8f37a1ec5dd928105eeef56357))
|
|
||||||
* package security alerts ([f5f1561](https://github.com/docsifyjs/docsify/commit/f5f15619f1a239d6ce12a2f83ad8817352a3352b))
|
|
||||||
* security alerts of cssnano ([d7d5c8f](https://github.com/docsifyjs/docsify/commit/d7d5c8f302d7c18dbb32e982202a07b73badf6f6))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="4.9.4"></a>
|
|
||||||
## [4.9.4](https://github.com/docsifyjs/docsify/compare/v4.9.2...v4.9.4) (2019-05-05)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="4.9.2"></a>
|
|
||||||
## [4.9.2](https://github.com/docsifyjs/docsify/compare/v4.9.1...v4.9.2) (2019-04-21)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* re-render gitalk when router changed ([11ea1f8](https://github.com/docsifyjs/docsify/commit/11ea1f8))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* allows relative path, fixed [#590](https://github.com/docsifyjs/docsify/issues/590) ([31654f1](https://github.com/docsifyjs/docsify/commit/31654f1))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="4.9.1"></a>
|
|
||||||
## [4.9.1](https://github.com/docsifyjs/docsify/compare/v4.9.0...v4.9.1) (2019-02-21)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* github assets url ([#774](https://github.com/docsifyjs/docsify/issues/774)) ([140bf10](https://github.com/docsifyjs/docsify/commit/140bf10))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="4.9.0"></a>
|
|
||||||
# [4.9.0](https://github.com/docsifyjs/docsify/compare/v4.8.6...v4.9.0) (2019-02-19)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* task list rendering (Fix [#749](https://github.com/docsifyjs/docsify/issues/749)) ([#757](https://github.com/docsifyjs/docsify/issues/757)) ([69ef489](https://github.com/docsifyjs/docsify/commit/69ef489))
|
|
||||||
* upgrade npm-run-all ([049726e](https://github.com/docsifyjs/docsify/commit/049726e))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **search-plugin:** add namespace option ([#706](https://github.com/docsifyjs/docsify/issues/706)) ([28beff8](https://github.com/docsifyjs/docsify/commit/28beff8))
|
|
||||||
* Add new theme "dolphin" ([#735](https://github.com/docsifyjs/docsify/issues/735)) ([c3345ba](https://github.com/docsifyjs/docsify/commit/c3345ba))
|
|
||||||
* Provide code fragments feature ([#748](https://github.com/docsifyjs/docsify/issues/748)) ([1447c8a](https://github.com/docsifyjs/docsify/commit/1447c8a))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="4.8.6"></a>
|
<a name="4.8.6"></a>
|
||||||
## [4.8.6](https://github.com/docsifyjs/docsify/compare/v4.8.5...v4.8.6) (2018-11-12)
|
## [4.8.6](https://github.com/docsifyjs/docsify/compare/v4.8.5...v4.8.6) (2018-11-12)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://docsify.js.org">
|
<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>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -10,15 +10,11 @@
|
|||||||
|
|
||||||
<p align="center">
|
<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="#backers"><img alt="Backers on Open Collective" src="https://opencollective.com/docsify/backers/badge.svg?style=flat-square"></a>
|
||||||
<a href="#sponsors">
|
<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 href="https://travis-ci.org/docsifyjs/docsify"><img alt="Travis Status" src="https://img.shields.io/travis/docsifyjs/docsify/master.svg?style=flat-square"></a>
|
||||||
<a><img src="https://github.com/docsifyjs/docsify/workflows/Unit%20tests%20Suite/badge.svg?branch=develop&event=push" alt="Unit tests Suite"></a>
|
|
||||||
<a><img src="https://github.com/docsifyjs/docsify/workflows/Linting%20Checks/badge.svg?branch=develop&event=push" alt="Linting Checks"></a>
|
|
||||||
<a><img src="https://github.com/docsifyjs/docsify/workflows/Testing%20the%20e2e%20test%20suites/badge.svg?branch=develop&event=push" alt="Testing the e2e test suites"></a>
|
|
||||||
<a href="https://www.npmjs.com/package/docsify"><img alt="npm" src="https://img.shields.io/npm/v/docsify.svg?style=flat-square"></a>
|
<a href="https://www.npmjs.com/package/docsify"><img alt="npm" src="https://img.shields.io/npm/v/docsify.svg?style=flat-square"></a>
|
||||||
<a href="https://github.com/QingWei-Li/donate"><img alt="donate" src="https://img.shields.io/badge/%24-donate-ff69b4.svg?style=flat-square"></a>
|
<a href="https://github.com/QingWei-Li/donate"><img alt="donate" src="https://img.shields.io/badge/%24-donate-ff69b4.svg?style=flat-square"></a>
|
||||||
<a href="https://gitter.im/docsifyjs/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link"><img alt="gitter" src="https://img.shields.io/gitter/room/docsifyjs/docsify.svg?style=flat-square"></a>
|
<a href="https://gitter.im/docsifyjs/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link"><img alt="gitter" src="https://img.shields.io/gitter/room/docsifyjs/docsify.svg?style=flat-square"></a>
|
||||||
<a href="https://gitpod.io/#https://github.com/docsifyjs/docsify"><img src="https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod" alt="Gitpod Ready-to-Code"></a>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">Gold Sponsor via <a href="https://opencollective.com/docsify">Open Collective</a></p>
|
<p align="center">Gold Sponsor via <a href="https://opencollective.com/docsify">Open Collective</a></p>
|
||||||
@@ -31,7 +27,6 @@
|
|||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
- [`develop` branch preview](https://docsifyjs.netlify.com/)
|
|
||||||
- [Documentation](https://docsify.js.org)
|
- [Documentation](https://docsify.js.org)
|
||||||
- [CLI](https://github.com/docsifyjs/docsify-cli)
|
- [CLI](https://github.com/docsifyjs/docsify-cli)
|
||||||
- CDN: [UNPKG](https://unpkg.com/docsify/) | [jsDelivr](https://cdn.jsdelivr.net/npm/docsify/) | [cdnjs](https://cdnjs.com/libraries/docsify)
|
- CDN: [UNPKG](https://unpkg.com/docsify/) | [jsDelivr](https://cdn.jsdelivr.net/npm/docsify/) | [cdnjs](https://cdnjs.com/libraries/docsify)
|
||||||
@@ -45,7 +40,7 @@
|
|||||||
- Smart full-text search plugin
|
- Smart full-text search plugin
|
||||||
- Multiple themes
|
- Multiple themes
|
||||||
- Useful plugin API
|
- Useful plugin API
|
||||||
- Compatible with IE11
|
- Compatible with IE10+
|
||||||
- Support SSR ([example](https://github.com/docsifyjs/docsify-ssr-demo))
|
- Support SSR ([example](https://github.com/docsifyjs/docsify-ssr-demo))
|
||||||
- Support embedded files
|
- Support embedded files
|
||||||
|
|
||||||
@@ -59,7 +54,7 @@ Look at [this tutorial](https://docsify.js.org/#/quickstart)
|
|||||||
|
|
||||||
These projects are using docsify to generate their sites. Pull requests welcome :blush:
|
These projects are using docsify to generate their sites. Pull requests welcome :blush:
|
||||||
|
|
||||||
Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify#showcase)
|
Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify)
|
||||||
|
|
||||||
## Similar projects
|
## Similar projects
|
||||||
|
|
||||||
@@ -70,18 +65,6 @@ Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify#showcase)
|
|||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
### Online one-click setup for Contributing
|
|
||||||
|
|
||||||
You can use Gitpod(A free online VS Code-like IDE) for contributing. With single click it'll launch a workspace and automatically:
|
|
||||||
|
|
||||||
- clone the docsify repo.
|
|
||||||
- install the dependencies.
|
|
||||||
- start `npm run dev`.
|
|
||||||
|
|
||||||
So that you can start straight away.
|
|
||||||
|
|
||||||
[](https://gitpod.io/#https://github.com/docsifyjs/docsify)
|
|
||||||
|
|
||||||
- Fork it!
|
- Fork it!
|
||||||
- Create your feature branch: `git checkout -b my-new-feature`
|
- Create your feature branch: `git checkout -b my-new-feature`
|
||||||
- Commit your changes: `git commit -am 'Add some feature'`
|
- Commit your changes: `git commit -am 'Add some feature'`
|
||||||
@@ -123,3 +106,5 @@ This project exists thanks to all the people who contribute. [[Contribute](CONTR
|
|||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT](LICENSE)
|
[MIT](LICENSE)
|
||||||
|
|
||||||
|
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fdocsifyjs%2Fdocsify?ref=badge_large)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ const rollup = require('rollup')
|
|||||||
const buble = require('rollup-plugin-buble')
|
const buble = require('rollup-plugin-buble')
|
||||||
const commonjs = require('rollup-plugin-commonjs')
|
const commonjs = require('rollup-plugin-commonjs')
|
||||||
const nodeResolve = require('rollup-plugin-node-resolve')
|
const nodeResolve = require('rollup-plugin-node-resolve')
|
||||||
const { uglify } = require('rollup-plugin-uglify')
|
const uglify = require('rollup-plugin-uglify')
|
||||||
const replace = require('rollup-plugin-replace')
|
const replace = require('rollup-plugin-replace')
|
||||||
const isProd = process.env.NODE_ENV === 'production'
|
const isProd = process.env.NODE_ENV === 'production'
|
||||||
const version = process.env.VERSION || require('../package.json').version
|
const version = process.env.VERSION || require('../package.json').version
|
||||||
@@ -55,7 +55,6 @@ const buildAllPlugin = function () {
|
|||||||
var plugins = [
|
var plugins = [
|
||||||
{name: 'search', input: 'search/index.js'},
|
{name: 'search', input: 'search/index.js'},
|
||||||
{name: 'ga', input: 'ga.js'},
|
{name: 'ga', input: 'ga.js'},
|
||||||
{name: 'matomo', input: 'matomo.js'},
|
|
||||||
{name: 'emoji', input: 'emoji.js'},
|
{name: 'emoji', input: 'emoji.js'},
|
||||||
{name: 'external-script', input: 'external-script.js'},
|
{name: 'external-script', input: 'external-script.js'},
|
||||||
{name: 'front-matter', input: 'front-matter/index.js'},
|
{name: 'front-matter', input: 'front-matter/index.js'},
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
const fs = require('fs')
|
|
||||||
const path = require('path')
|
|
||||||
const {spawn} = require('child_process')
|
|
||||||
|
|
||||||
const args = process.argv.slice(2)
|
|
||||||
fs.readdir(path.join(__dirname, '../src/themes'), (err, files) => {
|
|
||||||
if (err) {
|
|
||||||
console.log('err', err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
files.map(async (file) => {
|
|
||||||
if (/\.styl/g.test(file)) {
|
|
||||||
var stylusCMD;
|
|
||||||
const stylusBin = ['node_modules', 'stylus', 'bin', 'stylus'].join(path.sep)
|
|
||||||
var cmdargs = [
|
|
||||||
stylusBin,
|
|
||||||
`src/themes/${file}`,
|
|
||||||
'-u',
|
|
||||||
'autoprefixer-stylus'
|
|
||||||
]
|
|
||||||
cmdargs = cmdargs.concat(args)
|
|
||||||
|
|
||||||
stylusCMD = spawn('node', cmdargs, { shell: true })
|
|
||||||
|
|
||||||
stylusCMD.stdout.on('data', (data) => {
|
|
||||||
console.log(`[Stylus Build ] stdout: ${data}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
stylusCMD.stderr.on('data', (data) => {
|
|
||||||
console.error(`[Stylus Build ] stderr: ${data}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
stylusCMD.on('close', (code) => {
|
|
||||||
console.log(`[Stylus Build ] child process exited with code ${code}`);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
})
|
|
||||||
@@ -12,9 +12,7 @@ echo
|
|||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
echo "Releasing $VERSION ..."
|
echo "Releasing $VERSION ..."
|
||||||
|
|
||||||
# Removing test script as non - availibity of tests. Will Add it once tests are completed
|
npm run test
|
||||||
|
|
||||||
# npm run test
|
|
||||||
|
|
||||||
# build
|
# build
|
||||||
VERSION=$VERSION npm run build
|
VERSION=$VERSION npm run build
|
||||||
@@ -31,6 +29,7 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|||||||
|
|
||||||
# commit
|
# commit
|
||||||
git add -A
|
git add -A
|
||||||
|
git add -f lib/ -A
|
||||||
git commit -m "[build] $VERSION $RELEASE_TAG"
|
git commit -m "[build] $VERSION $RELEASE_TAG"
|
||||||
npm --no-git-tag-version version $VERSION --message "[release] $VERSION $RELEASE_TAG"
|
npm --no-git-tag-version version $VERSION --message "[release] $VERSION $RELEASE_TAG"
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"video": false
|
|
||||||
}
|
|
||||||
@@ -1,123 +0,0 @@
|
|||||||
<!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, user-scalable=no, initial-scale=1.0, maximum-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'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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 = {
|
|
||||||
room: 'docsifyjs/Lobby'
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<script
|
|
||||||
src="https://sidecar.gitter.im/dist/sidecar.v1.js"
|
|
||||||
async
|
|
||||||
defer
|
|
||||||
></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,344 +0,0 @@
|
|||||||
context('sidebar.configurations', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
cy.visit('http://localhost:3000');
|
|
||||||
});
|
|
||||||
|
|
||||||
const quickStartIds = [
|
|
||||||
'initialize',
|
|
||||||
'writing-content',
|
|
||||||
'preview-your-site',
|
|
||||||
'manual-initialization',
|
|
||||||
'loading-dialog',
|
|
||||||
];
|
|
||||||
quickStartIds.forEach(id => {
|
|
||||||
it('go to #quickstart?id=' + id, () => {
|
|
||||||
cy.get(
|
|
||||||
'.sidebar-nav > :nth-child(1) > :nth-child(1) > ul > :nth-child(1) > a'
|
|
||||||
).click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/quickstart?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const configurationIds = [
|
|
||||||
'el',
|
|
||||||
'repo',
|
|
||||||
'maxlevel',
|
|
||||||
'loadnavbar',
|
|
||||||
'loadsidebar',
|
|
||||||
'hidesidebar',
|
|
||||||
'submaxlevel',
|
|
||||||
'auto2top',
|
|
||||||
'homepage',
|
|
||||||
'basepath',
|
|
||||||
'relativepath',
|
|
||||||
'coverpage',
|
|
||||||
'logo',
|
|
||||||
'name',
|
|
||||||
'namelink',
|
|
||||||
'markdown',
|
|
||||||
'themecolor',
|
|
||||||
'alias',
|
|
||||||
'autoheader',
|
|
||||||
'executescript',
|
|
||||||
'noemoji',
|
|
||||||
'mergenavbar',
|
|
||||||
'formatupdated',
|
|
||||||
'externallinktarget',
|
|
||||||
'cornerexternallinktarget',
|
|
||||||
'externallinkrel',
|
|
||||||
'routermode',
|
|
||||||
'nocompilelinks',
|
|
||||||
'onlycover',
|
|
||||||
'requestheaders',
|
|
||||||
'ext',
|
|
||||||
'fallbacklanguages',
|
|
||||||
'notfoundpage',
|
|
||||||
];
|
|
||||||
configurationIds.forEach(id => {
|
|
||||||
it('go to #configuration?id=' + id, () => {
|
|
||||||
cy.get('[href="#/configuration"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/configuration?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500); // its more far from the cover
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const morePagesIds = [
|
|
||||||
'sidebar',
|
|
||||||
'nested-sidebars',
|
|
||||||
'set-page-titles-from-sidebar-selection',
|
|
||||||
'table-of-contents',
|
|
||||||
'ignoring-subheaders',
|
|
||||||
];
|
|
||||||
morePagesIds.forEach(id => {
|
|
||||||
it('go to #more-pages?id=' + id, () => {
|
|
||||||
cy.get('[href="#/more-pages"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/more-pages?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const customNavbarIds = [
|
|
||||||
'html',
|
|
||||||
'markdown',
|
|
||||||
'nesting',
|
|
||||||
'combining-custom-navbars-with-the-emoji-plugin',
|
|
||||||
];
|
|
||||||
customNavbarIds.forEach(id => {
|
|
||||||
it('go to #custom-navbar?id=' + id, () => {
|
|
||||||
cy.get('[href="#/custom-navbar"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/custom-navbar?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const coverIds = [
|
|
||||||
'basic-usage',
|
|
||||||
'custom-background',
|
|
||||||
'coverpage-as-homepage',
|
|
||||||
'multiple-covers',
|
|
||||||
];
|
|
||||||
coverIds.forEach(id => {
|
|
||||||
it('go to #cover?id=' + id, () => {
|
|
||||||
cy.get('[href="#/cover"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/cover?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const themesIds = ['other-themes'];
|
|
||||||
themesIds.forEach(id => {
|
|
||||||
it('go to #themes?id=' + id, () => {
|
|
||||||
cy.get('[href="#/themes"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/themes?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const pluginsIds = [
|
|
||||||
'full-text-search',
|
|
||||||
'google-analytics',
|
|
||||||
'emoji',
|
|
||||||
'external-script',
|
|
||||||
'zoom-image',
|
|
||||||
'edit-on-github',
|
|
||||||
'demo-code-with-instant-preview-and-jsfiddle-integration',
|
|
||||||
'copy-to-clipboard',
|
|
||||||
'disqus',
|
|
||||||
'gitalk',
|
|
||||||
'pagination',
|
|
||||||
'codefund',
|
|
||||||
'tabs',
|
|
||||||
'more-plugins',
|
|
||||||
];
|
|
||||||
pluginsIds.forEach(id => {
|
|
||||||
it('go to #plugins?id=' + id, () => {
|
|
||||||
cy.get('[href="#/plugins"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/plugins?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const writeAPluginIds = ['full-configuration', 'example', 'tips'];
|
|
||||||
writeAPluginIds.forEach(id => {
|
|
||||||
it('go to #write-a-plugin?id=' + id, () => {
|
|
||||||
cy.get('[href="#/write-a-plugin"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/write-a-plugin?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const markdownIds = ['supports-mermaid'];
|
|
||||||
markdownIds.forEach(id => {
|
|
||||||
it('go to #markdown?id=' + id, () => {
|
|
||||||
cy.get('[href="#/markdown"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/markdown?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('go to #Language-highlight', () => {
|
|
||||||
cy.get('a[href="#/language-highlight"]')
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// const deployIds = [
|
|
||||||
// 'github-pages',
|
|
||||||
// 'gitlab-pages',
|
|
||||||
// 'firebase-hosting',
|
|
||||||
// 'vps',
|
|
||||||
// 'netlify',
|
|
||||||
// 'zeit-now',
|
|
||||||
// 'aws-amplify'
|
|
||||||
// ]
|
|
||||||
// deployIds.forEach(id => {
|
|
||||||
// it('go to #deploy?id=' + id, () => {
|
|
||||||
// cy.get('[href="#/deploy"]').click()
|
|
||||||
|
|
||||||
// cy.get(`a.section-link[href='#/deploy?id=${id}']`)
|
|
||||||
// .click()
|
|
||||||
// .then(() => {
|
|
||||||
// cy.wait(500)
|
|
||||||
// cy.matchImageSnapshot()
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
|
|
||||||
const helpersIds = [
|
|
||||||
'important-content',
|
|
||||||
'general-tips',
|
|
||||||
'ignore-to-compile-link',
|
|
||||||
'set-target-attribute-for-link',
|
|
||||||
'disable-link',
|
|
||||||
'github-task-lists',
|
|
||||||
'customise-id-for-headings',
|
|
||||||
'markdown-in-html-tag',
|
|
||||||
];
|
|
||||||
helpersIds.forEach(id => {
|
|
||||||
it('go to #helpers?id=' + id, () => {
|
|
||||||
cy.get('[href="#/helpers"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/helpers?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const vueIds = ['basic-usage', 'combine-vuep-to-write-playground'];
|
|
||||||
vueIds.forEach(id => {
|
|
||||||
it('go to #vue?id=' + id, () => {
|
|
||||||
cy.get('[href="#/vue"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/vue?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const cdnIds = [
|
|
||||||
'latest-version',
|
|
||||||
'specific-version',
|
|
||||||
'compressed-file',
|
|
||||||
'other-cdn',
|
|
||||||
];
|
|
||||||
cdnIds.forEach(id => {
|
|
||||||
it('go to #cdn?id=' + id, () => {
|
|
||||||
cy.get('[href="#/cdn"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/cdn?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const pwaIds = ['create-serviceworker', 'register', 'enjoy-it'];
|
|
||||||
pwaIds.forEach(id => {
|
|
||||||
it('go to #pwa?id=' + id, () => {
|
|
||||||
cy.get('[href="#/pwa"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/pwa?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const ssrIds = [
|
|
||||||
'why-ssr',
|
|
||||||
'quick-start',
|
|
||||||
'custom-template',
|
|
||||||
'configuration',
|
|
||||||
'deploy-for-your-vps',
|
|
||||||
];
|
|
||||||
|
|
||||||
ssrIds.forEach(id => {
|
|
||||||
it('go to #ssr?id=' + id, () => {
|
|
||||||
cy.get('[href="#/ssr"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/ssr?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
const embedFilesIds = [
|
|
||||||
'embedded-file-type',
|
|
||||||
'embedded-code-fragments',
|
|
||||||
'tag-attribute',
|
|
||||||
'the-code-block-highlight',
|
|
||||||
];
|
|
||||||
embedFilesIds.forEach(id => {
|
|
||||||
it('go to #embed-files?id=' + id, () => {
|
|
||||||
cy.get('[href="#/embed-files"]').click();
|
|
||||||
|
|
||||||
cy.get(`a.section-link[href='#/embed-files?id=${id}']`)
|
|
||||||
.click()
|
|
||||||
.then(() => {
|
|
||||||
cy.wait(500);
|
|
||||||
cy.matchImageSnapshot();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
const path = require('path')
|
|
||||||
const LiveServer = require('live-server')
|
|
||||||
|
|
||||||
const fixturePath = path.join(__dirname, './fixtures/docs')
|
|
||||||
const args = process.argv.slice(2)
|
|
||||||
console.log('[e2e tests] : args passed to live server', args)
|
|
||||||
const params = {
|
|
||||||
port: args[0] || 3000,
|
|
||||||
root: args[1] || fixturePath,
|
|
||||||
open: false
|
|
||||||
// NoBrowser: true
|
|
||||||
}
|
|
||||||
LiveServer.start(params)
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
// ***********************************************************
|
|
||||||
// This example plugins/index.js can be used to load plugins
|
|
||||||
//
|
|
||||||
// You can change the location of this file or turn off loading
|
|
||||||
// the plugins file with the 'pluginsFile' configuration option.
|
|
||||||
//
|
|
||||||
// You can read more here:
|
|
||||||
// https://on.cypress.io/plugins-guide
|
|
||||||
// ***********************************************************
|
|
||||||
|
|
||||||
// This function is called when a project is opened or re-opened (e.g. due to
|
|
||||||
// the project's config changing)
|
|
||||||
const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin')
|
|
||||||
module.exports = (on, config) => {
|
|
||||||
// `on` is used to hook into various events Cypress emits
|
|
||||||
// `config` is the resolved Cypress config
|
|
||||||
addMatchImageSnapshotPlugin(on, config)
|
|
||||||
}
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
const copyDir = require('copy-dir')
|
|
||||||
const path = require('path')
|
|
||||||
const fs = require('fs')
|
|
||||||
const { spawn } = require('child_process')
|
|
||||||
|
|
||||||
const setup = async () => {
|
|
||||||
const PORT = process.env.PORT || 3000
|
|
||||||
global.__LIVESERVER__ = null
|
|
||||||
global.PORT = PORT
|
|
||||||
|
|
||||||
/**
|
|
||||||
* IN this test suite, we are going to test our docs site with all the css,js linked to our local build packages
|
|
||||||
*
|
|
||||||
* 1.1 Copy ../docs --> ./fixtures/docs
|
|
||||||
* 1.2 copy lib,themes --> ./fixtures/
|
|
||||||
* 2. change the content of fixtures/docs/index.html to use all the links from our local build
|
|
||||||
* 3. now jest runner will run to test all the *.spec.js files
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
const shippedDirs = ['lib', 'themes']
|
|
||||||
|
|
||||||
// 1
|
|
||||||
const docsPath = path.join(process.cwd(), './docs')
|
|
||||||
const fixtureDocsPath = path.join(__dirname, './fixtures/docs')
|
|
||||||
|
|
||||||
// 1.1
|
|
||||||
console.log('[cypress test docs] Copying the docs --> cypress/fixtures/docs')
|
|
||||||
copyDir.sync(docsPath, fixtureDocsPath)
|
|
||||||
|
|
||||||
// 1.2
|
|
||||||
shippedDirs.forEach(dir => {
|
|
||||||
const fromPath = path.join(process.cwd(), dir)
|
|
||||||
const toPath = path.join(__dirname, `./fixtures/docs/${dir}`)
|
|
||||||
console.log(
|
|
||||||
`[cypress test docs] Copying ${dir} --> cypress/fixtures/docs/${dir}`
|
|
||||||
)
|
|
||||||
copyDir.sync(fromPath, toPath)
|
|
||||||
})
|
|
||||||
|
|
||||||
// 2
|
|
||||||
console.log(
|
|
||||||
'[cypress test docs] Replacing content the tpl/index.html --> cypress/fixtures/docs/index.html'
|
|
||||||
)
|
|
||||||
const indexHTMLtplPath = path.join(
|
|
||||||
__dirname,
|
|
||||||
'./fixtures/tpl/docs.index.html'
|
|
||||||
)
|
|
||||||
const fixtureIndexPath = path.join(__dirname, './fixtures/docs/index.html')
|
|
||||||
const data = fs.readFileSync(indexHTMLtplPath, 'utf8')
|
|
||||||
|
|
||||||
// 3
|
|
||||||
const fixturePath = path.join(__dirname, './fixtures/docs')
|
|
||||||
|
|
||||||
fs.writeFileSync(fixtureIndexPath, data, 'utf8')
|
|
||||||
const child = spawn('node', [
|
|
||||||
path.join(__dirname, './live.server.js'),
|
|
||||||
PORT,
|
|
||||||
fixturePath
|
|
||||||
])
|
|
||||||
child.on('exit', code => {
|
|
||||||
console.log(`Child process exited with code ${code}`)
|
|
||||||
})
|
|
||||||
child.stdout.on('data', data => {
|
|
||||||
console.log(`stdout: ${data}`)
|
|
||||||
})
|
|
||||||
child.stderr.on('data', data => {
|
|
||||||
console.log(`stderr: ${data}`)
|
|
||||||
})
|
|
||||||
|
|
||||||
// LiveServer.start(params)
|
|
||||||
global.__LIVESERVER__ = child
|
|
||||||
}
|
|
||||||
|
|
||||||
setup()
|
|
||||||
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 91 KiB |