Commit Graph

88 Commits

Author SHA1 Message Date
John Hildenbiddle
a0f61b2af7
fix: Replace ES6 usage for IE11 compatibility (#1500)
* Remove ES6 syntax for IE11 compatibility

* Replace unsupported methods (IE11)
2021-02-08 23:42:31 -06:00
John Hildenbiddle
7297ee5e10 Add label translations (ru, es) 2021-02-04 14:47:17 -06:00
John Hildenbiddle
9a73bd1ce6 Remove write-a-plugin.md alias 2021-02-04 14:46:07 -06:00
John Hildenbiddle
cf5c7431f1 Set html “lang” attribute based on URL hash
Required to trigger auto-translate feature in applicable Chromium-based browsers (Chrome & Edge)
2021-02-04 14:40:12 -06:00
John Hildenbiddle
727ee8fc6d Rename vueMountOptions to vueMounts 2020-11-11 16:24:50 -06:00
John Hildenbiddle
86dae610de Rename vueOptions to vueMountOptions 2020-10-21 13:14:07 -05:00
John Hildenbiddle
5a2dde1624 Update docs 2020-10-20 17:45:34 -05:00
John Hildenbiddle
019365969d Update docs with new Vue features and usage 2020-10-17 01:50:46 -05:00
John Hildenbiddle
b135f8417d Add Vue 3 compatibility
- Update docs
- Update tests
- Add Vue 2 to docs site
- Add Vue 2 & 3 dependencies for tests
2020-10-07 13:13:03 -05:00
John Hildenbiddle
7f0c42eda5
Jest + Playwright Testing (#1276)
* Initial Jest+Playwright setup

* Fix eslint warnings

* Add placeholder for common options

* Fix load order of scriptURLs

* Add docsifyURL and waitForSelector options

* Add executeScript scenarios

* Enable firefox and webkit tests by default

* Prevent prettier from reformatting browsers list

* Update options and add JSDoc comments

* Initial commit

* Complete initial example tests

* Minor tweaks

* Change suite name

* Rename file

* Add npm script to run jest+playwright example test

* Clean up server properties

* Isolate e2e, integration, and unit test environments

- Setup projects for e2e, integration, and unit tests in Jest configuration
- Setup /tests/e2e/ tests for Jest+PlayWright
- Setup /tests/integration/ tests for Jest
- Setup /tests/unit/ tests for Jest
- Setup eslint for Jest and Jest+Playwright environments
- Move e2e configuration files into separate folder
- Update e2e example tests
- Update unit example tests
- Update HTML fixtures

* Update docsifyInit helper

- Add `debug` option
- Append `Markdown` suffix to markdown-related options
- Reorder options alphabetically

* Add jestPlaywright.debug() to e2e examples

* Removed need to pass page as arg to docsifyInit()

* Add VSCode debug configurations

* Change test server port from 8080 to 3001

* Clean up test names and expect() order

* Update npm scripts to ignore example tests

* Add CLI commands and resources section

* Add Jest unit test snapshot example

* Added Jest unit and e2e tests to Github workflows

* Add npm script to run Jest examples

Added for new devs who are exploring the examples, as the need for passing --testPathIgnorePatterns is not obvious. This flag is required because the example tests are excluded by default.

* Remove node 10.x and add 14.x from tests

Required for jest+playwright testitng

* Temporarily disable testPathIgnorePatterns for ci

* Temporarily remove node 14 from matrix

Cypress fails on node 14.x

* Alternate workflow setup for new test env

* Update workflow platforms and node versions

Also cleaning up naming

* Restoring original workflow names

* Remove Cypress tests

* Remove/Reset GitHub actions

* Restore/reset workflows

* Bump actions/checkout@v1 to v2

* Use playright GH action

* Update playwright GH action configuration

* Remove unnecessary steps and update checkout version

* Add install step

* Add --ignore-scripts flag

Linting does not require running scripts automatically executred after install.

* Swicth from ci to i for install

* Add new Build & Test workflow

* Add OS tests

* Wait for network idle for more reliable ready state

* Configure image snapshot testing and add example

* Remove example fixture file

* Adjust image snapshot threshold for local & CI tests

* Upload diff-output artifact

* Add failure() check to upload-artifact

* Bump image snapshot threshold for local & CI tests

* Set diffDirection

* Fix XHR caching in playwright tests

* Update image snapshot example and theshold

* Bump image snapshot threshold for local & CI tests

* Remove old workflows

* Bump image snapshot threshold for local & CI tests

* Bump image snapshot failureThreshold for local & CI tests

* Set failureThresholdType to percent

* Change image snapshot comparisonMethod to ssim

* Remove pixelMatch options (incompatible with ssim)

* Bump image snapshot failureThreshold

* Bump image snapshot failureThreshold

* Disable fast-fail to allow all checks to complete

* Rename workflow

* Disable fast-fail to allow all checks to complete

* Store pixel and ssim comparison configs

* Add link to image snapshot test

* Fix CI errors on Windows due to image size mismatch

* Attempt to fix macos e2e exit code 134 issue

* Update test.yml

* Update test.yml

* Update test.yml

* Fix --ci flag

* Set Jets to use --runInBand for macOS e2e

* Remove unnecessary macOS check

* Set image snapshot to runInProcess (macOS CI fix)

* Update test.yml

* Temporary failureThreshold change for debugging

* Upload os+node-specific diff artifacts

* Remove node version from diff artifact

* Revert "Remove node version from diff artifact"

This reverts commit 9cfcc4342bb22f18da30363a4c52758f13ba0cc9.

* Revert "Revert "Remove node version from diff artifact""

This reverts commit ad6c1891e48c70c9973a5c0d7b876b2d4621f3b9.

* Restoring failureThreshold after debugging

* Remove runInProcess option

* Revert "Remove runInProcess option"

This reverts commit 667ed6c870fc56f0349fc5eccc2cdeead3eff4ea.

* Add node-specific artifact uploads

* Set ssim mode to fast and restore runInProcess

* Set failureThreshold to 0.01

* Updating to playwright@next for webkit fix

* Restore optimal ssim configuration

* Testing pixel vs. ssim image comparison

* Move shared test setup to unit/int/e2e setups

* Refactor test server setup

* Replace live-server with browser-sync

* Update script for running local docs site

- Only init GA plugin on public site
- Only init Gitter plugin on public site
- Only init Matomo plugin on public site

NOTE: Large diff is a result of initial Prettier formatting. Actual change limited to last <script> block on page.

* Allow launching test server preview with --start

* Add integration tests and refactor unit + e2e

* Unify docsifyInit() and cleanup

- Create unified docsifyInit() for jest and playwright
- Move shared helpers to /tests/helpers
- Update tests
- Update globals

* Fixed webkit routes by specifying ContentType

* Update snapshot

* Update dependencies

* Update tests to use unified docsifyInit()

* Remove Cypress (old e2e test environment)

* Update tests to run (unit/integration/e2e)

- Add new integration tests (Jest)
- Remove old unit tests (mocha+jsdom)
- Remove old e2e tests (Cypress)

* Remove Cypress-related dependency

* Remove mocha+chai+jsdom (old unit/int test env)

* Rename testing directories and scripts

- Rename /tests/ directory to /test/
- Rename script/task names by removing “jest” identifier
- Remove “test:jest-examples” script

* - Configure test server for availability with all tests (previously e2e only)
- Create identical docsifyInit() tests using Jest (integration) and Playwright (e2e)
- Update docsifyInit() to convert relative URLs to absolute URLs to work in both JSDOM and Playwright
- Update docsifyInit() to append style- and js-related tags using createElement instead of insertAdjacentHTML
- Update paths in test files to use unified docsifyInit()
- Added option to docsifyInit() to enable/disable formatted HTML output to console
- Removed vue.css as default docsify theme from docsifyInit()
- Removed outdated files

* Reorganize test files

* Fix basePath option

* Replace do-mock-ajax with xhr-mock

- Allows mocking all XMLHttpRequests instead of just those initiated via /src/core/fetch/ajax.js
- Allows JSDOM tests to use /lib/docsify.js instead of /src/core/index.js (same as Playwright tests)
- Allows JSDOM tests to use /docs site as test content

* Added new waitFor helpers

* Clean up globals

- Import globals from various files instead of manually adding them to ensure they are availability in Jest and eslint configurations
- Add middleware to server configuration for serving virtual “_blank.html” file
- Add BLANK_URL
- Rename TEST_URL to TEST_HOST
- Removed ./test/fixtures/ directory (blank page now served via server.js middleware)
- Added page.goto(BLANK_URL) call to global Playwright beforeEach() setup

* Add try/catch for waitForFunction callback

* Move playwright config into jest.config.js

* Add runInBand option to tests for reliability

* Remove unnecessary XHR Mock teardown

* Add —runInBand to test script

* Merge develop

* Cleanup

- Relocate carbon plugin script with other scripts
- Update zh-cn docs URL to align with other translatins (GitHub, not jsdelivr)
- Add major version locks to URLs

* Removed fixed host value from docs

* Updated test after merge (docsify version change)

* Added startPath for manual instance

* Remove Node 10 from CI tests

* Remove Node 10 from CI lint tests
2020-10-05 14:10:30 -05:00
沈唁
b480822286
fix: sidebar horizontal scroll bar (#1362) 2020-08-29 22:23:06 +05:30
Anix
cc071c56f9
Docs: added carbon ads using docsify-plugin-carbon (#1337)
Co-authored-by: 沈唁 <52o@qq52o.cn>
2020-08-17 20:23:11 +05:30
沈唁
2048610aac
fix: {docsify-updated} in the sample code is parsed into time (#1321) 2020-08-01 17:04:08 +08:00
沈唁
6f9baab616
style: Update index.html and scroll.js (#1292) 2020-07-20 08:54:54 +08:00
沈唁
05d650e606
Merge branch 'develop' into master 2020-07-14 15:04:27 +08:00
沈唁
2a52460a59
fix: Russian language link error (#1270) 2020-07-05 19:17:50 +08:00
Anix
537597c313
docs: add vercel logo (#1267)
* docs: add vercel logo

* update vercel svg to file

Co-authored-by: sy-records <52o@qq52o.cn>
2020-07-04 16:02:16 +05:30
John Hildenbiddle
cd9df2de51
Update index.html
Add PHP grammar file for Prism.js
2020-07-02 18:26:05 -05:00
Anirudh Emmadi
c78cb11292
docs: removed codefund docs and plugin (#1262) 2020-07-02 21:33:13 +05:30
Anix
26cb940b51
Revert "Updated docs site dark and light mode with switch and redesigned search bar using docsify-darklight-theme" (#1207)
* Revert "update: updated docs site dark and light mode with switch and redesigned search bar using docsify-darklight-theme (#1182)"

This reverts commit 415f2954d9.

* docs: removed the old dark mode as well
2020-06-09 22:02:30 +05:30
Boopathi Kumar
415f2954d9
update: updated docs site dark and light mode with switch and redesigned search bar using docsify-darklight-theme (#1182)
* theme updated with dark and light mode switch

* requested changes made
2020-05-22 15:31:07 +05:30
Anix
eb1a3ce97c
Merge pull request #1152 from sy-records/fix-edit-on-github
fix Edit Document
2020-05-07 14:02:03 +05:30
Anix
fd5ed35b32
Merge pull request #1149 from chicgeek/feature/viewport-meta-accessibility
Improve accessibility of viewport meta by allowing page zoom (related to #945)
2020-05-07 13:59:11 +05:30
sy-records
2cf6fd8698 fix Edit Document 2020-04-28 19:01:38 +08:00
Luffy
0bbc02cef7
Modify Chinese doc link (#1151) 2020-04-28 10:11:35 +05:30
Laura Kishimoto
468ee2d58a Improve accessibility of viewport meta 2020-04-27 21:47:49 +01:00
anikethsaha
dc43d3c512 feat: added dark mode to docs closes #1031 2020-02-23 12:34:15 +05:30
orama254
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
Anton Wilhelm
5a75bf6cb6 provide plugin for matomo 2019-05-05 18:50:31 +02:00
cinwell.li
6a3cbba35b
chore: add gitter sidecar 2018-07-20 11:01:10 +08:00
Leon Zhang
de70d92fda fix the codefund load error (#569)
official domain name is changed, which cause the issue. change to use the newest plugin.

Please makes sure these boxes are checked before submitting your PR, thank you!

* [ ] 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.
2018-07-09 16:10:39 +08:00
qingwei.li
75f914354f chore: fix edit docs button, fixed #562 2018-07-07 08:41:30 +08:00
cinwellli
78b3a6d007 chore: fix edit docs button, fixed #562 2018-07-05 17:48:05 +08:00
qingwei.li
e281704e83 chore: add ru and es docs 2018-07-01 19:46:46 +08:00
qingwei.li
55755010c0 chore: move translation docs to alone repos 2018-07-01 19:33:31 +08:00
Johannes Rappen
73a38c3878 chore: update german docs, fix links (#560)
* updated german links
* fixed links where `QingWei-Li` should've been `docsifyjs`
  * naturally excluded donate links and links to private projects like `vuep` unrelated to docsify

---

See commit for details. If you have a question, just ask.
2018-07-01 13:48:44 +08:00
Leon Zhang
57967d2caa upgrade docsify-plugin-codefund (#500)
make the ad show more beautiful
2018-05-23 19:02:02 +08:00
qingwei.li
2b0109b89a chore: add codefund 2018-05-02 22:38:34 +08:00
qingwei.li
ef1b42be23 chore: fix index.html 2018-03-07 17:54:50 +08:00
qingwei.li
a41129425f chore: add docsify link 2018-02-11 22:22:06 +08:00
cinwell.li
21336444f4
chore: add google search meta 2018-02-11 09:58:23 +08:00
qingwei.li
5447e4bd47 add awesome docsify link 2018-01-24 10:31:36 +08:00
qingwei.li
66c8fd501a fix: remove codesponsor 2017-12-13 10:29:53 +08:00
Sanctuary
65f17b4753 Move script tags above closing body tag (#290) 2017-10-22 20:38:38 -05:00
LaySent
3e94cb6d76 fix: scroll issue in IE (#275)
* fix scroll issue in IE

* add meta tag for IE browser
2017-10-11 11:33:59 -05:00
qingwei.li
fcee316d2c chore: use unpkg cdn 2017-09-20 10:06:23 +08:00
qingwei.li
46ac4c3fd2 feat(plugin): add codesponsor plugin 2017-09-20 09:00:34 +08:00
qingwei.li
62aa161bff chore: add ga 2017-09-11 07:13:46 +08:00
qingwei.li
992ff77808 chore: remove yarnlock 2017-07-20 00:41:46 +08:00
qingwei.li
7fb5ce6c84
docs: add alias 2017-07-10 22:23:09 +08:00