Commit graph

25 commits

Author SHA1 Message Date
Sam Zhou
705f8f3c51
fix(v2): Consistently use require.resolve in official plugins to resolve modules (#2797)
* fix(v2): Use require.resolve to resolve loaders in official plugins

* Use require.resolve to resolve client modules
2020-05-23 11:26:50 +08:00
Sam Zhou
85a694448f
fix(v2): Ensure that theme classic require webpack provided by @docusaurus/core (#2795) 2020-05-23 04:58:21 +08:00
Alexey Pyltsyn
ab5590bafa
fix(v2): add default value for options in theme classic [ci skip] (#2688) 2020-04-28 09:30:18 +03:00
Alexey Pyltsyn
46118b3fe4
fix(v2): allow build website without custom css (#2676) 2020-04-27 21:09:57 +08:00
Alexey Pyltsyn
9e1f816fcd
fix(v2): use remark-admonitions separately in each plugin instead of in preset only (#2642)
* fix(v2): use remark-admonitions separately in each plugin instead of in preset only

* Update types.d.ts

* Update types.d.ts

* Address fixes from review

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-04-24 12:18:54 +08:00
Alexey Pyltsyn
14f4ef875a
feat(v2): add ability set dark mode by default (#2597)
* feat(v2): add ability set dark mode by default

* s/forceDarkMode/defaultDarkMode

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-04-17 19:19:55 +08:00
Alexey Pyltsyn
1f00d15c74 chore(v2): fix code style (revert previous changes) 2020-04-05 17:38:12 +03:00
Alexey Pyltsyn
6965a668cd chore(v2): fix code style 2020-04-05 17:30:59 +03:00
Yangshun Tay
b07507c9cc
chore(v2): upgrade devDependencies (#2538)
* chore(v2): upgrade devDependencies

* chore(v2): upgrade devDependencies

* chore: prettier
2020-04-05 19:07:44 +08:00
Alexey Pyltsyn
5226767caf
feat(v2): add support specify new languages for Prism (#2250)
* feat(v2): add support specify new languages for Prism

* Do It Right

* More fix

* Fix up!

* Fixes

* Move to dev dependencies

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-03-08 22:13:02 +08:00
Alexey Pyltsyn
37dff050ce
fix(v2): switch a toggle when system theme changed (#2325)
* fix(v2): switch a toggle when system theme changed

* fix: add check on disabled dark mode
2020-02-27 10:14:20 +08:00
Yangshun Tay
32c1a92b17
chore: yearless copyright headers for source code (#2320)
* chore: yearless copyright headers for source code

* update snapshots
2020-02-25 23:12:28 +08:00
Elvis Wolcott
0fa080c39c
feat(v2): add remark-admonitions to @docusaurus/preset-classic (#2224)
* feat(v2): add remark-admonitions

* feat(v2): add admonitions to style guide

* style: cleanup changes

* docs(v2): document how to use admonitions

* docs(v2): use proper package name

* docs(v2): add link to remark-admonitions docs

* style(v2): clean up addAdmonitions
2020-02-08 19:28:47 +08:00
Yangshun Tay
26cc4168fa Revert "refactor(v2): move no-flash script to head tag (#2158)"
This reverts commit f944550353.
2019-12-30 10:42:20 +08:00
Alexey Pyltsyn
f944550353 refactor(v2): move no-flash script to head tag (#2158) 2019-12-30 09:54:27 +08:00
Endi
33622c5347 refactor(v2): toggle data-theme with vanilla js instead of react helmet (#2127)
* refactor(v2): toggle data-theme with vanilla js instead of react helmet

* use document documentElement
2019-12-16 08:57:24 +08:00
Alexey Pyltsyn
26a3d72c84 feat(v2): auto switch theme depending on the system theme (#2117) 2019-12-12 05:06:54 -08:00
Endi
4d5b62ae47
feat(v2): support prefers-color-scheme & fix dark mode FOUC on refresh (#2069)
* fix(v2): dark mode should not have flash on refresh

* refactoring

* address review
2019-12-01 20:01:35 +07:00
Endi
b789624d2e feat(v2): allow easy css override with custom css (#1559)
* feat(v2): allow easy css override with custom css

* lint

* fix(v2): use back require for client modules
2019-06-04 10:03:11 -07:00
Yangshun Tay
246c1814c0
fix(v2): use infima from npm instead of trunk CDN (#1556) 2019-06-04 00:46:31 -07:00
Yangshun Tay
6a814ac64a
refactor(v2): change plugin api (#1547)
* misc(v2): new plugin format example

* refactor(v2): make all plugins a function returning objects

* misc: add CHANGELOG

* misc(v2): update CHANGELOG

* misc(v2): fix tests

* misc(v2): convert swizzle command

* misc(v2): convert sitemap back to commonjs
2019-06-02 20:37:22 -07:00
Yangshun Tay
384fd5708f feat(v2): Algolia search theme (#1440)
* feat(v2): Algolia search plugin

* patch PR #1440 (#1441)

* alternative implementation

* typo

* refactor noop

* rename SearchAlgolia -> SearchBar

* changes.md
2019-05-08 15:21:11 +07:00
Endi
0834784455
feat(v2): easier plugin theme components swizzling (#1436)
* feat(v2): easier plugin theme components override

* add context

* refactor again

* rename eject -> swizzle

* nits
2019-05-07 13:56:43 +07:00
endiliey
3298d8cd23 fix(v2): add missing layout alias on theme-classic plugin 2019-05-06 20:32:49 +08:00
Yangshun Tay
eedd4c481c feat(v2): implement theme component overriding (#1435)
* feat(v2): implement component overriding

* siteDir theme overriding should work for > 1 level directory

* fallback for essential component like Loading

* rename default -> classic
2019-05-06 19:25:04 +07:00