Commit graph

4 commits

Author SHA1 Message Date
Sébastien Lorber
abcd8cefd6
feat(v2): @docusaurus/theme-common (#3775)
* create base @docusaurus/theme-common package + fix Webpack client export aliases issue shadowing other theme-common package

* Move theme-classic/src/utils code to new @docusaurus/theme-common package

* add prettierignore

* fix bad test location for getDocusaurusAliases()
2020-11-18 16:00:51 +01:00
Alexey Pyltsyn
14cdd72ae4
feat(v2): add ability to hide doc sidebar (#3615)
* feat(v2): add ability to hide doc sidebar

* Use relative imports
2020-10-22 11:23:15 +02:00
Sébastien Lorber
4130f1a195
feat(v2): persist docs preferred version (#3543)
* persist docs preferred version

* add proper implementation for useDocsPreferredVersion

* add proper implementation for useDocsPreferredVersion

* useDocsPreferredVersion => make localstorage read only after mount

* why @docusaurus/constants can't work?

* fix weird TS issue when not duplicating constants

* add basic @docusaurus/constants doc

* attempt to fix docs-only mode where we should not call useDocs hooks

* attempt to fix docs-only mode where we should not call useDocs hooks

* fix children

* encapsulate hacky isDocsPluginEnabled in docsUtils

* use same priority order for all navbar items: activeVersion ?? preferredVersion ?? latestVersion
2020-10-12 18:56:24 +02:00
Shubham Kumar
0951eef2d7
refactor(v2): add useThemeConfig hook + cleanup useless theme default values (#3394)
* refactor(theme-classic): clean default or fallback values

* refactor(theme-classic): fix announcementbar undefined error

* refactor(theme-classic): fixed react hook warning error

* refactor(theme-classic): revert prism destruct

* create useThemeConfig and use it whenever possible

* validateThemeConfig => add [] as default value for almost all arrays

* fix tests

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2020-10-02 19:23:34 +02:00