Compare commits

...
Author SHA1 Message Date
Anix 86df3bb32d chore: add changelog 4.11.0 2020-03-09 17:12:15 +05:30
Anix ec0409969e [build] 4.11.0 2020-03-09 17:11:29 +05:30
snyk-botandAnix 9981c4361a fix: upgrade prismjs from 1.17.1 to 1.19.0
Snyk has created this PR to upgrade prismjs from 1.17.1 to 1.19.0.

See this package in NPM:
https://www.npmjs.com/package/prismjs

See this project in Snyk:
https://app.snyk.io/org/anikethsaha/project/836f877b-b98e-47ed-89fc-554e9b2e146d?utm_source=github&utm_medium=upgrade-pr
2020-03-09 14:30:21 +05:30
snyk-botandAnix 39ebd73021 fix: upgrade medium-zoom from 1.0.4 to 1.0.5
Snyk has created this PR to upgrade medium-zoom from 1.0.4 to 1.0.5.

See this package in NPM:
https://www.npmjs.com/package/medium-zoom

See this project in Snyk:
https://app.snyk.io/org/anikethsaha/project/836f877b-b98e-47ed-89fc-554e9b2e146d?utm_source=github&utm_medium=upgrade-pr
2020-03-09 14:29:10 +05:30
Snyk botandGitHub 78290b2103 fix: upgrade docsify from 4.9.4 to 4.10.2 (#1054)
Snyk has created this PR to upgrade docsify from 4.9.4 to 4.10.2.

See this package in NPM:
https://www.npmjs.com/package/docsify

See this project in Snyk:
https://app.snyk.io/org/anikethsaha/project/6efe7e04-4e52-497e-8ad5-570733cc577a?utm_source=github&utm_medium=upgrade-pr
2020-03-09 14:27:40 +05:30
KidandGitHub 5d541dd7d4 improve basic layout style (#884)
* improve basic layout style

* add missing modification
2020-03-09 14:26:05 +05:30
Máté SolymosiandGitHub 0f1749cb66 chore(scroll): smarter scroll behavior (#744)
authored-by: Mate Solymosi <mate.solymosi.ext@siemens.com>
2020-03-09 14:23:08 +05:30
Martin MihálekandGitHub 291c99bc38 Migrate relative links to absolute in embedded markdown (#867)
Signed-off-by: Martin Mihálek <aenniw@gmail.com>
2020-03-09 14:21:46 +05:30
Leonardo RossiandGitHub b53ea1e304 Adds option to specify an header height (#1045)
* Adds option to specify an header height

When using a template that has a sticky-header, clicking on the sidebar will
scroll the page under the header.

I added the option `headerHeight` (default = `0`) so that the content div will
be scrolled down that amount of pixels.

* updates documentation and renames variable
2020-03-09 14:19:31 +05:30
AnixandGitHub 562cd7cb3a chore(CI): deleting snyk action as github doesnt allow tokens to forks
Migrating to snyk webhooks
2020-03-05 01:16:06 +05:30
anikethsaha dc43d3c512 feat: added dark mode to docs closes #1031 2020-02-23 12:34:15 +05:30
AnixandGitHub c83b7e3c94 chore(CI): added snyk action (#1030) 2020-02-23 01:36:58 +05:30
AnixandGitHub b7547f151e feat: new option hideSidebar (#1026)
* feat: new option hideSidebar

* chore: removed the console logs

* chore: linting fixes

* chore: test fix
2020-02-20 22:19:31 +05:30
AnixandGitHub 75c72e917b chore: added new linter config (#1028)
* chore: added new linter config

* chore: linting fixes

* chore: refactore in linting config and minor linting fixes
2020-02-20 14:01:04 +05:30
AnixandGitHub a111df9980 chore: documented __colon__ tip (#1025) 2020-02-14 20:41:53 +05:30
AnixandGitHub 2639be7773 chore(readme): added CI badges and fixed the logo issue 2020-02-14 16:00:41 +05:30
AnixandGitHub 5f7464af48 chore: migrate CI to github, refactore CI and npm scripts, linting fixes (#1023) 2020-02-14 15:22:53 +05:30
KoyandGitHub b3d9b966df fix: emojis in titles not working correctly and update (#1016)
the doc(add a note)
2020-02-14 12:51:07 +05:30
Ben LiuandGitHub 0e4cdad73e fix config initialization and coercion (#861)
* fix: document.currentScript reference

* fix: merge config
2020-02-14 02:03:53 +05:30
orama254andGitHub d798a12715 changed the CDN from unpkg to jsDelivr #1020 (#1022)
* changed the CDN from unpkg to jsDelivr #1020

* tweaks after code review of PR #1022 for issue #1020
2020-02-12 17:10:23 +05:30
zhangjandGitHub 6e9911c1df update: .markdown-section max-width 800px to 80% (#1017)
* update max-width 800px to 95%

* update to 80%
2020-02-12 17:09:54 +05:30
AnixandGitHub 92c29acb84 chore(docs) : removed FOSSA badge 2020-02-09 18:54:11 +05:30
Carsten DaurehøjandGitHub 724ac024dd feat: added capability to add css class and id to images + links + refactoring (#820)
* method extraction

* support for CSS class and id

* Update package.json

* Added tests for refactored render-methods

* minor refactoring
2020-02-08 21:54:18 +05:30
LuffyandGitHub 6184e50262 fix: searching table content 2020-02-07 23:39:46 +05:30
Atsushi TanakaandGitHub 90a35ab952 Fix #895 (#896)
* Don't replace leading digit

* Install css.escape

* Escape leading digit of the anchor id
2020-02-05 22:23:05 +05:30
cyrilfandGitHub 2928eb7e55 Ensure autoHeader dom result is similar to parsed H1 (#811) 2020-02-04 22:34:44 +05:30
AnixandGitHub b83622e41a chore(stale): added bug label to exemptlabels 2020-02-04 13:21:08 +05:30
AnixandGitHub fc6e3ee9b2 chore(stale): added enhancement label to exemptlabels 2020-02-04 13:19:44 +05:30
cinwell.liandGitHub 74ee01cb32 chore: add config (#1014)
* chore: add stale bot config

@anikethsaha

* chore: add `On hold` label to stale bot
2020-02-03 13:38:36 +05:30
Moritz SchrammandAnix 4419611238 Add undefined check for postcontent in search plugin 2020-02-03 12:44:51 +05:30
AnixandGitHub 0e54ea1177 [Test] : e2e tests using cypress (#999)
* chore: added cypresss

* chore: added sidebar tests

* chore: script update

* chore: removed cypress examples

* chore: added lib to eslintignore

* chore: script fixes

* chore: updated the snapshot
2020-01-30 17:44:13 +05:30
AnixandGitHub a213f98cb0 chore(GH-action): using ubuntu 16 and removed node 8 from CI 2020-01-30 16:41:39 +05:30
Joe PeaandGitHub 07f6edc9ca Merge pull request #1010 from docsifyjs/prepare-script
feat: Add a prepare script.
2020-01-27 23:18:37 -08:00
Joe PeaandGitHub e566e9c6e7 Merge branch 'develop' into prepare-script 2020-01-27 23:18:22 -08:00
Joe Pea efbea24de7 feat: Add a prepare script.
This makes it possible to depend on the docsify package using a git commit hash instead of a version number in package.json, and causes the `lib` folder to be built in those cases, otherwise consumers will try to import from a folder that doesn't exist.
2020-01-24 20:02:10 -08:00
AnixandGitHub 4f486798df Merge pull request #996 from Fs02/strip-indent-when-embedding-code
strip indent when embedding code fragment
2020-01-11 22:07:27 +05:30
AnixandGitHub b3eced395a Merge pull request #1000 from docsifyjs/github-action-ci
chore: added github Actions for CI
2020-01-09 01:00:56 +05:30
AnixandGitHub 336908f721 chore: CI workflow fixes 2020-01-09 00:58:27 +05:30
AnixandGitHub 45d0c3af80 chore: added github Actions for CI 2020-01-09 00:54:39 +05:30
Muhammad Surya 7fb50b95f1 strip indent when embedding code fragment 2020-01-05 11:28:38 +07:00
Giulio AmbrogiandAnix db97a1d22a Eslint fixes for v4x (#989)
* UPDATE .eslintrc

* UPDATE lint task

* FIX lint errors

* CLEANUP

* FIX no-eq-null warning

* FIX many jsdoc warnings

* FIX jsdoc issues

* FIX jsdoc warnings

* FIX jsdoc

* FIX eqeq and no-eq-null

* ADD lint to travis

* UPDATE test env for eslint
2019-12-30 22:01:46 +05:30
AnixandGitHub 157973c509 Merge pull request #992 from docsifyjs/update-name-doc
docs: update docs for the `name` option
2019-12-30 12:52:13 +05:30
Joe PeaandGitHub 67a981b8d9 update docs for the name config option 2019-12-29 12:28:26 -08:00
AnixandGitHub d60fb7da7b Merge pull request #991 from anikethsaha/develop
chore: removed the escaping of the name of sidebar
2019-12-28 22:12:16 +05:30
anikethsaha 7d0c164bf5 chore: removed the escaping of the name of sidebar 2019-12-28 22:08:36 +05:30
James GeorgeandAnix 5b77b0f628 fix: stage modified files as part of pre-commit hook (#985) 2019-12-22 17:18:28 +05:30
cinwell.liandAnix 8416275e25 docs: about cache (#854) 2019-12-22 17:16:23 +05:30
Rodrigo AsensioandAnix 808123bc30 Added a redirect for images to show up in Amplify (#918)
Without the redirect images are not displaying in Amplify after deploying. Once added the redirect all PNGs showed up.
2019-12-20 17:42:53 +05:30
Thai PangsakulyanontandAnix daf54b9d36 There are currently {three=>four} themes available. (#892)
* There are currently {three=>four} themes available.

* Remove number
2019-12-20 17:42:39 +05:30
James GeorgeandAnix eea41a1207 feat(chore): configure pre-commit hook (#983)
* chore: add husky as a devDep

* chore: add lint-staged as a devDep

* configure: pre-commit hook for staged files

* fix: minor tweak

* chore: update glob
2019-12-19 14:08:21 +05:30
anikethsaha 3cd03d480d chore: add changelog 4.10.2 2019-12-17 03:20:41 +05:30
anikethsaha 9a90b9b927 [build] 4.10.2 2019-12-17 03:19:55 +05:30
AnixandGitHub 75919f1235 Merge pull request #979 from docsifyjs/opencollective-fix
fix: changed the opencollective cli to light
2019-12-17 03:05:08 +05:30
anikethsaha b0b3de0a66 chore: changed the opencollective cli to light 2019-12-17 02:48:47 +05:30
anikethsaha 589a5732d3 chore: add changelog 4.10.0 2019-12-16 23:00:23 +05:30
anikethsaha b62b213435 [build] 4.10.0 2019-12-16 22:58:51 +05:30
AnixandGitHub a59328719b Merge pull request #977 from docsifyjs/prerelease
Prerelease changes
2019-12-16 22:39:16 +05:30
anikethsaha 4a8f2c5bfa chore: fixed the npm script and added css build file 2019-12-16 22:32:32 +05:30
AnixandGitHub 79f8211a45 Merge pull request #965 from docsifyjs/develop
Develop -> Master : tracking changes PR
2019-12-16 19:29:09 +05:30
AnixandGitHub 68327c5c9a Merge branch 'master' into develop 2019-12-12 20:32:28 +05:30
AnixandGitHub 1622578045 Merge pull request #974 from Koooooo-7/develop
[fix]#972 when 'logo' is set, 'name' is not set correctly inside the 'alt' as same as without 'logo' set.
2019-12-11 13:54:31 +05:30
koooooo-7 c403318ac6 [fix] when 'logo' is set, 'name' is not set correctly inside the 'alt' field. 2019-12-07 21:55:42 +08:00
AnixandGitHub 8bf4b06d3a Merge pull request #952 from xmedeko/buble-patch-2
buble theme: fix strong font-weight increased to 600 (onto master branch)
2019-12-03 20:18:21 +05:30
AnixandGitHub 378d7bb492 Merge pull request #917 from vkallore/develop
Fix #914
2019-12-02 18:39:32 +05:30
Vaishak Kallore 11762cbb73 Merged upstream develop and resolved the conflict 2019-12-02 18:04:59 +05:30
AnixandGitHub 8f496d84ce Merge pull request #969 from PicchiKevin/fix-markdown-bracket
Fix: #967 token position markdown
2019-12-02 16:43:33 +05:30
AnixandGitHub 98525c4a2d Merge pull request #842 from Koooooo-7/develop
fix #835 :Link target of repo's GitHub Corner add new independent config `cornerExternalLinkTarget`.
2019-12-02 16:35:29 +05:30
Mt e61410a757 add new config cornerExternalLinkTarget for the corner link target
rm   CNAME

add CNAME

add repo test

back to the origin index.html

fix: the Git corner displayed bigger when the externalLinkTarget = ''

[update] a new independent config for corner link target attribute.

[update doc] add the `cornerExternalLinkTarget` config in the doc.
2019-12-02 18:10:42 +08:00
Kevin Picchi 745e5ffa54 Fix #967 token position markdown 2019-12-02 09:47:17 +00:00
AnixandGitHub 8d5787eabe Merge pull request #960 from PicchiKevin/improve-accessibility
fix #945 - Improve accessibility
2019-12-02 14:40:05 +05:30
AnixandGitHub dd9e5f98e0 Merge pull request #870 from gaurav-nelson/patch-1
Fix #753
2019-12-02 12:45:57 +05:30
Kevin Picchi 229a63c2e8 Add :focus styling 2019-11-29 11:25:26 +00:00
AnixandGitHub 5b575441e9 Merge pull request #956 from docsifyjs/fix-sponsor-button
Fixed FUNDING.yml
2019-11-23 21:36:34 +05:30
AnixandGitHub 0bd4f05034 Update FUNDING.yml 2019-11-23 21:33:54 +05:30
AnixandGitHub cc3f30b582 Merge pull request #954 from docsifyjs/sponser-button
chore: added sponsor button
2019-11-23 21:30:16 +05:30
AnixandGitHub 64e460aaed Merge pull request #953 from docsifyjs/revert-950-master-npm-audit-fixes
Revert "[master branch ] fix: package security alerts"
2019-11-23 21:29:32 +05:30
AnixandGitHub 52fcc6f081 chore: added sponsor button 2019-11-23 13:21:24 +05:30
AnixandGitHub 3f53b7166e Revert "[master branch ] fix: package security alerts" 2019-11-23 02:46:45 +05:30
Felix AngelovandGitHub d9ec246508 improve emoji support (#930) 2019-11-22 13:09:51 -06:00
Ondrej Medek 7b871006e6 buble theme: fix strong font-weight increased to 600 2019-11-22 08:05:24 +01:00
AnixandGitHub 5a6289d504 Merge pull request #950 from anikethsaha/master-npm-audit-fixes
fix: package security alerts
2019-11-22 02:54:37 +05:30
anikethsaha a62b037bec fix: fixed security alert for chokidar(update dep) 2019-11-22 02:24:30 +05:30
anikethsaha d7d5c8f302 fix: security alerts of cssnano 2019-11-22 01:43:27 +05:30
anikethsaha f5f15619f1 fix: package security alerts 2019-11-22 01:17:18 +05:30
AnixandGitHub 236c9a29b4 Merge pull request #948 from styfle/patch-2
[Develop] : Add deployment instructions for ZEIT Now
2019-11-22 00:08:21 +05:30
AnixandGitHub b95f8d2884 Merge pull request #931 from styfle/patch-1
Add deployment instructions for ZEIT Now
2019-11-21 20:00:08 +05:30
StevenandGitHub 79a54b462b Add deployment instructions for ZEIT Now 2019-11-21 09:27:50 -05:00
StevenandGitHub 6b8773fbb0 Move instructions up 2019-11-21 09:13:36 -05:00
AnixandGitHub 8ea7e32e14 Merge pull request #943 from rizdaprasetya/patch-1
fix netlify-redirects-file typo on docs and improve wording
2019-11-21 19:12:05 +05:30
Kevin Picchi 83f9b01852 Form elements must have labels 2019-11-12 16:55:32 +00:00
Kevin Picchi 8454889f63 Buttons must have discernible text 2019-11-12 16:55:00 +00:00
Rizda Dwi PrasetyaandGitHub 77c3fc8bcd fix and improve netlify redirects file typo 2019-11-11 16:12:04 +07:00
Andrey ChalkinandFelix Angelov 615205cfdb fix: npm audit issues (#934) 2019-10-16 09:20:54 -04:00
StevenandGitHub c6fde53f91 Add deployment instructions for ZEIT Now 2019-10-04 11:44:49 -04:00
Vaishak Kallore 4769018e26 Added support for rel='noopener' 2019-09-06 11:13:40 +05:30
Gaurav NelsonandGitHub 84384eeab3 Fixes documentation for page routes
Fixes #753
2019-06-19 13:34:26 +10:00
James HegedusandGitHub 1d3246a26f Fix typo in docs #869
Fix typo
2019-06-18 09:02:10 +10:00
Parkjunwoo 8ea4865c84 Fix typo 2019-06-18 00:30:43 +09:00
Mt 12d80f64c9 fix:Link target of repo's GitHub Corner according to externalLinkTarget config. #835 2019-05-10 10:26:01 +08:00
Anton WilhelmandAnton Wilhelm 2fb5a1128e chore: add changelog 4.9.4 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm c78f2117e3 [build] 4.9.4 next 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm e8dc5229de Do not commit any files in lib during release 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm 7a838d1b24 Cleanup gitignore 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm f8f46108dd Add matomo plugin to build script 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm 669f243a7a Remove lib files from version control 2019-05-05 18:50:31 +02:00
Rodrigo Bermudez SchettinoandAnton Wilhelm 11bbd4cd27 Readme: Improve outdated links to showcase
Link to Showcase in awesome-docsify.
2019-05-05 18:50:31 +02:00
Gorgi KosevandAnton Wilhelm 76825a7b55 add scoring and sort to search plugin 2019-05-05 18:50:31 +02:00
Alexandru CamboseandAnton Wilhelm 72763398c3 Updated to remove all headers under it 2019-05-05 18:50:31 +02:00
Alexandru CamboseandAnton Wilhelm fd4a42c3b5 Added filtering in sidebar for ignoreSubHeading 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm 25e3cac66a chore: add changelog 4.9.2 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm 6162eb234d [build] 4.9.2 next 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm cb3f4865e2 Keep themes directory which is required for npm run dev 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm 80d5ac061f add execute access to release.sh 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm 0515b4d925 Add link to develop branch preview on netlify 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm b95c254f81 Remove lib directory from version control 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm 5a75bf6cb6 provide plugin for matomo 2019-05-05 18:50:31 +02:00
Anton WilhelmandAnton Wilhelm 2671d189fb align dev index.html to production 2019-05-05 18:50:31 +02:00
Anton Wilhelm 6e6b4e1b66 Minor update of bug template 2019-05-05 18:50:31 +02:00
Anton Wilhelm 676f84cffa chore: add changelog 4.9.4 2019-05-05 18:41:18 +02:00
Anton Wilhelm 7bdcadc7d7 [build] 4.9.4 next 2019-05-05 18:41:17 +02:00
Anton Wilhelm 5bd24fb83c Do not commit any files in lib during release 2019-05-05 18:35:34 +02:00
Anton Wilhelm 76cc0f672b Cleanup gitignore 2019-05-05 18:12:20 +02:00
Anton Wilhelm 3f50381090 Add matomo plugin to build script 2019-05-05 18:12:13 +02:00
Anton Wilhelm b847c20cab Remove lib files from version control 2019-05-05 13:29:56 +02:00
James HegedusandGitHub ce829b24d6 Merge pull request #827 from rodrigobdz/link-showcase
Fix #826: Link directly to showcase in readme and website
2019-04-26 17:01:22 +10:00
Rodrigo Bermudez Schettino 1ce53cf9ec Readme: Improve outdated links to showcase
Link to Showcase in awesome-docsify.
2019-04-26 11:25:17 +08:00
Gorgi KosevandAnton Wilhelm bc1d8e4bda add scoring and sort to search plugin 2019-04-23 16:29:30 +02:00
Alexandru CamboseandAnton Wilhelm 78f5564a30 Updated to remove all headers under it 2019-04-23 07:08:29 +02:00
Alexandru CamboseandAnton Wilhelm 6cc069cb9f Added filtering in sidebar for ignoreSubHeading 2019-04-23 07:08:29 +02:00
Anton Wilhelm d355272461 chore: add changelog 4.9.2 2019-04-21 12:06:17 +02:00
Anton Wilhelm af161cd3b4 [build] 4.9.2 next 2019-04-21 12:06:16 +02:00
Anton Wilhelm 5bcb016bee Keep themes directory which is required for npm run dev 2019-04-21 12:05:41 +02:00
Anton Wilhelm b38c2065e0 add execute access to release.sh 2019-04-21 12:01:04 +02:00
Anton Wilhelm e5bab8d967 Add link to develop branch preview on netlify 2019-04-21 11:58:07 +02:00
Anton Wilhelm da3e2d7b18 Remove lib directory from version control 2019-04-21 11:53:30 +02:00
Anton Wilhelm b93a667f24 provide plugin for matomo 2019-04-21 11:17:14 +02:00
Anton WilhelmandAnton Wilhelm e8d850c9ba align dev index.html to production 2019-04-14 21:03:34 +02:00
Anton WilhelmandGitHub 514a027991 Minor update of bug template 2019-04-14 21:01:24 +02:00
Anton WilhelmandGitHub 314e2d9d39 Align IE support from root README.md 2019-04-14 11:27:03 +02:00
Anton Wilhelm a86de3d81a Remove IE10 from supported browsers 2019-04-13 23:37:11 +02:00
Persevere VonandAnton Wilhelm 5f960102e7 Create .gitkeep
Fix #812
2019-04-13 17:38:57 +02:00
Anton Wilhelm 0bd5c8b020 fix #812 add empty themes directory for local watch setup 2019-04-13 15:42:22 +02:00
Anton Wilhelm 044a5ec2b8 add OS to GitHub template 2019-04-13 15:41:35 +02:00
Anton Wilhelm b15eccfac0 add npm and nodejs version to template 2019-04-13 15:33:49 +02:00
Anton WilhelmandGitHub 4e0298088b Merge pull request #817 from docsifyjs/update-github-templates
Update GitHub templates
2019-04-13 15:29:11 +02:00
231 changed files with 13665 additions and 13084 deletions
+6
View File
@@ -3,3 +3,9 @@ packages/docsify-server-renderer/build.js
node_modules node_modules
build build
server.js server.js
cypress
lib
themes
build
docs/
**/*.md
-20
View File
@@ -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
}
}
+63
View File
@@ -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',
},
};
+2
View File
@@ -0,0 +1,2 @@
open_collective: docsify
+10 -9
View File
@@ -20,18 +20,19 @@ about: Create a report to help us improve
#### What is the expected 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? - [ ] Bug does still occur when all/other plugins are disabled?
<!-- Please type in your environment --> - Your OS:
Environment: - Node.js version:
- npm/yarn version:
``` - Browser version:
docsify version: - Docsify version:
docsify plugins: - Docsify plugins:
browser:
```
<!-- Love docsify? Please consider supporting our collective: <!-- Love docsify? Please consider supporting our collective:
👉 https://opencollective.com/docsify/donate --> 👉 https://opencollective.com/docsify/donate -->
+20
View File
@@ -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
+31
View File
@@ -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
+31
View File
@@ -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
+31
View File
@@ -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
+8 -4
View File
@@ -1,7 +1,11 @@
*.log *.log
.DS_Store .DS_Store
/themes/*
!.gitkeep
node_modules
/lib/
.idea .idea
node_modules
themes/
lib/
cypress/integration/examples
cypress/fixtures/docs
# exceptions
!.gitkeep
+4
View File
@@ -0,0 +1,4 @@
module.exports = {
singleQuote: true,
trailingComma: 'es5',
};
-3
View File
@@ -1,3 +0,0 @@
sudo: false
language: node_js
node_js: stable
+1 -1
View File
@@ -1,3 +1,3 @@
{ {
"prettier.eslintIntegration": true "editor.defaultFormatter": "esbenp.prettier-vscode"
} }
+59
View File
@@ -1,3 +1,62 @@
# [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))
* 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
* **chore:** 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))
## [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> <a name="4.9.1"></a>
## [4.9.1](https://github.com/docsifyjs/docsify/compare/v4.9.0...v4.9.1) (2019-02-21) ## [4.9.1](https://github.com/docsifyjs/docsify/compare/v4.9.0...v4.9.1) (2019-02-21)
+9 -7
View File
@@ -1,6 +1,6 @@
<p align="center"> <p align="center">
<a href="https://docsify.js.org"> <a href="https://docsify.js.org">
<img alt="docsify" src="./docs/_media/icon.svg"> <img alt="docsify" src="https://github.com/docsifyjs/docsify/blob/develop/docs/_media/icon.svg">
</a> </a>
</p> </p>
@@ -10,8 +10,11 @@
<p align="center"> <p align="center">
<a href="#backers"><img alt="Backers on Open Collective" src="https://opencollective.com/docsify/backers/badge.svg?style=flat-square"></a> <a href="#backers"><img alt="Backers on Open Collective" src="https://opencollective.com/docsify/backers/badge.svg?style=flat-square"></a>
<a href="#sponsors"><img alt="Sponsors on Open Collective" src="https://opencollective.com/docsify/sponsors/badge.svg?style=flat-square"></a> <a href="#sponsors">
<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> <img alt="Sponsors on Open Collective" src="https://opencollective.com/docsify/sponsors/badge.svg?style=flat-square"></a>
<a><img src="https://github.com/docsifyjs/docsify/workflows/Unit%20tests%20Suite/badge.svg?branch=develop&amp;event=push" alt="Unit tests Suite"></a>
<a><img src="https://github.com/docsifyjs/docsify/workflows/Linting%20Checks/badge.svg?branch=develop&amp;event=push" alt="Linting Checks"></a>
<a><img src="https://github.com/docsifyjs/docsify/workflows/Testing%20the%20e2e%20test%20suites/badge.svg?branch=develop&amp;event=push" alt="Testing the e2e test suites"></a>
<a href="https://www.npmjs.com/package/docsify"><img alt="npm" src="https://img.shields.io/npm/v/docsify.svg?style=flat-square"></a> <a href="https://www.npmjs.com/package/docsify"><img alt="npm" src="https://img.shields.io/npm/v/docsify.svg?style=flat-square"></a>
<a href="https://github.com/QingWei-Li/donate"><img alt="donate" src="https://img.shields.io/badge/%24-donate-ff69b4.svg?style=flat-square"></a> <a href="https://github.com/QingWei-Li/donate"><img alt="donate" src="https://img.shields.io/badge/%24-donate-ff69b4.svg?style=flat-square"></a>
<a href="https://gitter.im/docsifyjs/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link"><img alt="gitter" src="https://img.shields.io/gitter/room/docsifyjs/docsify.svg?style=flat-square"></a> <a href="https://gitter.im/docsifyjs/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link"><img alt="gitter" src="https://img.shields.io/gitter/room/docsifyjs/docsify.svg?style=flat-square"></a>
@@ -27,6 +30,7 @@
## Links ## Links
- [`develop` branch preview](https://docsifyjs.netlify.com/)
- [Documentation](https://docsify.js.org) - [Documentation](https://docsify.js.org)
- [CLI](https://github.com/docsifyjs/docsify-cli) - [CLI](https://github.com/docsifyjs/docsify-cli)
- CDN: [UNPKG](https://unpkg.com/docsify/) | [jsDelivr](https://cdn.jsdelivr.net/npm/docsify/) | [cdnjs](https://cdnjs.com/libraries/docsify) - CDN: [UNPKG](https://unpkg.com/docsify/) | [jsDelivr](https://cdn.jsdelivr.net/npm/docsify/) | [cdnjs](https://cdnjs.com/libraries/docsify)
@@ -40,7 +44,7 @@
- Smart full-text search plugin - Smart full-text search plugin
- Multiple themes - Multiple themes
- Useful plugin API - Useful plugin API
- Compatible with IE10+ - Compatible with IE11
- Support SSR ([example](https://github.com/docsifyjs/docsify-ssr-demo)) - Support SSR ([example](https://github.com/docsifyjs/docsify-ssr-demo))
- Support embedded files - Support embedded files
@@ -54,7 +58,7 @@ Look at [this tutorial](https://docsify.js.org/#/quickstart)
These projects are using docsify to generate their sites. Pull requests welcome :blush: These projects are using docsify to generate their sites. Pull requests welcome :blush:
Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify) Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify#showcase)
## Similar projects ## Similar projects
@@ -106,5 +110,3 @@ This project exists thanks to all the people who contribute. [[Contribute](CONTR
## License ## License
[MIT](LICENSE) [MIT](LICENSE)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fdocsifyjs%2Fdocsify.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fdocsifyjs%2Fdocsify?ref=badge_large)
+2 -1
View File
@@ -2,7 +2,7 @@ const rollup = require('rollup')
const buble = require('rollup-plugin-buble') const buble = require('rollup-plugin-buble')
const commonjs = require('rollup-plugin-commonjs') const commonjs = require('rollup-plugin-commonjs')
const nodeResolve = require('rollup-plugin-node-resolve') const nodeResolve = require('rollup-plugin-node-resolve')
const uglify = require('rollup-plugin-uglify') const { uglify } = require('rollup-plugin-uglify')
const replace = require('rollup-plugin-replace') const replace = require('rollup-plugin-replace')
const isProd = process.env.NODE_ENV === 'production' const isProd = process.env.NODE_ENV === 'production'
const version = process.env.VERSION || require('../package.json').version const version = process.env.VERSION || require('../package.json').version
@@ -55,6 +55,7 @@ const buildAllPlugin = function () {
var plugins = [ var plugins = [
{name: 'search', input: 'search/index.js'}, {name: 'search', input: 'search/index.js'},
{name: 'ga', input: 'ga.js'}, {name: 'ga', input: 'ga.js'},
{name: 'matomo', input: 'matomo.js'},
{name: 'emoji', input: 'emoji.js'}, {name: 'emoji', input: 'emoji.js'},
{name: 'external-script', input: 'external-script.js'}, {name: 'external-script', input: 'external-script.js'},
{name: 'front-matter', input: 'front-matter/index.js'}, {name: 'front-matter', input: 'front-matter/index.js'},
+41
View File
@@ -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
}
})
})
Regular → Executable
+3 -2
View File
@@ -12,7 +12,9 @@ echo
if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Releasing $VERSION ..." 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 # build
VERSION=$VERSION npm run build VERSION=$VERSION npm run build
@@ -29,7 +31,6 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
# commit # commit
git add -A git add -A
git add -f lib/ -A
git commit -m "[build] $VERSION $RELEASE_TAG" git commit -m "[build] $VERSION $RELEASE_TAG"
npm --no-git-tag-version version $VERSION --message "[release] $VERSION $RELEASE_TAG" npm --no-git-tag-version version $VERSION --message "[release] $VERSION $RELEASE_TAG"
+3
View File
@@ -0,0 +1,3 @@
{
"video": false
}
+123
View File
@@ -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>
+344
View File
@@ -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();
});
});
});
});
+13
View File
@@ -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)
+18
View File
@@ -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)
}
+75
View File
@@ -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()
Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Some files were not shown because too many files have changed in this diff Show More