Commit graph

2682 commits

Author SHA1 Message Date
Sébastien Lorber
1003a15d1f
polish(v2): improve Docusaurus 1 to 2 migration developer experience (#2884)
* improve markdown parsing errors by adding file path to error

* typo commit

* Add default nav item position to right (as v1)

* improve error when sidebar references unexisting document

* parseMarkdownFile: improve errors by providing hint about using "" to avoid parsing errors, if using special characters

* improve subcategory migration error for Unknown sidebar item type

* improve unrecognizedFields error

* typo

* fix inline snapshots

* improve the migration docs

* improve the migration docs

* improve migration doc

* Update migrating-from-v1-to-v2.md

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-06-06 11:16:50 +08:00
Sam Zhou
8aa520c314
fix(v2): Do not automatically change tab when a non-existing option is selected (#2893) 2020-06-06 11:11:42 +08:00
Alexey Pyltsyn
664ceb7771
fix(v2): restore styles for menu scrollbar (#2888) 2020-06-05 20:13:40 +08:00
Fanny
8a34872750
fix(v2): bootstrap doc sidebar (#2860)
* fix(v2): doc sidebar

* chore(v2): prettier

* fix(v2): docs navbar path

* fix(v2): fix error about activepath

* chore(v2): prettier

* feat(v2): change active color

* feat(v2): update to new docs cpmfog

* feat(v2): Add homepagepath
2020-06-05 15:36:36 +08:00
Alexey Pyltsyn
174cd8dc6f
refactor(v2): combine nested theme providers into one (#2870) 2020-06-05 15:09:13 +08:00
slorber
0ac5a66a1f rename fromRoutePath/toRoutePath to simply from/to 2020-06-04 14:31:26 +02:00
slorber
06673ee8c3 refactor: remove redirectCreator abstraction 2020-06-04 14:28:31 +02:00
Alexey Pyltsyn
6f2e59a176
fix(v2): render as regular text uncollapsible categories (#2880) 2020-06-04 20:27:16 +08:00
Sébastien Lorber
953abd8154
feat(v2): allow adding components to react-live scope (#2826)
* feat(v2): add components to react-live scope (#2807)

* fix admonition issue + improve react-live scope doc

* fix again admonition :(

* remove forwarding of mdx components to react-live scope (for now)

* remove useless dep
2020-06-04 15:18:42 +03:00
slorber
e60c063120 snapshot update 2020-06-03 19:47:36 +02:00
slorber
89038dea0c Fix non-strict validation error, allowing [] for string 2020-06-03 19:46:57 +02:00
slorber
00a79f69c7 Add chalk non-blocking errors + fix config bug 2020-06-03 19:28:57 +02:00
slorber
c224efb8a1 Add better options validation error 2020-06-03 17:53:54 +02:00
slorber
1439bad84c Add redirects plugin option 2020-06-03 17:30:21 +02:00
slorber
a0991c581b add context to error message 2020-06-03 16:07:27 +02:00
slorber
5bf85e44ac add validateRedirect 2020-06-03 16:03:03 +02:00
slorber
da8ccd0419 add isValidPathname 2020-06-03 15:40:10 +02:00
slorber
802235c768 Merge branch 'master' into feature/client-side-redirects 2020-06-03 15:16:24 +02:00
Alexey Pyltsyn
6f332f4345
fix(v2): treat inline code in raw HTML as native element (#2857)
* fix(v2): treat inline code in raw HTML as native element

* Replace indexOf with includes
2020-06-03 11:34:25 +03:00
Alexey Pyltsyn
e68b81bc33
fix(v2): do not create route for document that serve as docs home page (#2861) 2020-06-03 15:56:57 +08:00
Sébastien Lorber
6797af660f
fix(v2): fix FOUC in doc sidebar and various improvements (#2867)
* bug(v2): fix active sidebar item detection logic (https://github.com/facebook/docusaurus/pull/2682#issuecomment-636631225)

* fix sidebar category collapsed normalization to make sure we always have a boolean after normalization

* fix sidebarCollapsible option
2020-06-03 02:04:59 +08:00
Sébastien Lorber
b8de9c6ded
feat(v2): introduce docs slug in front matter (#2771)
* feat: docs pathname frontmatter (for #2697)

* feat: docs pathname frontmatter (for #2697)

* chore: comment typo

* feat: add slug frontmatter for docs

* test: add tests for versioned sites slugs

* docs: document slug feature

* test: fix tests and snapshots about doc slug feature

* docs(v2): doc slug wording

* Update website/docs/docs.md

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2020-06-02 20:50:30 +03:00
Alexey Pyltsyn
a32422caa2
refactor(v2): add aria role for doc sidebar (#2864) 2020-06-02 11:06:06 +03:00
tetunori
e63c468b0f
fix(v2): use base url to navigate to search page (#2838)
* fix: consider baseUrl

Add baseUrl to search page query URL.

* fix: use `useBaseUrl()`

* Revert "fix: use `useBaseUrl()`"

This reverts commit 72b319a293.

* fix: add link to PR
2020-06-02 10:51:54 +03:00
Alexey Pyltsyn
c0c7457e01
feat(v2): allow specifying meta image for blog posts (#2856)
* feat(v2): allow specifying meta image for blog posts

* Update docs [skip ci]
2020-06-02 10:48:22 +03:00
Alexey Pyltsyn
f25dd514f6
refactor(v2): add aria label to paginators (#2859) 2020-06-01 19:10:40 +08:00
Alexey Pyltsyn
ae91234e0f
refactor(v2): add missing main landmark for needed pages (#2858) 2020-06-01 19:10:14 +08:00
Alexey Pyltsyn
1b2744570b
fix(v2): strip images and footnotes for excerpt correctly (#2855) 2020-06-01 18:36:02 +08:00
Alexey Pyltsyn
be65f4511e
fix(v2): fix broken build when swizzled NotFound component exist (#2854) 2020-06-01 18:32:59 +08:00
Sam Zhou
93b35afe95
feat(v2): Allow swizzling prism-include-languages in theme-classic (#2841)
* feat(v2): Allow swizzling prism-include-languages in theme-classic

* Add docs

* Improve docs
2020-05-31 14:41:16 +08:00
Alexey Pyltsyn
e57294f70f
fix(v2): set proper font for live editor (#2835) 2020-05-29 17:57:19 +08:00
Sam Zhou
f2fb2b8e0f
fix(v2): Fix plugin path resolution (#2829)
* fix(v2): Fix plugin path resolution

* Import docusaurus.config.js from constant file
2020-05-29 15:37:07 +08:00
Sébastien Lorber
6c4c6c5750
Fix updated version numbers 2020-05-28 17:31:11 +02:00
Sébastien Lorber
768ed7368b
Merge branch 'master' into feature/client-side-redirects 2020-05-28 16:11:58 +02:00
Joe Previte
07b9e9cd62
feat(v2): expanded sidebar categories by default (#2682)
* feat: update sidebar categ to  take collapsed prop

* feat: add extra sidebars collapsed test

* fix: only mutate item.collapsed if necessary

* feat: update docs for SidebarItemCategory

* fix: update snapshots

* fix: update json to match new sidebar schema

* fix: update last snapshot

* refactor: check if item should be expanded

* docs: update sidebar categories section

* refactor: use new collpased on docusaurus

* feat: only highlight category for active page

* fix: check for window

* refactor: use ExecutionEnviornment

* refactor: make isCategoryOfActivePage pure

* fix: rename docs to docs-introduction in sidebars

* Update docs.md

* misc: remove setting for every sidebar

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-05-28 13:17:19 +08:00
Alexey Pyltsyn
d8ebe8b2e4 v2.0.0-alpha.56 2020-05-27 20:18:28 +03:00
slorber
4913ca638e remove useless comments 2020-05-27 18:08:06 +02:00
Alexey Pyltsyn
9973ae2d12 refactor(v2): do not use announcement bar hook unnecessarily 2020-05-27 18:42:36 +03:00
Alexey Pyltsyn
aaa8423c35
chore(v2): upgrade Infima to 0.2.0-alpha.12 (#2820) 2020-05-27 23:19:18 +08:00
Sam Zhou
33b60c6ba4
fix(v2): Consistently use 10.15.1 as the minimum required node version (#2819) 2020-05-27 23:18:48 +08:00
slorber
362573a391 Merge branch 'master' into feature/client-side-redirects 2020-05-27 16:51:04 +02:00
Alexey Pyltsyn
082c6212cb
feat(v2): allow deploy without building website (#2770)
* feat(v2): allow deploy without building website

* Update cli.md
2020-05-27 22:34:41 +08:00
Alexey Pyltsyn
90db53657e
feat(v2): automatically add base url to logo link (#2818)
* feat(v2):  automatically add base url to logo link

* Fix for docs non-root path
2020-05-27 22:22:22 +08:00
slorber
8b6dc032c6 update broken snapshot 2020-05-27 10:47:38 +02:00
Alexey Pyltsyn
f23d03bd3b
refactor(v2): align search icon to center on mobiles (#2814) 2020-05-27 16:36:13 +08:00
Sébastien Lorber
03f4100cd4
Merge branch 'master' into feature/client-side-redirects 2020-05-26 21:04:51 +02:00
slorber
cc1705e00c add canonical url 2020-05-26 21:03:18 +02:00
slorber
9a2129551e fix bad redirection url 2020-05-26 20:16:40 +02:00
slorber
cb2b5a5407 add write files test 2020-05-26 20:04:22 +02:00
slorber
8c8adc5e6b fix annoying inline snapshot not working due to fmt/indentation issue 2020-05-26 19:12:19 +02:00