Commit graph

4109 commits

Author SHA1 Message Date
Joshua Chen
be695aa0e9
feat(v2): complete Chinese code translations (#5139)
* feat(v2): complete Chinese code translations

* Complete zh-Hant translation

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-07-12 19:42:03 +02:00
Nazar
f14d8d2fdd
docs(v2): GIF format is not suported (#5133)
https://github.com/facebook/docusaurus/issues/2956

Please check the issue above.
GIF format is currently is not supported
2021-07-12 19:40:42 +02:00
Forresst
3e5a832590
fix(v2): add missing french translations for mobile (#5151) 2021-07-12 19:40:07 +02:00
Sébastien Lorber
d7c2df6530
chore: upgrade Crowdin (#5137) 2021-07-09 19:35:06 +02:00
Clément Vannicatte
7babfe0363
chore(v2): update @docsearch/react (#5135) 2021-07-09 17:52:59 +02:00
Alexey Pyltsyn
9536ef900d
feat(v2): redesign mobile UX: inline TOC + doc sidebar in main menu (#4273)
* feat(v2): mobile TOC

* Bug fixes and various improvements

* Redesign

* extract TOCCollapsible component

* TS improvements

* Assign sidebar name directly to the doc route => no need for either permalinkToSidebar or GlobalData

* revert changes to useWindowSize, fix FOUC issues

* extract DocSidebarDesktop component

* remove now useless menu infima classes

* TOCHeadings => rename + remove unused onClick prop

* Extract DocSidebarItem

* minor renaming

* replace GlobalData usage by a React teleport system to render in the navbar mobile sidebar menu directly from the DocPage component

* useWindowSize => simulate SSR size in dev to make FOUC issues more obvious

* fix remaining sidebar layout shift

* update docs snapshots

* remove unused code translations

* remove unused code translations

* fix minor update-code-translations bug

* Add more build-size paths to watch

* Restyle back button

* Add  missing`menu` class

* extract useShallowMemoizedObject

* fix routes tests + better routes formatting

* use Translate api for labels

* use Translate api for labels

* Update translations

* Improve dark mode support for back button

* Merge branch 'master' into lex111/inline-color-code

# Conflicts:
#	packages/core/dist/css/default-dark/default-dark-rtl.min.css
#	packages/core/dist/css/default-dark/default-dark.min.css
#	packages/core/dist/css/default/default-rtl.min.css
#	packages/core/dist/css/default/default.min.css

* replace useCollapse by new useCollapsible

* Cleanup and use clean-btn for TOCCollapsible button

* Make TOC links clickable over full width

* Cleanup

* fix uncollapsible sidebar that can be collapsed + create <Collapsible> component

* dependency array typo

* rollback sidebars community commit typo

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-07-09 16:50:38 +02:00
Sébastien Lorber
f03479f69e
test(v2): dogfooding: add huge sidebar for testing purposes (#5130)
* dogfoog: add huge sidebar for testing purposes

* Add standalone doc + build-size tracking
2021-07-08 20:26:55 +02:00
Sébastien Lorber
dc9f104ccc
fix(v2): remove webpackConfig.resolve.symlinks: true (#5126)
* remove webpackConfig.resolve.symlinks: true

* Add docs-test docs plugin instance to validate using a symlink folder as docs source is possible

* comment

* useful comments
2021-07-08 18:59:56 +02:00
Sébastien Lorber
7b2723717c
fix(v2): fix d.ts lint error (#5129) 2021-07-08 18:17:53 +02:00
Arijit Kundu
a7b23d94d0
docs(v2): Add Zowe to Showcase (#5121) 2021-07-08 14:40:59 +02:00
Christian Flach
0acbbc3d38
fix(v2): Invalid type definition for injectHtmlTags (#5124)
This was likely a typo, and resulted in the following error when using Typescript strict mode:

node_modules/@docusaurus/types/src/index.d.ts(250,14): error TS7031: Binding element 'Content' implicitly has an 'any' type.
2021-07-08 13:09:55 +02:00
Marçal Junior
f316ff5cd1
refactor(v2): pt-BR: improve semantic doc sidebar and tags (#5118) 2021-07-07 19:48:38 +02:00
Alexey Pyltsyn
237d1a31f5
fix(v2): introduce useCollapsible to fix collapsible animation perf issues (#5116)
* fix(v2): avoid slowdown transition with huge sidebar items

* move useCollapsible to theme-common

* @docusaurus/theme-classic => watch mode should include type-checking

* refactor useCollapsible => encapsulate more behavior / state / ref inside it, making code simpler for component using it

* useCollapseAnimation => animate DOM properties directly instead of using React inline styles => optimize perf from 4 render per click to 1 render per click

* add missing items in deps array

* rename ref to collapsibleRef

* lint

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-07-07 18:50:13 +02:00
Taylor Reece
ef70de18dd
docs(v2): Add Prismatic docs page to showcase. (#5117) 2021-07-06 19:52:44 +02:00
David Zhao
067f3dac7e
docs(v2): Add LiveKit to showcase (#5115)
* added LiveKit to showcase

* Update website/src/data/users.js

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-07-06 14:45:24 +02:00
Przemysław Chojecki
e5bfa2ede2
docs(v2): add Blink Shell Documentation to Showcase (#5114) 2021-07-06 11:48:35 +03:00
Lennart Koopmann
f74e6c5107
docs(v2): clarify how to disable edit links entirely (#5112)
* docs: clarify how to disable edit links entirely

* Update website/docs/api/plugins/plugin-content-docs.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-07-05 12:38:10 +02:00
Philipp Muens
c9d4854ad8
docs(v2): Add CryptoDevHub to Showcase (#5113) 2021-07-05 10:50:54 +02:00
Sébastien Lorber
ed9d2a26f5
misc: monitor site global data with build size bot (#5111) 2021-07-01 18:44:19 +02:00
Sébastien Lorber
fbdeefcac6
fix(v2): Fix update-notifier not run at first and not notifying consistently (#5110)
* Fix update-notifier issues

* update for notifier disabled
2021-07-01 15:37:54 +02:00
Sébastien Lorber
d65cc9d23f
fix(v2): fix SkipToContent programmatic focus when updating querystring (#5104) 2021-06-30 19:37:40 +02:00
Sébastien Lorber
15a2b59f9f
fix(v2): fix redirect plugin when trailingSlash=false for .html extension (#5102)
* another redirect plugin fix when trailingSlash=false

* add comment
2021-06-30 17:22:51 +02:00
Sébastien Lorber
1ec2c95e3d
chore(v2): prepare v2.0.0-beta.3 release (#5098)
* beta.3

* publish guide

* publish guide

* v2.0.0-beta.3
2021-06-30 16:05:49 +02:00
Rami Yushuvaev
9b9f38cd50
docs(v2): Rewrite markdown images section (#5064)
* Rewrite markdown images section

Before it looked like we have two ways to display images, now it's three ways. Each syntax has a separate example.

This way it's clear, I see each method and the code example.

Before there were 2 methods in a single code block.

* fix typo in `markdown-features/markdown-features-assets`

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>

* Rewrite image display section using CommonJS require

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>

* Rewrite image display section using ES imports

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>

* prettier doc

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-30 15:27:44 +02:00
Adam Uhlíř
823b020c34
fix(v2): classic theme - semantic correct anchors links (#5080)
* fix(v2): semantic correct anchors

* chore: ignore linting
2021-06-30 15:24:03 +02:00
Joshua Chen
c3127b65d1
fix(v2): fix typos in swizzle command (#5094)
* Fix typos in swizzle command

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Unnecessary comma

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
2021-06-30 15:20:26 +02:00
Sébastien Lorber
0f144213d6
fix(v2): fix useEffect infinite loop in blogOnly mode (#5097) 2021-06-30 12:50:06 +02:00
Sébastien Lorber
ab3821cb39
fix(v2): fix swizzle readComponent (#5095) 2021-06-30 12:20:57 +02:00
dirslashls
b499331625
docs(v2): Add SQL Frames to the showcase (#5086)
* Update users.js to add SQL Frames to the showcase

* Adding image to showcase
2021-06-30 11:15:58 +02:00
Alexey Pyltsyn
1cecd78f25
feat(v2): add icon to external footer links (#5092) 2021-06-30 10:54:26 +02:00
Sébastien Lorber
e5916dc596
fix(v2): redirect from should work with trailingSlash: true (#5093) 2021-06-30 10:44:03 +02:00
Sébastien Lorber
a78e4f19b2
fix(v2): redirect plugin should emit redirect files with lower precedence than redirect target (#5085)
* revert old behavior of the redirect plugin

* revert old behavior of the redirect plugin
2021-06-29 19:34:55 +02:00
Alexey Pyltsyn
7fe2a9891d
fix(v2): restore previous scroll position on back button click (#5081) 2021-06-29 15:31:25 +02:00
Sébastien Lorber
7592982960
fix(v2): never remove trailing slash from site root like '/baseUrl/' (#5082)
* never apply trailingSlash to site root ('/baseUrl/') => only subroutes

* add deprecation comment for loadContext.baseUrl in favor of loadContext.siteConfig.baseUrl

* commit typo

* useless code
2021-06-29 15:17:23 +02:00
Taylor Reece
41b78466da
fix(v2): sitemap should respect the global trailingSlash config option. (#5068)
* Sitemap should respect the global trailingSlash config option.

* improve tests for createSitemap / trailingSlash

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-29 11:15:00 +02:00
dependabot[bot]
8d7c26fd32
chore(deps): bump prismjs from 1.23.0 to 1.24.0 (#5078)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.23.0...v1.24.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-29 10:26:57 +02:00
Ayush das
632b21bcf6
docs(v2): update installation docs (#5073)
* docs: update installation docs to 2.0.0beta.2

* Update website/docs/installation.md

* Update website/docs/installation.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-06-29 10:20:41 +02:00
Danny Lin
79031af16f
fix(v2): allow negative sidebar positions (#5074)
In some cases, negative sidebar positions can be useful for reversing
the sorting order with minimal maintenance overhead. For example, a docs
folder with changelogs for historical versions should be sorted in
reverse chronological order. This is easy to do for semantic version
numbers by converting them into a negative numerical representation,
e.g. 11.5.1 -> -110501.

The alternative is to make the first version start with a large position
number (e.g. 9999) and decrement it for each version. However, this
requires referring to older versions to get the current sequence number,
thus increasing maintenance overhead. It also makes the number less
intuitive and more prone to error.

Negative sidebar positions work great for this purpose, so make the
front matter validator allow them again as #4796 broke this use case.
2021-06-28 19:59:05 +02:00
Rami Yushuvaev
3fe7389ee2
docs(v2:) Divide markdown-features/code-blocks to smaller sections (#5061)
* Divide `markdown-features/code-blocks` to smaller sections

This PR adds few more heading to split the content to small topics.

This way users like me will be able to scroll directly to the specific section, instead of reading all the documentation.

I add to read the entire section because It was not divided into sections. Not a great user experience.

* Use `<h3>` heading
2021-06-25 19:25:15 +02:00
Sébastien Lorber
4d93c894f2
chore: unstable yarn.lock (#5067)
* fix unstable yarn.lock

* remove useless typescript dep
2021-06-25 16:19:12 +02:00
bperlmutter
1d041127b1
docs(v2): correct typo (#5066) 2021-06-25 16:18:40 +02:00
Alexey Pyltsyn
5883e2b245
fix(v2): restore responsive menu (#5063) 2021-06-25 15:19:23 +02:00
Jules Sam. Randolph
0ae8a09ba5
fix(v2): fix bad @docusaurus/types Plugin type generics (#5058)
* fix(types): type `LoadedPlugin` is not generic

`LoadedPlugin` referenced line 201 is not generic, causing typescript errors on
end-user builds.

* chore(types): add typescript dev dep, tsconfig and a test script

Contributors will no longer inadvertently dump type errors since any IDE should
check types now.

* add missing plugins generic types

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-25 15:18:13 +02:00
Sébastien Lorber
67d31f49e8
fix(v2): fix webpack SSG plugin error thrown due to new URL() / __filename (#5059) 2021-06-25 11:26:36 +02:00
Sébastien Lorber
8e386e0244
chore(v2): upgrade examples to beta.2 (#5057) 2021-06-24 20:02:57 +02:00
Sébastien Lorber
ec2486d2c9
chore(v2): prepare v2.0.0-beta.2 release (#5056)
* prepare beta.2

* v2.0.0-beta.2
2021-06-24 19:39:37 +02:00
Sébastien Lorber
138b4c9975
fix(v2): allow undefined favicon (#5054)
* fix(v2): allow undefined favicon

* fix snapshots
2021-06-24 18:50:28 +02:00
Sébastien Lorber
05c85c7be7
refactor(v2): remove deprecated docs option excludeNextVersionDocs (#5053) 2021-06-24 18:41:13 +02:00
Joshua Chen
462b1cf2bc
style(v2): reduce number of ESLint warnings (#4993)
* Initial work

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* More fixes

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Update packages/docusaurus-theme-classic/src/theme/ThemedImage/index.tsx

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>

* Update packages/docusaurus-theme-bootstrap/src/theme/ThemedImage/index.tsx

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>

* Fix

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Replace versionPathPart with function

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Prefer non-null assertions

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Substitute for-of with forEach

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Fill `catch` block with placeholder comment

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Ignore local require

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Revert global require change

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Tighten eslint disable range

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Make eslint ignore examples and more tolerating to templates

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Use reduce to handle doc items sequentially

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Revert "Use reduce to handle doc items sequentially"

This reverts commit c7525d463b.

* Address change requests

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-06-24 18:12:48 +02:00
Sébastien Lorber
364051f232
feat(v2): docs version banner configuration option (#5052)
* refactor DocVersionBanner => versionMetadata prop should be forwarded instead of using "useActiveVersion" + global data

* docs version banner configuration

* add doc for versions.banner

* fix tests

* improve docs plugin option api doc
2021-06-24 18:04:16 +02:00