Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b4098d338 | ||
|
|
d44a517a88 | ||
|
|
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 | ||
|
|
6ac7bace21 | ||
|
|
28beff80f7 | ||
|
|
049726e11e | ||
|
|
a257a4ab4e | ||
|
|
a07a613312 | ||
|
|
4db8cd6abf | ||
|
|
a72e7490c3 | ||
|
|
cc79e2e992 | ||
|
|
5b6525b8f1 | ||
|
|
aa719e3a47 | ||
|
|
22a5927eaf | ||
|
|
5ab9d8cb87 | ||
|
|
f84242d380 | ||
|
|
1a945d445a | ||
|
|
81ec7c763b | ||
|
|
d91a66cadd | ||
|
|
58b130996e | ||
|
|
ee800a6572 | ||
|
|
6daecc8a68 | ||
|
|
325ecd08e6 | ||
|
|
9a09458eee | ||
|
|
fdd8826b3b | ||
|
|
fcd1087c16 | ||
|
|
ab19b13210 | ||
|
|
5fcf210dd1 | ||
|
|
2edf47ec73 | ||
|
|
b52607dec9 | ||
|
|
e89a2b3fea | ||
|
|
239eb3503b | ||
|
|
fce40eae25 | ||
|
|
d35059dd0b | ||
|
|
4f588e0af4 | ||
|
|
22ab7dfd14 | ||
|
|
4805cb5322 | ||
|
|
2bc880d335 | ||
|
|
b3b6116464 | ||
|
|
137ae8d5b8 | ||
|
|
4a23c4acf2 | ||
|
|
a39b214733 | ||
|
|
1ce37bdc2e | ||
|
|
2cd4646386 | ||
|
|
42ea8af245 | ||
|
|
bf060befb7 | ||
|
|
b329e1eb1d | ||
|
|
63876c601d | ||
|
|
0a0802aded | ||
|
|
94bc415534 | ||
|
|
9e860177cb | ||
|
|
47a8d5faa4 | ||
|
|
18f0f03a89 | ||
|
|
f6f4e32485 | ||
|
|
50c2434ab5 | ||
|
|
1897bb6af0 | ||
|
|
b0179e4c64 | ||
|
|
c6eafa32b1 | ||
|
|
8336769127 | ||
|
|
393e4ec044 | ||
|
|
100ab01811 | ||
|
|
a683e5bf2a | ||
|
|
6a3cbba35b | ||
|
|
a923121be8 | ||
|
|
f7274e141f | ||
|
|
266d13bca6 | ||
|
|
de70d92fda | ||
|
|
75f914354f | ||
|
|
2e793061a8 | ||
|
|
78b3a6d007 | ||
|
|
845b1f2990 | ||
|
|
e281704e83 | ||
|
|
55755010c0 | ||
|
|
73a38c3878 | ||
|
|
62b4fc2121 | ||
|
|
a91d2dab67 | ||
|
|
a961e3b972 | ||
|
|
3c94178805 | ||
|
|
490242fb73 | ||
|
|
5c0de0aefe | ||
|
|
04b36b0ef2 | ||
|
|
3a7ad6299e | ||
|
|
feea7f9b48 | ||
|
|
cd09d91434 | ||
|
|
a5f333a329 | ||
|
|
7dcebe7544 | ||
|
|
cc636e6ca3 | ||
|
|
5523a2a2a9 | ||
|
|
f8f22e5a3c | ||
|
|
ee72dd05e5 | ||
|
|
6c7ebc989d | ||
|
|
57967d2caa | ||
|
|
c2886b1b62 | ||
|
|
2d9e581d63 | ||
|
|
604989ff04 | ||
|
|
26525db433 | ||
|
|
2b0109b89a | ||
|
|
fb144b2e69 | ||
|
|
ac695de859 | ||
|
|
e5a263f1bb | ||
|
|
48e531bcfb | ||
|
|
1f338d2142 | ||
|
|
cf05d7b26c | ||
|
|
cb1a56d89b | ||
|
|
62b7578468 | ||
|
|
410efb2bc2 | ||
|
|
1e99d7b514 | ||
|
|
e4e011c81f | ||
|
|
4cd0e5eb49 | ||
|
|
531e483c31 | ||
|
|
6a3d69ae1a | ||
|
|
ef1b42be23 | ||
|
|
54f45ecb0a | ||
|
|
4c91fbc7cb | ||
|
|
bfd0d18e48 | ||
|
|
74ff68a40e | ||
|
|
e737a42f75 | ||
|
|
a850b29545 | ||
|
|
aeb692ed6b | ||
|
|
01140ceb54 | ||
|
|
87129c0fb2 | ||
|
|
95e95bd23b | ||
|
|
8974f3964e | ||
|
|
75222209da | ||
|
|
8352a1e489 | ||
|
|
9b3b4454de | ||
|
|
0933445e89 | ||
|
|
ec8daca3ec | ||
|
|
1335baa22f | ||
|
|
123c516836 | ||
|
|
ecc0e04c70 | ||
|
|
278a75ebd5 | ||
|
|
b8a4e6ba1b | ||
|
|
01bbbaaf92 | ||
|
|
e5c64a3d8f | ||
|
|
e5ae6e8d25 | ||
|
|
702bb5b715 | ||
|
|
7cdf751cc5 | ||
|
|
6a09059645 | ||
|
|
84f7b5c7c2 | ||
|
|
fd14e14022 | ||
|
|
4b5185f0d7 | ||
|
|
45a7464d23 | ||
|
|
222cfdbbe4 | ||
|
|
890a7bf9b6 | ||
|
|
edc3201367 | ||
|
|
8dd4378e89 | ||
|
|
149d9929f8 | ||
|
|
50fe22563b | ||
|
|
4aafde85fb | ||
|
|
dc0c3ced4e | ||
|
|
62ce447fc3 | ||
|
|
471e407c73 | ||
|
|
8fb74a2d87 | ||
|
|
a41129425f | ||
|
|
e097f88f0e | ||
|
|
033be4f2d7 | ||
|
|
371fbecfc2 | ||
|
|
e810ba38cb | ||
|
|
df84bc73ee | ||
|
|
a0c60b707c | ||
|
|
7a33ec2133 | ||
|
|
cb900a68e5 | ||
|
|
4bdcee2cb3 | ||
|
|
bd7ee84241 | ||
|
|
bf5d999296 | ||
|
|
56608e4739 | ||
|
|
4d61b1e9a3 | ||
|
|
c4d83f26a4 | ||
|
|
248aa72cd2 | ||
|
|
54ab4c9ff7 | ||
|
|
f960c196bf | ||
|
|
85428ef49e | ||
|
|
342438f2a7 | ||
|
|
9e824a4958 | ||
|
|
ebc10c4e43 | ||
|
|
b265fdd68a | ||
|
|
f68ddf5af0 | ||
|
|
9755439670 | ||
|
|
761ccc2c2b | ||
|
|
524f52f882 | ||
|
|
a90a2e49e1 | ||
|
|
864aa181a1 | ||
|
|
5e161a1420 | ||
|
|
820abeb0fd | ||
|
|
b073dd3ace | ||
|
|
c7892e340b | ||
|
|
21336444f4 | ||
|
|
39dd894650 | ||
|
|
30f07b1d5b | ||
|
|
4157173099 | ||
|
|
b133fde32a |
@@ -1,3 +1,7 @@
|
||||
.git/
|
||||
.git
|
||||
packages/docsify-server-renderer/build.js
|
||||
node_modules
|
||||
node_modules
|
||||
build
|
||||
server.js
|
||||
cypress
|
||||
lib
|
||||
@@ -1,15 +1,34 @@
|
||||
{
|
||||
"extends": [
|
||||
"vue"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 8
|
||||
},
|
||||
"env": {
|
||||
"browser": true
|
||||
"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",
|
||||
"object-curly-spacing": "off",
|
||||
"no-warning-comments": "off",
|
||||
"no-negated-condition": "off",
|
||||
"eqeqeq": "warn",
|
||||
"no-eq-null": "warn",
|
||||
"max-statements-per-line": "warn"
|
||||
},
|
||||
"globals": {
|
||||
"Docsify": true,
|
||||
"$docsify": true
|
||||
"$docsify": true,
|
||||
"process": true
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"amd": true,
|
||||
"node": true,
|
||||
"jest": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
open_collective: docsify
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
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 -->
|
||||
|
||||
## 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 -->
|
||||
@@ -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:**
|
||||
|
||||
---
|
||||
|
||||
* [ ] DO NOT include files inside `lib` directory.
|
||||
|
||||
* [ ] 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,18 @@
|
||||
# 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
|
||||
# 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,33 @@
|
||||
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: linting
|
||||
run: npm run lint
|
||||
- name: end to end
|
||||
run: npm run test:e2e
|
||||
@@ -1,5 +1,11 @@
|
||||
*.log
|
||||
.DS_Store
|
||||
/themes/
|
||||
.idea
|
||||
node_modules
|
||||
/lib/
|
||||
themes/
|
||||
lib/
|
||||
cypress/integration/examples
|
||||
cypress/fixtures/docs
|
||||
|
||||
# exceptions
|
||||
!.gitkeep
|
||||
@@ -1,3 +1,23 @@
|
||||
sudo: false
|
||||
language: node_js
|
||||
node_js: stable
|
||||
node_js:
|
||||
- '10'
|
||||
- '8'
|
||||
- '12'
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
before_install:
|
||||
- npm update
|
||||
install:
|
||||
- npm install
|
||||
script:
|
||||
- npm run build
|
||||
- npm run test:e2e
|
||||
script:
|
||||
- npm run lint
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"prettier.eslintIntegration": true
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
# Contribute
|
||||
|
||||
## Introduction
|
||||
|
||||
First, thank you for considering contributing to docsify! It's people like you that make the open source community such a great community! 😊
|
||||
|
||||
We welcome any type of contribution, not only code. You can help with
|
||||
- **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
|
||||
- **Marketing**: writing blog posts, howto's, printing stickers, ...
|
||||
- **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
|
||||
- **Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them.
|
||||
- **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/docsify).
|
||||
|
||||
## Your First Contribution
|
||||
|
||||
Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
|
||||
|
||||
## Submitting code
|
||||
|
||||
Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests.
|
||||
|
||||
## Code review process
|
||||
|
||||
The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge.
|
||||
It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?
|
||||
|
||||
## Financial contributions
|
||||
|
||||
We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/docsify).
|
||||
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
|
||||
|
||||
## Questions
|
||||
|
||||
If you have any questions, create an [issue](issue) (protip: do a quick search first to see if someone else didn't ask the same question before!).
|
||||
You can also reach us at hello@docsify.opencollective.com.
|
||||
|
||||
## Credits
|
||||
|
||||
### Contributors
|
||||
|
||||
Thank you to all the people who have already contributed to docsify!
|
||||
<a href="graphs/contributors"><img src="https://opencollective.com/docsify/contributors.svg?width=890" /></a>
|
||||
|
||||
|
||||
### Backers
|
||||
|
||||
Thank you to all our backers! [[Become a backer](https://opencollective.com/docsify#backer)]
|
||||
|
||||
<a href="https://opencollective.com/docsify#backers" target="_blank"><img src="https://opencollective.com/docsify/backers.svg?width=890"></a>
|
||||
|
||||
|
||||
### Sponsors
|
||||
|
||||
Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/docsify#sponsor))
|
||||
|
||||
<a href="https://opencollective.com/docsify/sponsor/0/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/docsify/sponsor/1/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/docsify/sponsor/2/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/docsify/sponsor/3/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/docsify/sponsor/4/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/docsify/sponsor/5/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/docsify/sponsor/6/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/docsify/sponsor/7/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/docsify/sponsor/8/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/docsify/sponsor/9/website" target="_blank"><img src="https://opencollective.com/docsify/sponsor/9/avatar.svg"></a>
|
||||
|
||||
<!-- This `CONTRIBUTING.md` is based on @nayafia's template https://github.com/nayafia/contributing-template -->
|
||||
@@ -9,45 +9,53 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/QingWei-Li/docsify"><img alt="Travis Status" src="https://img.shields.io/travis/QingWei-Li/docsify/master.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"><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="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://discord.gg/Yu2vxQ5"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg?style=flat-square" alt="Chat"></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>
|
||||
</p>
|
||||
|
||||
<p align="center">Glod 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>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://opencollective.com/docsify/tiers/gold-sponsor/website">
|
||||
<img src="https://opencollective.com/docsify/tiers/gold-sponsor.svg?avatarHeight=36">
|
||||
</a>
|
||||
<a href="https://opencollective.com/docsify/order/3254">
|
||||
<img src="https://opencollective.com/docsify/tiers/gold-sponsor.svg?avatarHeight=36">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## Links
|
||||
|
||||
* [Documentation](https://docsify.js.org)
|
||||
* [CLI](https://github.com/QingWei-Li/docsify-cli)
|
||||
* CDN: [UNPKG](https://unpkg.com/docsify/) | [jsDelivr](https://cdn.jsdelivr.net/npm/docsify/) | [cdnjs](https://cdnjs.com/libraries/docsify)
|
||||
* [Awesome docsify](https://github.com/QingWei-Li/awesome-docsify)
|
||||
- [`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)
|
||||
- [Awesome docsify](https://github.com/docsifyjs/awesome-docsify)
|
||||
- [Community chat](https://gitter.im/docsifyjs/Lobby)
|
||||
|
||||
## Features
|
||||
|
||||
* No statically built html files
|
||||
* Simple and lightweight (~18kB gzipped)
|
||||
* Smart full-text search plugin
|
||||
* Multiple themes
|
||||
* Useful plugin API
|
||||
* Compatible with IE10+
|
||||
* Support SSR ([example](https://github.com/QingWei-Li/docsify-ssr-demo))
|
||||
- No statically built html files
|
||||
- Simple and lightweight (~21kB gzipped)
|
||||
- Smart full-text search plugin
|
||||
- Multiple themes
|
||||
- Useful plugin API
|
||||
- Compatible with IE11
|
||||
- Support SSR ([example](https://github.com/docsifyjs/docsify-ssr-demo))
|
||||
- Support embedded files
|
||||
|
||||
## Quick start
|
||||
|
||||
Look at [this tutorial](https://docsify.js.org/#/quickstart) or [online demo](https://jsfiddle.net/7ztb8qsr/1/).
|
||||
Look at [this tutorial](https://docsify.js.org/#/quickstart)
|
||||
|
||||
[](https://codesandbox.io/s/307qqv236)
|
||||
|
||||
## Showcase
|
||||
|
||||
These projects are using docsify to generate their sites. Pull requests welcome :blush:
|
||||
|
||||
Move to [awesome-docsify](https://github.com/QingWei-Li/awesome-docsify)
|
||||
Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify#showcase)
|
||||
|
||||
## Similar projects
|
||||
|
||||
@@ -58,17 +66,16 @@ Move to [awesome-docsify](https://github.com/QingWei-Li/awesome-docsify)
|
||||
|
||||
## Contributing
|
||||
|
||||
* Fork it!
|
||||
* Create your feature branch: `git checkout -b my-new-feature`
|
||||
* Commit your changes: `git commit -am 'Add some feature'`
|
||||
* Push to the branch: `git push origin my-new-feature`
|
||||
* Submit a pull request
|
||||
- Fork it!
|
||||
- Create your feature branch: `git checkout -b my-new-feature`
|
||||
- Commit your changes: `git commit -am 'Add some feature'`
|
||||
- Push to the branch: `git push origin my-new-feature`
|
||||
- Submit a pull request
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
npm run bootstrap && npm run dev
|
||||
open http://localhost:3000
|
||||
```
|
||||
|
||||
## Backers
|
||||
@@ -92,8 +99,13 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
|
||||
<a href="https://opencollective.com/docsify/silver-sponsors/8/website" target="_blank"><img src="https://opencollective.com/docsify/silver-sponsors/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/docsify/silver-sponsors/9/website" target="_blank"><img src="https://opencollective.com/docsify/silver-sponsors/9/avatar.svg"></a>
|
||||
|
||||
## Contributors
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
||||
<a href="https://github.com/docsifyjs/docsify/graphs/contributors"><img src="https://opencollective.com/docsify/contributors.svg?width=890" /></a>
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
[MIT](LICENSE)
|
||||
|
||||
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2FQingWei-Li%2Fdocsify?ref=badge_large)
|
||||
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fdocsifyjs%2Fdocsify?ref=badge_large)
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
var serveStatic = require('serve-static')
|
||||
var http = require('http')
|
||||
var fs = require('fs')
|
||||
var Renderer = require('./packages/docsify-server-renderer/build.js')
|
||||
|
||||
var renderer = new Renderer({
|
||||
template: `
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>docsify</title>
|
||||
<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="/themes/vue.css" title="vue">
|
||||
</head>
|
||||
<body>
|
||||
<!--inject-app-->
|
||||
<!--inject-config-->
|
||||
<script src="/lib/docsify.js"></script>
|
||||
</body>
|
||||
</html>`,
|
||||
config: {
|
||||
name: 'docsify',
|
||||
repo: 'qingwei-li/docsify',
|
||||
basePath: 'https://docsify.js.org/',
|
||||
loadNavbar: true,
|
||||
loadSidebar: true,
|
||||
subMaxLevel: 3,
|
||||
auto2top: true,
|
||||
alias: {
|
||||
'/de-de/changelog': '/changelog',
|
||||
'/zh-cn/changelog': '/changelog',
|
||||
'/changelog':
|
||||
'https://raw.githubusercontent.com/QingWei-Li/docsify/master/CHANGELOG'
|
||||
}
|
||||
},
|
||||
path: './'
|
||||
})
|
||||
|
||||
http
|
||||
.createServer(function (req, res) {
|
||||
serveStatic('.')(req, res, function () {
|
||||
// TEST SSR
|
||||
// renderer.renderToString(req.url)
|
||||
// .then(html => res.end(html))
|
||||
|
||||
res.writeHead(404, { 'Content-Type': 'text/html' })
|
||||
res.end(fs.readFileSync('dev.html'))
|
||||
})
|
||||
})
|
||||
.listen(3000, '0.0.0.0')
|
||||
|
||||
console.log(`\nListening at http://0.0.0.0:3000\n`)
|
||||
@@ -1,50 +0,0 @@
|
||||
var fs = require('fs')
|
||||
var cssnano = require('cssnano').process
|
||||
var resolve = require('path').resolve
|
||||
var postcss = require('postcss')
|
||||
var isProd = process.argv[process.argv.length - 1] !== '--dev'
|
||||
|
||||
var processor = postcss([
|
||||
require('postcss-salad')({
|
||||
features: {
|
||||
precss: {
|
||||
properties: {
|
||||
preserve: true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
])
|
||||
|
||||
var saveMin = function (file, content) {
|
||||
fs.writeFileSync(resolve(__dirname, '../lib/themes/', file), content)
|
||||
}
|
||||
var save = function (file, content) {
|
||||
fs.writeFileSync(resolve(__dirname, '../themes/', file), content)
|
||||
}
|
||||
var load = function (file) {
|
||||
return fs.readFileSync(resolve(__dirname, '../src/themes/', file)).toString()
|
||||
}
|
||||
var loadLib = function (file) {
|
||||
return fs.readFileSync(resolve(__dirname, '../themes/', file)).toString()
|
||||
}
|
||||
|
||||
var list = fs.readdirSync(resolve(__dirname, '../src/themes'))
|
||||
|
||||
list.forEach(function (file) {
|
||||
if (!/\.css$/.test(file)) return
|
||||
processor
|
||||
.process(load(file), { from: resolve(__dirname, '../src/themes/', file) })
|
||||
.then(function (result) {
|
||||
save(file, result.css)
|
||||
console.log('salad - ' + file)
|
||||
isProd &&
|
||||
cssnano(loadLib(file)).then(function (result) {
|
||||
saveMin(file, result.css)
|
||||
console.log('cssnao - ' + file)
|
||||
})
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.log(err)
|
||||
})
|
||||
})
|
||||
@@ -1,75 +1,119 @@
|
||||
var rollup = require('rollup')
|
||||
var buble = require('rollup-plugin-buble')
|
||||
var commonjs = require('rollup-plugin-commonjs')
|
||||
var nodeResolve = require('rollup-plugin-node-resolve')
|
||||
var string = require('rollup-plugin-string')
|
||||
var uglify = require('rollup-plugin-uglify')
|
||||
var replace = require('rollup-plugin-replace')
|
||||
var isProd = process.argv[process.argv.length - 1] !== '--dev'
|
||||
var version = process.env.VERSION || require('../package.json').version
|
||||
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 replace = require('rollup-plugin-replace')
|
||||
const isProd = process.env.NODE_ENV === 'production'
|
||||
const version = process.env.VERSION || require('../package.json').version
|
||||
const chokidar = require('chokidar')
|
||||
const path = require('path')
|
||||
|
||||
var build = function (opts) {
|
||||
const build = function (opts) {
|
||||
rollup
|
||||
.rollup({
|
||||
entry: 'src/' + opts.entry,
|
||||
input: opts.input,
|
||||
plugins: (opts.plugins || []).concat([
|
||||
string({ include: '**/*.css' }),
|
||||
buble(),
|
||||
commonjs(),
|
||||
nodeResolve(),
|
||||
replace({
|
||||
__VERSION__: version
|
||||
__VERSION__: version,
|
||||
'process.env.SSR': false
|
||||
})
|
||||
])
|
||||
})
|
||||
.then(function (bundle) {
|
||||
var dest = 'lib/' + (opts.output || opts.entry)
|
||||
var dest = 'lib/' + (opts.output || opts.input)
|
||||
|
||||
console.log(dest)
|
||||
bundle.write({
|
||||
format: 'iife',
|
||||
dest: dest
|
||||
file: dest,
|
||||
strict: false
|
||||
})
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.error(err)
|
||||
})
|
||||
}
|
||||
|
||||
build({
|
||||
entry: 'core/index.js',
|
||||
output: 'docsify.js'
|
||||
})
|
||||
|
||||
var plugins = [
|
||||
{ name: 'search', entry: 'search/index.js' },
|
||||
{ name: 'ga', entry: 'ga.js' },
|
||||
{ name: 'emoji', entry: 'emoji.js' },
|
||||
{ name: 'external-script', entry: 'external-script.js' },
|
||||
{ name: 'front-matter', entry: 'front-matter/index.js' },
|
||||
{ name: 'zoom-image', entry: 'zoom-image.js' },
|
||||
{ name: 'disqus', entry: 'disqus.js' },
|
||||
{ name: 'gitalk', entry: 'gitalk.js' }
|
||||
]
|
||||
|
||||
plugins.forEach(item => {
|
||||
const buildCore = function () {
|
||||
build({
|
||||
entry: 'plugins/' + item.entry,
|
||||
output: 'plugins/' + item.name + '.js'
|
||||
input: 'src/core/index.js',
|
||||
output: 'docsify.js'
|
||||
})
|
||||
})
|
||||
|
||||
if (isProd) {
|
||||
build({
|
||||
entry: 'core/index.js',
|
||||
output: 'docsify.min.js',
|
||||
plugins: [uglify()]
|
||||
})
|
||||
plugins.forEach(item => {
|
||||
if (isProd) {
|
||||
build({
|
||||
entry: 'plugins/' + item.entry,
|
||||
output: 'plugins/' + item.name + '.min.js',
|
||||
input: 'src/core/index.js',
|
||||
output: 'docsify.min.js',
|
||||
plugins: [uglify()]
|
||||
})
|
||||
}
|
||||
}
|
||||
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'},
|
||||
{name: 'zoom-image', input: 'zoom-image.js'},
|
||||
{name: 'disqus', input: 'disqus.js'},
|
||||
{name: 'gitalk', input: 'gitalk.js'}
|
||||
]
|
||||
|
||||
plugins.forEach(item => {
|
||||
build({
|
||||
input: 'src/plugins/' + item.input,
|
||||
output: 'plugins/' + item.name + '.js'
|
||||
})
|
||||
})
|
||||
|
||||
if (isProd) {
|
||||
plugins.forEach(item => {
|
||||
build({
|
||||
input: 'src/plugins/' + item.input,
|
||||
output: 'plugins/' + item.name + '.min.js',
|
||||
plugins: [uglify()]
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (!isProd) {
|
||||
chokidar
|
||||
.watch(['src/core', 'src/plugins'], {
|
||||
atomic: true,
|
||||
awaitWriteFinish: {
|
||||
stabilityThreshold: 1000,
|
||||
pollInterval: 100
|
||||
}
|
||||
})
|
||||
.on('change', p => {
|
||||
console.log('[watch] ', p)
|
||||
const dirs = p.split(path.sep)
|
||||
if (dirs[1] === 'core') {
|
||||
buildCore()
|
||||
} else if (dirs[2]) {
|
||||
const name = path.basename(dirs[2], '.js')
|
||||
const input = `src/plugins/${name}${
|
||||
/\.js/.test(dirs[2]) ? '' : '/index'
|
||||
}.js`
|
||||
|
||||
build({
|
||||
input,
|
||||
output: 'plugins/' + name + '.js'
|
||||
})
|
||||
}
|
||||
})
|
||||
.on('ready', () => {
|
||||
console.log('[start]')
|
||||
buildCore()
|
||||
buildAllPlugin()
|
||||
})
|
||||
} else {
|
||||
buildCore()
|
||||
buildAllPlugin()
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
const cssnano = require('cssnano').process
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
|
||||
files = fs.readdirSync(path.resolve('lib/themes'))
|
||||
|
||||
files.forEach(file => {
|
||||
file = path.resolve('lib/themes', file)
|
||||
cssnano(fs.readFileSync(file)).then(result => {
|
||||
fs.writeFileSync(file, result.css)
|
||||
})
|
||||
})
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -5,11 +5,12 @@ var replace = require('rollup-plugin-replace')
|
||||
|
||||
rollup
|
||||
.rollup({
|
||||
entry: 'packages/docsify-server-renderer/index.js',
|
||||
input: 'packages/docsify-server-renderer/index.js',
|
||||
plugins: [
|
||||
async(),
|
||||
replace({
|
||||
__VERSION__: process.env.VERSION || require('../package.json').version
|
||||
__VERSION__: process.env.VERSION || require('../package.json').version,
|
||||
'process.env.SSR': true
|
||||
}),
|
||||
buble({
|
||||
transforms: {
|
||||
@@ -25,7 +26,7 @@ rollup
|
||||
console.log(dest)
|
||||
bundle.write({
|
||||
format: 'cjs',
|
||||
dest: dest
|
||||
file: dest
|
||||
})
|
||||
})
|
||||
.catch(function (err) {
|
||||
@@ -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',
|
||||
'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',
|
||||
'image-resizing',
|
||||
'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: 85 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 62 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: 64 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 124 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 91 KiB |