86 Commits

Author SHA1 Message Date
John Hildenbiddle
35002c92b7
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746)
* Render native emoji with image fallback

Fix #779

* Deprecate emoji plugin

* Add emoji tests

* Remove console.log statement

* Fix emoji image alt attribute

* Set nativeEmoji to false by default (non-breaking)

* Fix parsing emoji in HTML comments and script tags

* Add nativeEmoji and update noEmoji details

* Add Emoji plugin deprecation notice

* Fix ESLint issues

* Create build:emoji task

- Auto-generate emoji data from GitHub API
- Auto-generate emoji markdown for website
- Add emoji page to navigation

* Fix rendering of GitHub emoji without unicode

* Adjust and match size of native and image emoji

* Update emoji test snapshot

* Update docs test snapshot

* Fix ci/codesandbox error

* Update native emoji font-stack

* Fix rendering of native multi-character emoji

* Kick GitHub Workflow

* Replace rollup’s uglify plugin with terser

* Switch “npm ci” instead of “npm i” for stability

* Change emoji data from default to named export

* Revert "Replace rollup’s uglify plugin with terser"

This reverts commit 7ba85136361c72839516900d91cca806fac94fee.

* Revert "Switch “npm ci” instead of “npm i” for stability"

This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0.

* Revert "Change emoji data from default to named export"

This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c.

* Specify codesandbox template and node version

* Update codesandbox config

* Revert "Revert "Replace rollup’s uglify plugin with terser""

This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8.

* Revert "Revert "Revert "Replace rollup’s uglify plugin with terser"""

This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47.

* Update codesandbox config

* Revert "Update codesandbox config"

This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023.

* Fix codesandbox uglify error

* Emoji docs tweaks

* Restore and update emoji plugin code

* Restore and update emoji plugin docs

* Prettier updates

* Match lowercase shortcodes only

Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-05 22:25:09 -06:00
John Hildenbiddle
c49c39a4a2
refactor: Update test environments and lint configuration (#1736)
* Update test environments and lint configuration

Update Jest (unit + integration) and Playwright (e2e) test environments. Includes stability improvements for e2e tests using newer, more stable methods per the Playwright docs.

- Update Jest 26 => 27
- Update Jest-related libs (babel parser)
- Update Playwright 1.8 => Playwright Test 1.18
- Update GitHub CI (action versions, job parallelization, and matrices)
- Update ESLint 5 => 8
- Update ESLint-related libs (parser, prettier, Jest, Playwright)
- Fix test failures on M1-based Macs
- Fix e2e stability issues by replacing PW $ method calls
- Fix ESLint errors
- Fix incorrect CI flag on Jest runs (-ci => --ci)
- Refactor e2e test runner from Jest to Playwright Test
- Refactor e2e test files for Playwright Test
- Refactor fix-lint script name to lint:fix for consistency
- Refactor npm scripts order for readability
- Remove unnecessary configs and libs
- Remove example image snapshots
2022-01-30 21:40:21 -06:00
Koy
c9d4f7abc9
fix: the sidebar links to another site. (#1336)
* fix : the sidebar links to another site
2020-10-15 09:13:35 +08:00
沈唁
4807e58cb9
fix: Cannot read property level of undefined (#1357)
Co-authored-by: Anix <anik220798@gmail.com>
2020-09-01 15:04:27 +05:30
沈唁
ce316075e0
fix : add patch for {docsify-ignore} and {docsify-ignore-all} (#1351)
* revert: Convert {docsify-ignore} and {docsify-ignore-all} to HTML comments

This reverts commit 90d283d340502456a5d8495df596bb4a02ceb39b

* fix: patch for docsify-ignore

* fix test

* fix test
2020-08-22 19:24:56 +08:00
Mattia Astorino
90d283d340
fix: convert {docsify-ignore} and {docsify-ignore-all} to HTML comments (#1318)
* breaking: convert {docsify-ignore} and {docsify-ignore-all} to HTML comments

Close https://github.com/docsifyjs/docsify/issues/441

* chore: add ignore and ignore-all unit tests

Co-authored-by: 沈唁 <52o@qq52o.cn>
2020-07-30 18:11:04 +08:00
Anix
3d662a5bf7 fix: fixed target and rel issue (fixes #1183) 2020-05-20 11:14:26 +00:00
Sytone
b05949a161 Add front matter to dev page
Update embeded files documentation
Add example with front matter
Add various comments I used to understand code
Updated front matter to have installed flag
Added function to parse front matter
Added intercept to remove front matter for embed
2020-04-27 12:24:24 -07:00
Anix
9afa66607d chore: removed circular dep and css.escape 2020-03-09 20:33:07 +05:30
Leonardo Rossi
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
Anix
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
Anix
5f7464af48
chore: migrate CI to github, refactore CI and npm scripts, linting fixes (#1023) 2020-02-14 15:22:53 +05:30
Koy
b3d9b966df
fix: emojis in titles not working correctly and update (#1016)
the doc(add a note)
2020-02-14 12:51:07 +05:30
Carsten Daurehøj
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
cyrilf
2928eb7e55
Ensure autoHeader dom result is similar to parsed H1 (#811) 2020-02-04 22:34:44 +05:30
Giulio Ambrogi
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
Vaishak Kallore
4769018e26 Added support for rel='noopener' 2019-09-06 11:13:40 +05:30
Alexandru Cambose
78f5564a30 Updated to remove all headers under it 2019-04-23 07:08:29 +02:00
Alexandru Cambose
6cc069cb9f Added filtering in sidebar for ignoreSubHeading 2019-04-23 07:08:29 +02:00
John Hildenbiddle
69ef489210 fix: task list rendering (Fix #749) (#757)
This PR restores the task list presentation removed in 4.8:

- Add “task-list-item” class to task list `<li>` elms
- Hide list bullets on unordered task lists `<li>` elms

It also provides several improvements on the pre-4.8 presentation:

- Add “task-list” class to task list `<ul>` elms 
- Display list numbers on ordered task lists `<li>` elms
- Render accessible task list items by wrapping checkbox and text in `<label>` elm
- Allow task lists to be nested within standard ordered/unordered lists 

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

* [x] Make sure you are merging your commits to `master` branch.
* [x] Add some descriptions and refer relative issues for you PR.
* [x] DO NOT include files inside `lib` directory.
2019-01-30 14:21:50 +08:00
Anton Wilhelm
1447c8a40a feat: Provide code fragments feature (#748) 2019-01-23 10:54:50 +08:00
D.A.Bashkirtsev
6ac7bace21 Fix getAndRemoveConfig regex (#708)
* Fix getAndRemoveConfig regex

Update getAndRemoveConfig regular expression for prevent cases, when header has name like "foo::bar::baz".

* Fix wrong regexp

* Fix regex

Ignore `:foo` cases
2018-12-05 10:29:55 +08:00
程康
4db8cd6abf fix: IE10 compatibility (#691)
* fix: IE10 compatibility

* chore: use built-in helper fn
2018-11-12 10:22:14 +08:00
cinwell.li
1a945d445a
fix(cover): Compatible with legacy styles, fixed #677 (#678)
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-11-02 02:14:02 +08:00
cinwell.li
fdd8826b3b
fix(compiler): import prism-markup-templating, fixed #672 (#676) 2018-11-01 13:45:42 +08:00
程康
ab19b13210 feat: add heading config id (#671) 2018-11-01 08:07:10 +08:00
qingwei.li
d35059dd0b fix(compiler): prevent render of html code in paragraph, fixed #663 2018-10-31 22:05:24 +08:00
qingwei.li
4f588e0af4 fix(compiler): extra quotes for codeblock 2018-10-31 21:19:35 +08:00
cinwell.li
a39b214733
feat: upgrade marked to 0.5.x, fixed #645, close #644 (#662) 2018-10-31 20:34:56 +08:00
程康
1ce37bdc2e fix: missing variable declaration (#660)
### Issue

<img width="491" alt="screenshot 2018-10-30 at 23 31 35" src="https://user-images.githubusercontent.com/8396515/47757020-58587080-dc9c-11e8-867c-dc3feabcb651.png">

Sorry, forgot to include this line in previous PR.

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

* [x] Make sure you are merging your commits to `master` branch.
* [x] Add some descriptions and refer relative issues for you PR.
* [x] DO NOT include files inside `lib` directory.
2018-10-31 08:22:59 +08:00
Carlos García
42ea8af245 feat(compiler): support embedded mermaid (#629) 2018-10-23 15:29:14 +08:00
程康
9e860177cb fix: Cache TOC for later usage in the case of cached file html (#649) 2018-10-23 15:24:22 +08:00
程康
18f0f03a89 fix: Remove target for mailto links (#652)
Closes https://github.com/docsifyjs/docsify/issues/625
2018-10-23 15:01:37 +08:00
keelii
100ab01811 Fix nested toc style issue on sidebar (#595)
1. Remove recursive toc outer tag li
2. remove .sidebar li marginLeft
3. add .sidebar ul marginLeft
2018-08-09 07:36:23 +08:00
Steven
a683e5bf2a Update url to markedjs (#601)
Please makes sure these boxes are checked before submitting your PR, thank you!

* [x] Make sure you are merging your commits to `master` branch.
* [x] Add some descriptions and refer relative issues for you PR.
* [x] DO NOT include files inside `lib` directory.

Related: #410

This updates urls to marked github repo and documentation.
2018-08-08 10:16:32 +08:00
cinwell.li
04b36b0ef2
fix: alldow addition content in sidebar, fix #518, fix 539 (#543) 2018-06-29 21:27:54 +08:00
cinwell.li
3a7ad6299e
feat: support image resizing, resolve #508 (#545)
* feat: support image resizing, resolve #508

* add docs
2018-06-29 21:27:41 +08:00
cinwell.li
ee72dd05e5
feat: add logo option, #264 (#541) 2018-06-19 08:19:21 +08:00
qingwei.li
bfd0d18e48 fix: resolve path of image and embed files, fixed #412 2018-03-06 11:57:48 +08:00
cinwell.li
8352a1e489
refactor: build config (#408)
* refactor: build config

* chore: fix conflict

* fix: 404 page path
2018-03-03 22:51:27 +08:00
qingwei.li
50fe22563b chore: fix lint 2018-02-12 16:28:10 +08:00
qingwei.li
dc0c3ced4e fix(embed): compatible ssr 2018-02-12 16:25:28 +08:00
qingwei.li
62ce447fc3 refactor(embed): async fetch embed files, fixed #387 2018-02-12 16:25:28 +08:00
qingwei.li
e097f88f0e fix: homepage link 2018-02-11 22:22:06 +08:00
qingwei.li
a0c60b707c chore: remove console.log 2018-02-11 22:22:06 +08:00
qingwei.li
56608e4739 docs: add embed files, resolve #383, resolve #333, resolve #134 2018-02-11 22:22:06 +08:00
qingwei.li
4d61b1e9a3 refactor: embed files feature, resolve #383, resolve #333, resolve #134 2018-02-11 22:22:06 +08:00
qingwei.li
f960c196bf fix: highlight homepage link, fixed #304 2018-02-11 22:22:06 +08:00
qingwei.li
ebc10c4e43 fix: ssr compatible embedd 2018-02-11 22:22:06 +08:00
qingwei.li
761ccc2c2b feat(compiler): support embedded file as code block, close #134 2018-02-11 22:22:06 +08:00