Morooka Kotaro
284cdabb0a
docs: fix BrowserOnly return statement ( #5953 )
...
* docs: fix BrowserOnly return statement
* Update docusaurus-core.md
* Fix version docs
* prettier
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2021-11-15 21:27:45 +08:00
Matthijs Groen
0aba31de7b
docs: fix wrong code sample in docusaurus-core ( #5881 )
2021-11-05 22:57:59 +08:00
Paden Clayton
fa6d15b35f
feat(core): Add React ErrorBoundary component + theme default boundaries ( #3104 )
...
Co-authored-by: Paden Clayton <paden.clayton@monkedia.com>
Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2021-11-04 16:07:32 +01:00
Alexey Pyltsyn
92104c7c3b
feat: make Translate children optional ( #5683 )
...
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-10-14 18:39:41 +02:00
Sébastien Lorber
295e77cc09
refactor(core): replace useDocusaurusContext().isClient by useIsBrowser() ( #5349 )
...
* extract separate useIsClient() hook
* for consistency, rename to `useIsBrowser`
* useless return
* improve doc for BrowserOnly
* update snapshot
* polish
2021-08-12 19:02:29 +02:00
Joshua Chen
ee6ebc4877
refactor: better typing + remove unnecessary eslint-disable ( #5335 )
...
* Initial work
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix a few errors
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Restore default value
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update docs
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Use custom route config
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Address a few suggestions
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert logo change
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Restore key
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Oops
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove use of any
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove eslint-disable
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Put type reference back
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Remove
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-08-11 16:07:17 +02:00
Sébastien Lorber
b38c35a36d
docs: mention Link can be used for external links ( #5212 )
2021-07-23 12:24:03 +02:00
Teik Jun
c96c3b5c39
docs(v2): fix incorrect anchor links in website ( #5021 )
...
* docs: fix anchor links for docusaurus write-translations
* docs: fix anchor links for docusaurus serve
2021-06-20 22:16:17 +03:00
Arijit Kundu
d324dc3869
docs(v2): fixed the directory of index.js ( #4559 )
2021-04-05 18:56:14 +02:00
Alexey Pyltsyn
291a72fbae
docs(v2): use explicit heading IDs ( #4460 )
2021-03-19 11:00:41 +01:00
Sébastien Lorber
1734975f2f
feat(v2): Add Interpolate / interpolate APIs + complete theme translations ( #4295 )
...
* WIP: refactor team profile cards
* Add Interpolate / interpolate APIs
* Add interpolate snapshot test
* comments
* fix Interpolate TS types
* Interpolate should handle numbers and other JS types
* translate BlogPostItem
* interpolate translate() fn + add translations for blog post tag header
* localize the LastUpdated component
* translate DocVersionSuggestions
* fix test
* add some new translations
* Add node script to easily update the theme default translations
* fix translation extractor bug due to translate() dynamic values
* use ICU placeholder syntax
* refactor month key
* order
* team page translation improvements
* Add interpolation doc + improve i18n doc
2021-02-26 13:19:51 +01:00
Sébastien Lorber
140bfbfd90
docs(v2): do not recommend using useBaseUrl() hook in most cases ( #4126 )
...
* doc: suggest not using useBaseUrl most of the time
* doc: suggest not using useBaseUrl most of the time
2021-01-29 19:10:38 +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
Bartosz Kaszubowski
e864aa02aa
docs(v2): update Client API docs page ( #3835 )
...
* docs(V2): update Client API docs page
* apply review suggestion, fix useGlobalData example
2020-11-30 14:39:51 +01: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
Alexey Pyltsyn
9134b1396b
docs: various fixes and improvements ( #3546 )
2020-10-07 12:39:47 +02:00
Teik Jun
300aecb8bc
feat(v2): warn user when there are conflicting routes ( #3083 )
...
* feat(v2): add warning for path override
* feat(v2): check all routes recursively
* docs(v2): add docs for conflicting routes
* style(v2): improve comments in code
* refactor(v2): remove unused lifecycle method from docs plugin
* Revert "refactor(v2): remove unused lifecycle method from docs plugin"
This reverts commit 8b2caaa091
.
* feat(v2): add option for changing duplicate path behavior
* feat(v2): decouple logging from logic and detect duplicate routes in one pass
* test(v2): fix failing tests
* test(v2): add tests for duplicateRoutes
* test(v2): add test for handleDuplicateRoutes
* style(v2): add else statement
* docs(v2): modify documentation for duplicate routes
* docs(v2): move doc into guides folder
* fix(v2): fix broken links
* docs(v2): move docs for docusaurus config into api folder
* style(v2): add comments
* refactor(v2): extract getFinalRoutes
* refactor(v2): scope getFinalRoutes to docusaurus package
* test(v2): remove obsolete snapshots
* docs(v2): remove some docs
* fix(v2): rerun github actions
* docs(v2): change slug of docs in api folder
* refactor(v2): extract out a reportMessage method
* refactor(v2): extract getAllFinalRoutes
* test(v2): replace snapshots with actual value
* style(v2): remove unnecessary comment and change type
* chore(v2): remove unused dependency
* style(v2): remove unused code
* Update packages/docusaurus/src/server/utils.ts
* Update website/docs/guides/creating-pages.md
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2020-07-31 21:14:49 +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
Sébastien Lorber
1272ab83fb
feat(v2): useDocusaurusContext().siteMetadata ( #3058 )
2020-07-16 12:46:21 +02:00
Sébastien Lorber
a8b2e59a48
feat(v2): add useBaseUrlUtils() hook ( #3033 )
...
* add useBaseUrlUtils
* fix code highlighted lines
2020-07-08 17:51:59 +02:00
Drew Alexander
c341f457fb
docs(v2): add router implementation note ( #2935 )
2020-06-15 12:37:49 +02:00
Yangshun Tay
3e43955df6
docs(v2): fix typo in ExecutionEnvironment example
2020-06-09 21:52:24 +08: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
7448501c7c
refactor(v2): make external links more secure ( #2783 )
2020-05-22 11:18:27 +08:00
Alexey Pyltsyn
fc161b8455
docs(v2): various improvements ( #2768 )
2020-05-18 11:37:53 +08:00
Marco Moretti
5761835ae8
docs(v2): replace word append with prepend to describe useBaseUrl hook ( #2707 )
...
* [doc] Replace word append with prepand to describe useBaseUrl hook
* [doc] Replace word append with prepend to describe useBaseUrl hook
* [doc] Replace append for all document versions
2020-05-02 03:05:51 +08:00
Alexey Pyltsyn
af89a92628
feat(v2): add fallback to BrowserOnly component ( #2665 )
...
* feat(v2): add fallback to BrowserOnly component
* Update BrowserOnly.tsx
* Update docusaurus-core.md
Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-04-26 20:39:34 +08:00
Alexey Pyltsyn
9c1abcddab
refactor(v2): use nav link component only where needed ( #2585 )
2020-04-12 13:34:50 +08:00
Alexey Pyltsyn
4956d1ec81
docs(v2): fix formatting
2020-04-02 12:07:50 +03:00
Alexey Pyltsyn
8143af6851
feat(v2): add a way to exclude components from build-time prerendering ( #2323 )
...
* feat(v2): add a way to exclude components from SSR within JSX
* Update docusaurus-core.md
* Update and rename ClientOnly.js to BrowserOnly.js
* improve docs
* Improve naming
* Simplify realization
* Fix code style
* Fix docs
* Update docusaurus-core.md
Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-03-29 23:43:57 +08:00
Yangshun Tay
d974aa9c2a
feat(v2): add ExecutionEnvironment API ( #2296 )
...
* feat(v2): add ExecutionEnvironment API
* remove redundant code
2020-02-19 09:22:14 +08:00
endiliey
2f9a368da8
chore: fix typo
2019-11-29 10:41:19 +07:00
Endi
91b261af7a
docs(v2): more examples on lifecycle apis, cleanup ( #2051 )
...
* docs(v2): more examples on lifecycle apis, cleanup
* typo
2019-11-25 10:31:57 -08:00
Endi
16f10dd32a
docs(v2): Redirect component for easy redirect ( #1913 )
...
* docs(v2): Redirect component for easy redirect
* typo
* docs
* Update website/docs/docusaurus-core.md
Co-Authored-By: Alexey Pyltsyn <lex61rus@gmail.com>
* Update docusaurus-core.md
2019-10-30 10:19:30 +07:00
Yangshun Tay
f635f9aba2
docs(v2): code block line highlighting ( #1904 )
...
* docs(v2): code block line highlighting
* misc: update CHANGELOG
* misc: respond to review
* docs: add line highlighting to the template
2019-10-29 14:59:24 +08:00
Endi
a149f775ad
docs(v2): add docs on useful client api ( #1890 )
...
* docs(v2): add docs on useful client api
* Update docusaurus-core.md
* Update website/docs/docusaurus-core.md
* Update website/docs/docusaurus-core.md
* Update website/docs/docusaurus-core.md
* Update website/docs/docusaurus-core.md
2019-10-25 23:25:43 +07:00
Wei Gao
95fde5f827
docs(v2): refactor docs for better outline and welcoming PRs ( #1641 )
...
* docs(v2): refactor docs for better outline and welcoming PRs
* docs(v2): update docs
2019-07-07 23:14:49 -07:00
Yangshun Tay
5d6dc49bcd
docs(v2): add docs skeleton and structure ( #1412 )
...
* docs(v2): add docs skeleton and structure
* docs(v2): add on
* docs(v2): move motivation into contributing
2019-04-28 20:20:24 -07:00