Commit graph

7 commits

Author SHA1 Message Date
Drew Alexander
53b28d2bb2
feat(v2): dark mode toggle customization (#3127)
* Add dark/light style fields to config

* Update yarn.lock

* Remove css content

* Add documentation

* Add icon fields to toggle component

* Add config validation fields

* Remove changes from docusaurus.config

* Add unicode documentation example

* Fix default values

* Add color mode config default

* Add lodash to theme-classic

* Change themeConfigSchema name to match other packages

* Add themeConfig color-mode tests

* Add default config merge function

* Remove unneeded object merging

* Add more documentation
2020-07-31 15:39:12 +02:00
Sébastien Lorber
68f4bd00f4
fix(v2): fix link items refusing attributes like target, rel etc... (#3168) 2020-07-30 15:46:33 +02:00
Sébastien Lorber
d1a27efe8c
fix(v2): navbar, allow unknown attributes (#3140) 2020-07-28 12:52:01 +02:00
Teik Jun
2159c4fcfb
fix(v2): make config validation less strict (#3120)
* fix(v2): make navbar title validation less strict

* fix(v2): fix validation for rehype plugin

* fix(v2): allow empty string for routeBasePath

* fix(v2): fix validation for stylesheets and scripts field

* fix(v2): rerun CI

* fix(v2): relax check for stylesheet href
2020-07-27 13:58:24 +02:00
Sébastien Lorber
0ecd71ec06
fix(v2): navbar items: href/to validation is too strict (not retrocompatible) (#3106) 2020-07-24 12:49:15 +02:00
Sébastien Lorber
27f384a67c
refactor(v2): improve navbar menu + generated config should be normalized (#3088)
* improve navbar menu

* fix errors due to forcePrependBaseUrl being normalized to true

* fix TS errors
2020-07-22 11:56:28 +02:00
Sébastien Lorber
15e73daae7
feat(v2): global data + useGlobalData + docs versions dropdown (#2971)
* doc components initial simplification

* doc components initial simplification

* add docContext test

* Add poc of global data system + use it in the theme

* Revert "doc components initial simplification"

This reverts commit f657b4c4

* revert useless changes

* avoid loosing context on docs switch

* fix docs tests

* fix @generated/globalData ts declaration / es import

* typo

* revert bad commit

* refactor navbar in multiple parts + add navbar item types validation + try to fix remaining merge bugs

* add missing watch mode for plugin debug

* fix docs global data integration, move related hooks to docs plugin + convert to TS

* change versions link label

* fix activeClassName react warning

* improve docs global data system + contextual navbar dropdown

* fix bug preventing the deployment

* refactor the global data system to namespace automatically by plugin name + plugin id

* proper NavbarItem comp

* fix tests

* fix snapshot

* extract theme config schema in separate file + rename navbar links to navbar items

* minor typos

* polish docs components/api

* polish useDocs api surface

* fix the docs version suggestions comp + data

* refactors + add docsClientUtils unit tests

* Add documentation

* typo

* Add check for duplicate plugin ids detection

* multi-instance: createData plugin data should be namespaced by plugin instance id

* remove attempt for multi-instance support
2020-07-21 11:16:08 +02:00