Sébastien Lorber
60d189a91c
fix(v2): Export Joi from validation-utils package ( #4459 )
2021-03-18 19:27:51 +01:00
Ben
333545aa97
fix(v2): Allow null as valid for title of item in footer links ( #4267 )
2021-02-22 18:56:58 +01:00
Alexey Pyltsyn
b3b658f687
feat(v2): allow to change location of search bar ( #4199 )
...
* feat(v2): allow to change location of search bar
* add SearchBar swizzle comment
* quickfix for NavbarItem theme config
* typing quickfix
* doc typo
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-02-09 16:31:52 +01:00
Sébastien Lorber
869ebe7b53
fix(v2): fix/enhance minor i18n issues reported ( #4092 )
...
* fix comment
* allow to pass custom classname in navbar items
* Add IconLanguage comp to dropdown
* do not trim htmlLang
* Add initial hreflang SEO support
* doc hreflang
2021-01-22 21:26:42 +01:00
Sébastien Lorber
a8ee7fd3e8
docs(v2): i18n doc + polish ( #4014 )
...
* add some initial i18n doc
* i18n doc progress
* i18n tutorial progress
* i18n tutorial progress
* polish Crowdin docs
* i18n sidebar in guides
* polish crowdin doc
* update Crowdin doc a bit
* fix annoying relative link to global site resource in template (breaks i18n tutorial)
* template: use simpler export for homepage
* add markdown page example
* rename mdx.md to interactiveDoc.mdx
* update bootstrap/facebook templates too
* sync init template package scripts
* add slug frontmatter doc
* improve i18n doc
* complete i18n doc
* temporarily enable the localeDropdown
* doc typo
* improve the i18n doc
* Add Git i18n doc
* add missing "--" for npm run options (unfortunately they don't get stripped by npm2yarn, and are required foor npm)
* improve a bit the Crowdin doc
2021-01-19 17:26:31 +01:00
Sean Campbell
5dfa665281
feat(v2): themed logo in footer ( #3993 )
...
* feat: attempt 1 at themedlogo in footer
* Add srcDark to website for temp debug
* typo fix
* Got it now! except for centering
* style: centered new themed image logo
* style: change ThemedImage styleing to center footer logo
* style: Change ThemeImage Style to initial
This was my mistake.
Removed temp `srcDark` footer logo
2021-01-06 16:10:44 +01:00
Sébastien Lorber
aff656182c
feat(v2): Add localeDropdown navbar item type + i18n localeConfigs field ( #3916 )
...
* Add localeDropdown navbar item type
* fix type + add localeConfigs test
2020-12-14 18:28:39 +01:00
Aarón García Hervás
1fafdb0d33
fix(v2): Allow footer logo at attribute to be empty ( #3817 )
2020-11-25 13:12:45 +01:00
Alexey Pyltsyn
52e7511869
fix(v2): make optional title for footer links column ( #3666 )
2020-10-31 17:57:11 +01:00
Alexey Pyltsyn
69bf68ae57
chore(v2): migrate hapi/joi to joi ( #3638 )
2020-10-26 15:18: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
Alexey Pyltsyn
8f5c632cdf
refactor(v2): various dropdown improvements ( #3585 )
...
* refactor(v2): various dropdown improvements
* Remove invalid attr from markup
* Better naming
* Update types
* Fix
* Remove attr position correctly
* Test
* Add test
2020-10-16 16:41:30 +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
Sébastien Lorber
649882d867
feat(v2): version dropdown before/after items + move site "All Versions" link ( #3548 )
...
* add dropdownItemsAfter option + reorg a bit docusaurus site navbar
* fix isActive react warning
* Update theme-classic.md
Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2020-10-07 19:58:00 +03:00
Sébastien Lorber
9ba28a378f
feat(v2): doc navbar item type ( #3539 )
...
* provide DocNavbarItem type
* update snapshots
* Fix Docusaurus tabs CSS
* revert navbar tabs css/style changes, instead apply simple navbar__link--active class + make it configurable
* Update website/docs/theme-classic.md
Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
* add dropdownActiveClassDisabled option
Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2020-10-07 14:42:24 +03: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
Bartosz Kaszubowski
ae2c063929
feat(v2): allow to use array of files in customCss field ( #3474 )
...
* feat(v2): allow to use array of files in customCss field
* customCss array:
- fix bug (push instead of concat)
- update docs
- add theme config validation + tests
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2020-09-28 18:15:41 +02:00
Bartosz Kaszubowski
086bee287d
feat(v2): add style property to theme-classic navbar ( #3432 )
...
* feat(v2): add style property to theme-classic navbar
* revert config test change
* review changes
2020-09-11 18:03:06 +02:00
Sébastien Lorber
21852948ce
feat(v2): ability to add/override theme html metadatas ( #3406 )
...
* ability to add/override theme html metadatas
see https://github.com/facebook/docusaurus/issues/3024
* refactor/fix validateThemeConfig tests
2020-09-04 16:36:56 +02:00
Bartosz Kaszubowski
e8e16a45d3
feat(v2): add isCloseable property for theme-classic announcement bar ( #3388 )
...
* feat(v2): add `isCloseable` property for announcement bar
* correct styling for non-closeable announcement
* fix tests
2020-09-02 11:41:38 +02:00
Sébastien Lorber
a4769e3f30
fix(v2): alpha 62 doc fixes ( #3381 )
...
* deprecated nextVersionLabel option
* useActivePlugin failfast option
* remove deprecated option nextVersionLabel
* routeBasePath: '' should be forbidden
* routeBasePath: '' should be forbidden
* Docs: do not show version badge if there is only 1 version: https://github.com/facebook/docusaurus/issues/3362
* allow sidebars file to not exist: fallback to empty sidebars
https://githu.com/facebook/docusaurus/issues/3366
2020-09-01 16:31:33 +02:00
Vincent
56c04c7834
fix(v2): Allow the alt for the logo to be empty ( #3352 )
...
See
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Img#Attributes
> Setting this attribute to an empty string (alt="") indicates that
> this image is not a key part of the content (it’s decoration or a
> tracking pixel), and that non-visual browsers may omit it from
> rendering.
Since the logo is indeed decorative and redundant with the actual
project name, an empty alt is fine.
2020-08-28 12:50:42 +02:00
Sébastien Lorber
b86806460c
refactor(v2): announcement bar bad spelling + minor refactors ( #3343 )
2020-08-27 10:55:45 +02:00
Sébastien Lorber
a4c8a7f55b
refactor(v2): docs plugin refactor ( #3245 )
...
* safe refactorings
* safe refactors
* add code to read versions more generically
* refactor docs plugin
* refactors
* stable docs refactor
* progress on refactor
* stable docs refactor
* stable docs refactor
* stable docs refactor
* attempt to fix admonition :(
* configureWebpack docs: better typing
* more refactors
* rename cli
* refactor docs metadata processing => move to pure function
* stable docs refactor
* stable docs refactor
* named exports
* basic sidebars refactor
* add getElementsAround utils
* refactor sidebar + ordering/navigation logic
* stable retrocompatible refactor
* add proper versions metadata tests
* fix docs metadata tests
* fix docs tests
* fix test due to absolute path
* fix webpack tests
* refactor linkify + add broken markdown links warning
* fix DOM warning due to forwarding legacy prop to div element
* add todo
2020-08-17 17:50:22 +02:00
Anshul Goyal
181a6174c7
fix(v2): relax URI validation ( #3227 )
...
* relax URI validation
* add regex
* add test
* fix linting error
* fix formatting
* use URL rather than regex
2020-08-07 22:11:19 +02:00
Teik Jun
8f0c00f3d4
fix(v2): fix theme validation for prism field and add tests ( #3210 )
...
* fix(v2): fix theme validation for prism field
* chore(v2): minor changes
* chore(v2): remove unused dependencies
2020-08-05 15:27:32 +02:00
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