Commit Graph

106 Commits

Author SHA1 Message Date
John Hildenbiddle
f5412dc7b0
chore: Update lint configuration (ESLint 9, Prettier 3) (#2438)
* Update linting configuration (eslint, prettier)

* Fix lint issues following eslint prettier update

* Change ESLint config to allow boolean coercion

* Switch to default import name per docs

* Fix suppression of error details

* Update JSDoc comments

* Update waiForFunctin to provide error details

---------

Co-authored-by: Koy Zhuang <koy@ko8e24.top>
2024-05-28 15:27:29 -05:00
John Hildenbiddle
4ae87bb18b
build: v5 updates and refactors (#2428)
* Update JS build

- Change rollup build from API to config file
- Change output dir from lib to dist
- Update lib to dist path in related files
- Update dependencies
- Add banner comment to bundles
- Add unminified plugin bundles

* Update docs with v5 version lock and dist path

* Update docs to reference minified themes

* Clean up docs

* Update CSS build

- Change CSS build from API to CLI
- Change output dir from lib to dist
- Update lib to dist path in related files
- Update dependencies
- Add sourcemaps

* Update dependencies

* Clean up package.json and add keywords

* Fix rimraf globs on Windows

* Fix PostCSS CLI glob on Windows

* Update test-related dependencies

* Update emoji

* Add engines prop to package.json
2024-05-21 15:19:21 -05:00
John Hildenbiddle
8ef9a3cd03
Fix: Vue text interpolation in code blocks. (#2430)
* Update Vue 3 depenency and docs. Remove Vue 2.

* Fix minor lint issue

* Remove Vue 2 reference

* Swap button positions

* Update Vue2 links

* Send HTML with _blank to avoid quirks mode

* Support Vue text interpolation in code blocks

Fix #1812
2024-05-19 11:49:33 -05:00
Luffy
87fd55d712
fix: carbon broken (#2387) 2024-03-26 08:19:31 +08:00
Bingzhi.Li
9e681c6419
chore: fix front matter broken (#2390)
Co-authored-by: Luffy <52o@qq52o.cn>
2024-03-22 09:37:28 +08:00
John Hildenbiddle
1c5a7013f1
Chore: Clean up server implementation and update test docs (#2316)
- Replace live-server with existing Browsersync dependency as web server
- Remove duplicate `index.html` file
- Add `build:html` script to generate `/docs/preview.html`
2023-12-11 15:00:33 -06:00
John Hildenbiddle
50b84f74b2
feat: Add "Skip to main content" link and update nav behavior (#2253)
Co-authored-by: Joe Pea <trusktr@gmail.com>
Co-authored-by: Koy Zhuang <koy@ko8e24.top>
2023-11-30 13:11:21 +08:00
Joe Pea
b621e0e4e7 chore: update miscellaneous parts of the source to reasonably modern language alternatives, remove polyfills, improve some JSDoc comments, remove traces of IE
BREAKING: In a minority of cases syntax updates may break apps running in very old browsers (such as Internet Explorer), or apps that build Docsify in a custom way with old build tools. To upgrade, build Docsify for older browsers in a custom way, or update existing build tools to handle newer syntax.

DEPRECATED: `$docsify.themeColor` is deprecated and will be eventually removed, use a `--theme-color` CSS variable in your style sheet.
2023-07-03 01:50:00 -07:00
沈唁
509781036d
docs: Fix missing dolphin theme (#1960) 2023-01-10 16:02:02 +08:00
沈唁
2d13255acb
chore: update vercel logo (#1776)
* chore: update vercel logo

* chore: update vercel logo

* chore: remove vercel link form github pages

* chore: update style

* chore: update readme

* chore: update readme

* chore: update readme
2022-03-24 00:46:36 +08:00
沈唁
093d4a0081
chore: update vercel link (#1775)
* chore: update vercel link
2022-03-19 23:58:07 +08:00
John Hildenbiddle
fa6df6d584
fix: Legacy bugs (styles, site plugin error, and dev server error) (#1743)
* Add try/catch w/ error message to plugin calls

* Update lifecycle.js

* Update lifecycle.js

* Fix docsify-plugin-carbon error

* Fix ESLint errors

* Simplify conditional JS loading

* Fix styles in legacy browser w/o CSS var support

* Fix gitignore paths

* Fix BrowserSync IE error

* Fix search field presentation in IE11

- Removed fixed height and allow element to size naturally via font-size and padding
- Remove default "x" rendered on IE input fields

* Revert "Update lifecycle.js"

This reverts commit 2a58be69eb75a87b74d0408765e1d222282ac95b.

* Revert "Update lifecycle.js"

This reverts commit 67c5410b049237887811350f38e3f9bc8a2c78dc.

* Revert "Add try/catch w/ error message to plugin calls"

This reverts commit 631e9248786f87a5b2f7892fc73a53543744d288.

* Fix docsify-plugin-carbon error & ESLint errors

Co-authored-by: 沈唁 <52o@qq52o.cn>
2022-02-05 03:21:50 -06:00
2jun0
a5cf85b61d
docs: add nameLink for change logo redirect. (#1651)
add nameLink to change logo redirect path for different lang docs.
Co-authored-by: 沈唁 <52o@qq52o.cn>
2021-10-15 14:11:56 +08:00
沈唁
a6fbe079d3
chore: Update Edit Document using develop branch (#1541) 2021-04-18 16:14:33 +08:00
沈唁
c2cf163fc0
chore: Fix search for missing pathNamespaces (#1547) 2021-03-28 18:46:09 +08:00
沈唁
a8016c8d74
docs: Update Vercel logo link (#1520) 2021-02-20 15:54:30 +08:00
Koy
065cdd4223
chore: change Gitter to Discord throughout project. (#1507)
* chore: change Gitter to Discord throughout project.
Co-authored-by: 沈唁 <52o@qq52o.cn>
2021-02-13 09:18:54 +08:00
沈唁
f5dd61f538
chore: Fix missing carbon (#1501)
Co-authored-by: John Hildenbiddle <jhildenbiddle@users.noreply.github.com>
2021-02-10 00:03:15 -06:00
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