Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab597ca8e0 | ||
|
|
154abf59a6 | ||
|
|
f3a7929f07 | ||
|
|
d08d1dd9bb | ||
|
|
0eb9708225 | ||
|
|
378f151478 | ||
|
|
643850907c | ||
|
|
b1acfe458c | ||
|
|
d3ec14f06f | ||
|
|
8d84bc8562 | ||
|
|
bbcee36106 | ||
|
|
184ff51774 | ||
|
|
b62a0c8f3e | ||
|
|
a137d38416 | ||
|
|
b4b1033f69 | ||
|
|
9afa66607d | ||
|
|
406670c3d6 | ||
|
|
1811842979 | ||
|
|
b7e81f7ff4 | ||
|
|
5f86454175 | ||
|
|
df8a248678 | ||
|
|
86df3bb32d | ||
|
|
ec0409969e | ||
|
|
9981c4361a | ||
|
|
39ebd73021 | ||
|
|
78290b2103 | ||
|
|
5d541dd7d4 | ||
|
|
0f1749cb66 | ||
|
|
291c99bc38 | ||
|
|
b53ea1e304 | ||
|
|
562cd7cb3a | ||
|
|
dc43d3c512 | ||
|
|
c83b7e3c94 | ||
|
|
b7547f151e | ||
|
|
75c72e917b | ||
|
|
a111df9980 | ||
|
|
2639be7773 | ||
|
|
5f7464af48 | ||
|
|
b3d9b966df | ||
|
|
0e4cdad73e | ||
|
|
d798a12715 | ||
|
|
6e9911c1df | ||
|
|
92c29acb84 | ||
|
|
724ac024dd | ||
|
|
6184e50262 | ||
|
|
90a35ab952 | ||
|
|
2928eb7e55 | ||
|
|
b83622e41a | ||
|
|
fc6e3ee9b2 | ||
|
|
74ee01cb32 | ||
|
|
4419611238 | ||
|
|
0e54ea1177 | ||
|
|
a213f98cb0 | ||
|
|
07f6edc9ca | ||
|
|
e566e9c6e7 | ||
|
|
efbea24de7 | ||
|
|
4f486798df | ||
|
|
b3eced395a | ||
|
|
336908f721 | ||
|
|
45d0c3af80 | ||
|
|
7fb50b95f1 | ||
|
|
db97a1d22a | ||
|
|
157973c509 | ||
|
|
67a981b8d9 | ||
|
|
d60fb7da7b | ||
|
|
7d0c164bf5 | ||
|
|
5b77b0f628 | ||
|
|
8416275e25 | ||
|
|
808123bc30 | ||
|
|
daf54b9d36 | ||
|
|
eea41a1207 | ||
|
|
3cd03d480d | ||
|
|
9a90b9b927 | ||
|
|
75919f1235 | ||
|
|
b0b3de0a66 | ||
|
|
589a5732d3 | ||
|
|
b62b213435 | ||
|
|
a59328719b | ||
|
|
4a8f2c5bfa | ||
|
|
79f8211a45 | ||
|
|
68327c5c9a | ||
|
|
1622578045 | ||
|
|
c403318ac6 | ||
|
|
8bf4b06d3a | ||
|
|
378d7bb492 | ||
|
|
11762cbb73 | ||
|
|
8f496d84ce | ||
|
|
98525c4a2d | ||
|
|
e61410a757 | ||
|
|
745e5ffa54 | ||
|
|
8d5787eabe | ||
|
|
dd9e5f98e0 | ||
|
|
229a63c2e8 | ||
|
|
5b575441e9 | ||
|
|
0bd4f05034 | ||
|
|
cc3f30b582 | ||
|
|
64e460aaed | ||
|
|
52fcc6f081 | ||
|
|
3f53b7166e | ||
|
|
d9ec246508 | ||
|
|
7b871006e6 | ||
|
|
5a6289d504 | ||
|
|
a62b037bec | ||
|
|
d7d5c8f302 | ||
|
|
f5f15619f1 | ||
|
|
236c9a29b4 | ||
|
|
b95f8d2884 | ||
|
|
79a54b462b | ||
|
|
6b8773fbb0 | ||
|
|
8ea7e32e14 | ||
|
|
83f9b01852 | ||
|
|
8454889f63 | ||
|
|
77c3fc8bcd | ||
|
|
615205cfdb | ||
|
|
c6fde53f91 | ||
|
|
4769018e26 | ||
|
|
84384eeab3 | ||
|
|
1d3246a26f | ||
|
|
8ea4865c84 | ||
|
|
12d80f64c9 | ||
|
|
2fb5a1128e | ||
|
|
c78f2117e3 | ||
|
|
e8dc5229de | ||
|
|
7a838d1b24 | ||
|
|
f8f46108dd | ||
|
|
669f243a7a | ||
|
|
11bbd4cd27 | ||
|
|
76825a7b55 | ||
|
|
72763398c3 | ||
|
|
fd4a42c3b5 | ||
|
|
25e3cac66a | ||
|
|
6162eb234d | ||
|
|
cb3f4865e2 | ||
|
|
80d5ac061f | ||
|
|
0515b4d925 | ||
|
|
b95c254f81 | ||
|
|
5a75bf6cb6 | ||
|
|
2671d189fb | ||
|
|
6e6b4e1b66 | ||
|
|
676f84cffa | ||
|
|
7bdcadc7d7 | ||
|
|
5bd24fb83c | ||
|
|
76cc0f672b | ||
|
|
3f50381090 | ||
|
|
b847c20cab | ||
|
|
ce829b24d6 | ||
|
|
1ce53cf9ec | ||
|
|
bc1d8e4bda | ||
|
|
78f5564a30 | ||
|
|
6cc069cb9f | ||
|
|
d355272461 | ||
|
|
af161cd3b4 | ||
|
|
5bcb016bee | ||
|
|
b38c2065e0 | ||
|
|
e5bab8d967 | ||
|
|
da3e2d7b18 | ||
|
|
b93a667f24 | ||
|
|
e8d850c9ba | ||
|
|
514a027991 | ||
|
|
314e2d9d39 | ||
|
|
a86de3d81a | ||
|
|
5f960102e7 | ||
|
|
0bd5c8b020 | ||
|
|
044a5ec2b8 | ||
|
|
b15eccfac0 | ||
|
|
4e0298088b | ||
|
|
09616dec06 | ||
|
|
f74b53f53e | ||
|
|
bba44fb536 | ||
|
|
270fa6cb41 | ||
|
|
24e61f5e2f | ||
|
|
ca8ae50717 | ||
|
|
31654f12ec | ||
|
|
d80aa2189b | ||
|
|
21cde83949 | ||
|
|
c1d4961a64 | ||
|
|
2039e0dd1c | ||
|
|
d5910bd1f9 | ||
|
|
a35531967a | ||
|
|
dac0bfec6c | ||
|
|
01ea44106b | ||
|
|
11ea1f8d12 | ||
|
|
bc4d06bb16 | ||
|
|
29d9cda3de | ||
|
|
140bf10377 | ||
|
|
dfd31b5de7 | ||
|
|
d1c72686bb | ||
|
|
8cd786c9d5 | ||
|
|
b53571810b | ||
|
|
cb53106fa7 | ||
|
|
fd86c727af | ||
|
|
69ef489210 | ||
|
|
c3345ba20c | ||
|
|
1447c8a40a | ||
|
|
3b952ac7c3 | ||
|
|
99dbaa3050 |
@@ -2,4 +2,10 @@
|
||||
packages/docsify-server-renderer/build.js
|
||||
node_modules
|
||||
build
|
||||
server.js
|
||||
server.js
|
||||
cypress
|
||||
lib
|
||||
themes
|
||||
build
|
||||
docs/
|
||||
**/*.md
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
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',
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
open_collective: docsify
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
<!-- Love docsify? Please consider supporting our collective:
|
||||
👉 https://opencollective.com/docsify/donate -->
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
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)
|
||||
@@ -0,0 +1,25 @@
|
||||
---
|
||||
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,5 +1,54 @@
|
||||
Please makes sure these boxes are checked before submitting your PR, thank you!
|
||||
<!-- Please use English language -->
|
||||
<!-- 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.
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# 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
|
||||
@@ -0,0 +1,31 @@
|
||||
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
|
||||
@@ -0,0 +1,31 @@
|
||||
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
|
||||
@@ -0,0 +1,31 @@
|
||||
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,7 +1,11 @@
|
||||
*.log
|
||||
.DS_Store
|
||||
/themes/*
|
||||
!.gitkeep
|
||||
.idea
|
||||
node_modules
|
||||
/lib/
|
||||
.idea
|
||||
themes/
|
||||
lib/
|
||||
cypress/integration/examples
|
||||
cypress/fixtures/docs
|
||||
|
||||
# exceptions
|
||||
!.gitkeep
|
||||
@@ -0,0 +1,10 @@
|
||||
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==
|
||||
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
singleQuote: true,
|
||||
trailingComma: 'es5',
|
||||
};
|
||||
@@ -1,3 +0,0 @@
|
||||
sudo: false
|
||||
language: node_js
|
||||
node_js: stable
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"prettier.eslintIntegration": true
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,135 @@
|
||||
## [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>
|
||||
## [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">
|
||||
<a href="https://docsify.js.org">
|
||||
<img alt="docsify" src="./docs/_media/icon.svg">
|
||||
<img alt="docsify" src="https://github.com/docsifyjs/docsify/blob/develop/docs/_media/icon.svg">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@@ -10,11 +10,15 @@
|
||||
|
||||
<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>
|
||||
<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 href="#sponsors">
|
||||
<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&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://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://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 align="center">Gold Sponsor via <a href="https://opencollective.com/docsify">Open Collective</a></p>
|
||||
@@ -27,6 +31,7 @@
|
||||
|
||||
## Links
|
||||
|
||||
- [`develop` branch preview](https://docsifyjs.netlify.com/)
|
||||
- [Documentation](https://docsify.js.org)
|
||||
- [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)
|
||||
@@ -40,7 +45,7 @@
|
||||
- Smart full-text search plugin
|
||||
- Multiple themes
|
||||
- Useful plugin API
|
||||
- Compatible with IE10+
|
||||
- Compatible with IE11
|
||||
- Support SSR ([example](https://github.com/docsifyjs/docsify-ssr-demo))
|
||||
- Support embedded files
|
||||
|
||||
@@ -54,7 +59,7 @@ Look at [this tutorial](https://docsify.js.org/#/quickstart)
|
||||
|
||||
These projects are using docsify to generate their sites. Pull requests welcome :blush:
|
||||
|
||||
Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify)
|
||||
Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify#showcase)
|
||||
|
||||
## Similar projects
|
||||
|
||||
@@ -65,6 +70,18 @@ Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify)
|
||||
|
||||
## 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!
|
||||
- Create your feature branch: `git checkout -b my-new-feature`
|
||||
- Commit your changes: `git commit -am 'Add some feature'`
|
||||
@@ -106,5 +123,3 @@ This project exists thanks to all the people who contribute. [[Contribute](CONTR
|
||||
## 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 commonjs = require('rollup-plugin-commonjs')
|
||||
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 isProd = process.env.NODE_ENV === 'production'
|
||||
const version = process.env.VERSION || require('../package.json').version
|
||||
@@ -55,6 +55,7 @@ const buildAllPlugin = function () {
|
||||
var plugins = [
|
||||
{name: 'search', input: 'search/index.js'},
|
||||
{name: 'ga', input: 'ga.js'},
|
||||
{name: 'matomo', input: 'matomo.js'},
|
||||
{name: 'emoji', input: 'emoji.js'},
|
||||
{name: 'external-script', input: 'external-script.js'},
|
||||
{name: 'front-matter', input: 'front-matter/index.js'},
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
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,7 +12,9 @@ echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Releasing $VERSION ..."
|
||||
|
||||
npm run test
|
||||
# Removing test script as non - availibity of tests. Will Add it once tests are completed
|
||||
|
||||
# npm run test
|
||||
|
||||
# build
|
||||
VERSION=$VERSION npm run build
|
||||
@@ -29,7 +31,6 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
|
||||
# commit
|
||||
git add -A
|
||||
git add -f lib/ -A
|
||||
git commit -m "[build] $VERSION $RELEASE_TAG"
|
||||
npm --no-git-tag-version version $VERSION --message "[release] $VERSION $RELEASE_TAG"
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"video": false
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<!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>
|
||||
@@ -0,0 +1,344 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
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)
|
||||
@@ -0,0 +1,18 @@
|
||||
// ***********************************************************
|
||||
// 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)
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
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()
|
||||
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 97 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 91 KiB |