diff --git a/CHANGELOG.md b/CHANGELOG.md index 9992b28ec895..f30ba836d46b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,224 @@ # Docusaurus 2 Changelog +## 2.0.0-beta.18 (2022-03-25) + +#### :rocket: New Feature + +- `docusaurus-mdx-loader`, `docusaurus-theme-classic` + - [#6990](https://github.com/facebook/docusaurus/pull/6990) feat: lazy-load external images + ability to customize image display ([@slorber](https://github.com/slorber)) +- `docusaurus-module-type-aliases`, `docusaurus-plugin-content-docs`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-types`, `docusaurus` + - [#6933](https://github.com/facebook/docusaurus/pull/6933) feat(core,theme): useRouteContext + HtmlClassNameProvider ([@slorber](https://github.com/slorber)) +- `docusaurus-plugin-debug`, `docusaurus-plugin-google-analytics`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-theme-classic`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-search-algolia`, `docusaurus-types`, `docusaurus` + - [#6921](https://github.com/facebook/docusaurus/pull/6921) feat(core): allow plugin lifecycles to return relative paths ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-classic` + - [#6697](https://github.com/facebook/docusaurus/pull/6697) feat: add SEO microdata for doc breadcrumbs ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6842](https://github.com/facebook/docusaurus/pull/6842) feat(theme-classic): MDXContent wrapper component ([@slorber](https://github.com/slorber)) +- `docusaurus-plugin-content-docs` + - [#6780](https://github.com/facebook/docusaurus/pull/6780) feat(content-docs): allow custom props through _category_.json ([@taejs](https://github.com/taejs)) + +#### :boom: Breaking Change + +- `docusaurus-plugin-content-docs` + - [#6859](https://github.com/facebook/docusaurus/pull/6859) feat(content-docs): autogenerate category with linked doc metadata as fallback ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-classic` + - [#6989](https://github.com/facebook/docusaurus/pull/6989) refactor: extract MDX components ([@slorber](https://github.com/slorber)) +- `docusaurus-module-type-aliases`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-search-algolia`, `docusaurus` + - [#6925](https://github.com/facebook/docusaurus/pull/6925) refactor(theme-{classic,common}): refactor site/page/search metadata + apply className on html element ([@slorber](https://github.com/slorber)) +- `docusaurus-theme-classic`, `docusaurus-theme-common` + - [#6895](https://github.com/facebook/docusaurus/pull/6895) refactor(theme-{classic,common}): split navbar into smaller components + cleanup + swizzle config ([@slorber](https://github.com/slorber)) + - [#6930](https://github.com/facebook/docusaurus/pull/6930) refactor(theme-{classic,common}): refactor ColorModeToggle + useColorMode() hook ([@lex111](https://github.com/lex111)) + +#### :bug: Bug Fix + +- `docusaurus` + - [#6993](https://github.com/facebook/docusaurus/pull/6993) fix(core): prevent useBaseUrl returning /base/base when on /base ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6936](https://github.com/facebook/docusaurus/pull/6936) fix: remove semicolon from HTML output ([@lex111](https://github.com/lex111)) + - [#6849](https://github.com/facebook/docusaurus/pull/6849) fix(cli): write-heading-id should not generate colliding slugs when not overwriting ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-classic` + - [#6983](https://github.com/facebook/docusaurus/pull/6983) fix(search): bump Infima, fix search issue due to broken CSS selector ([@slorber](https://github.com/slorber)) +- `docusaurus-utils-validation` + - [#6977](https://github.com/facebook/docusaurus/pull/6977) fix(validation): allow non-object params to remark/rehype plugins ([@aloisklink](https://github.com/aloisklink)) +- `docusaurus-plugin-content-docs`, `docusaurus-utils` + - [#6973](https://github.com/facebook/docusaurus/pull/6973) fix(content-docs): suppress git error on multiple occurrences ([@felipecrs](https://github.com/felipecrs)) +- `docusaurus-plugin-content-blog` + - [#6947](https://github.com/facebook/docusaurus/pull/6947) fix(content-blog): only create archive route if there are blog posts ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6918](https://github.com/facebook/docusaurus/pull/6918) fix(content-blog): remove double leading slash in blog-only paginated view ([@heowc](https://github.com/heowc)) +- `docusaurus-theme-search-algolia` + - [#6888](https://github.com/facebook/docusaurus/pull/6888) fix(theme-algolia): declare content-docs as dependency ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-translations` + - [#6847](https://github.com/facebook/docusaurus/pull/6847) fix: minor Chinese translation fixes ([@rccttwd](https://github.com/rccttwd)) + +#### :nail_care: Polish + +- `docusaurus-plugin-content-docs` + - [#6859](https://github.com/facebook/docusaurus/pull/6859) feat(content-docs): autogenerate category with linked doc metadata as fallback ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6887](https://github.com/facebook/docusaurus/pull/6887) fix(content-docs): give context about sidebar loading failure ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-content-docs`, `docusaurus-utils-validation`, `docusaurus` + - [#6997](https://github.com/facebook/docusaurus/pull/6997) fix(validation): improve error messages for a few schemas ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-classic` + - [#6971](https://github.com/facebook/docusaurus/pull/6971) refactor: improve a11y of dropdown menu ([@lex111](https://github.com/lex111)) + - [#6987](https://github.com/facebook/docusaurus/pull/6987) refactor(theme-classic): cleanup of code blocks ([@lex111](https://github.com/lex111)) + - [#6950](https://github.com/facebook/docusaurus/pull/6950) refactor(theme-classic): clean up CSS of doc cards ([@lex111](https://github.com/lex111)) + - [#6994](https://github.com/facebook/docusaurus/pull/6994) refactor: better external link icon positioning ([@lex111](https://github.com/lex111)) + - [#6989](https://github.com/facebook/docusaurus/pull/6989) refactor: extract MDX components ([@slorber](https://github.com/slorber)) + - [#6985](https://github.com/facebook/docusaurus/pull/6985) refactor(theme-classic): remove span wrappers from layout links ([@lex111](https://github.com/lex111)) + - [#6986](https://github.com/facebook/docusaurus/pull/6986) fix(theme-classic): minor code copy button improvements ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6964](https://github.com/facebook/docusaurus/pull/6964) refactor: replace text-based copy code button with icons ([@lex111](https://github.com/lex111)) + - [#6932](https://github.com/facebook/docusaurus/pull/6932) refactor(theme-classic): little breadcrumbs improvements ([@lex111](https://github.com/lex111)) + - [#6914](https://github.com/facebook/docusaurus/pull/6914) feat(theme-classic): set aria-expanded on expandable sidebar categories ([@pkowaluk](https://github.com/pkowaluk)) + - [#6844](https://github.com/facebook/docusaurus/pull/6844) refactor(theme-classic): split sidebar into smaller parts ([@slorber](https://github.com/slorber)) + - [#6846](https://github.com/facebook/docusaurus/pull/6846) refactor(theme-classic): consistently add span wrapper for layout links ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-theme-classic`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus` + - [#6980](https://github.com/facebook/docusaurus/pull/6980) feat(utils): JSDoc for all APIs ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-common` + - [#6974](https://github.com/facebook/docusaurus/pull/6974) feat(theme-common): JSDoc for all APIs ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus` + - [#6784](https://github.com/facebook/docusaurus/pull/6784) feat(core): allow configureWebpack to return undefined ([@yorkie](https://github.com/yorkie)) + - [#6941](https://github.com/facebook/docusaurus/pull/6941) refactor(core): improve error message when a page has no default-export ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6878](https://github.com/facebook/docusaurus/pull/6878) fix(core): ensure stable webpack theme aliases sorting ([@jrvidal](https://github.com/jrvidal)) + - [#6854](https://github.com/facebook/docusaurus/pull/6854) fix(core): fix swizzle legend typo ([@DigiPie](https://github.com/DigiPie)) + - [#6850](https://github.com/facebook/docusaurus/pull/6850) fix(core): make plugin lifecycles consistently bound to the plugin instance ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-utils` + - [#6937](https://github.com/facebook/docusaurus/pull/6937) fix(content-docs): warn when files are not tracked ([@felipecrs](https://github.com/felipecrs)) +- `docusaurus-module-type-aliases`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-search-algolia`, `docusaurus` + - [#6925](https://github.com/facebook/docusaurus/pull/6925) refactor(theme-{classic,common}): refactor site/page/search metadata + apply className on html element ([@slorber](https://github.com/slorber)) +- `docusaurus-theme-classic`, `docusaurus-theme-common` + - [#6895](https://github.com/facebook/docusaurus/pull/6895) refactor(theme-{classic,common}): split navbar into smaller components + cleanup + swizzle config ([@slorber](https://github.com/slorber)) + - [#6930](https://github.com/facebook/docusaurus/pull/6930) refactor(theme-{classic,common}): refactor ColorModeToggle + useColorMode() hook ([@lex111](https://github.com/lex111)) + - [#6894](https://github.com/facebook/docusaurus/pull/6894) refactor(theme-classic): split theme footer into smaller components + swizzle config ([@slorber](https://github.com/slorber)) +- `docusaurus-types`, `docusaurus` + - [#6929](https://github.com/facebook/docusaurus/pull/6929) refactor(core): minor routes type improvement ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-client-redirects`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-plugin-sitemap` + - [#6928](https://github.com/facebook/docusaurus/pull/6928) chore(pwa, sitemap, client-redirects, ideal-image): JSDoc for types ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-content-blog`, `docusaurus-theme-classic`, `docusaurus-utils` + - [#6922](https://github.com/facebook/docusaurus/pull/6922) refactor(content-blog): clean up type definitions; in-code documentation ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-translations` + - [#6781](https://github.com/facebook/docusaurus/pull/6781) feat(theme-translations): complete Russian translations ([@dragomano](https://github.com/dragomano)) + - [#6877](https://github.com/facebook/docusaurus/pull/6877) chore(theme-translations): complete Vietnamese translations ([@datlechin](https://github.com/datlechin)) +- `docusaurus-plugin-content-blog` + - [#6909](https://github.com/facebook/docusaurus/pull/6909) refactor(content-blog): improve error message of authors map validation ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus` + - [#6860](https://github.com/facebook/docusaurus/pull/6860) fix(create): load entry file after node version checking ([@taejs](https://github.com/taejs)) + +#### :memo: Documentation + +- Other + - [#6988](https://github.com/facebook/docusaurus/pull/6988) docs: fix example admonition syntax ([@kaycebasques](https://github.com/kaycebasques)) + - [#6978](https://github.com/facebook/docusaurus/pull/6978) docs: npm run tsc -> npx tsc ([@jadonn](https://github.com/jadonn)) + - [#6952](https://github.com/facebook/docusaurus/pull/6952) docs: add K3ai to showcase ([@alefesta](https://github.com/alefesta)) + - [#6948](https://github.com/facebook/docusaurus/pull/6948) docs: add pdfme docs to showcase ([@hand-dot](https://github.com/hand-dot)) + - [#6943](https://github.com/facebook/docusaurus/pull/6943) docs: add SeaORM docs to showcase ([@billy1624](https://github.com/billy1624)) + - [#6926](https://github.com/facebook/docusaurus/pull/6926) docs: clarify the usage of slug ([@kaycebasques](https://github.com/kaycebasques)) + - [#6911](https://github.com/facebook/docusaurus/pull/6911) docs: add Reactive Button site to showcase ([@arifszn](https://github.com/arifszn)) + - [#6904](https://github.com/facebook/docusaurus/pull/6904) docs: update image for digital support services ([@PatelN123](https://github.com/PatelN123)) + - [#6892](https://github.com/facebook/docusaurus/pull/6892) docs: add EduLinks site to showcase ([@odarpi](https://github.com/odarpi)) + - [#6889](https://github.com/facebook/docusaurus/pull/6889) docs: editorial fixes ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6883](https://github.com/facebook/docusaurus/pull/6883) docs(cli): add info about development on github codespaces ([@vedantmgoyal2009](https://github.com/vedantmgoyal2009)) + - [#6856](https://github.com/facebook/docusaurus/pull/6856) docs: add Reddit Image Fetcher site to showcase ([@arifszn](https://github.com/arifszn)) + - [#6875](https://github.com/facebook/docusaurus/pull/6875) docs: update TRPG Engine showcase ([@moonrailgun](https://github.com/moonrailgun)) + - [#6871](https://github.com/facebook/docusaurus/pull/6871) docs: mark clutch and gulp as open-source ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6862](https://github.com/facebook/docusaurus/pull/6862) docs: update showcase data ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6837](https://github.com/facebook/docusaurus/pull/6837) docs: add PcapPlusPlus to showcase ([@seladb](https://github.com/seladb)) + - [#6832](https://github.com/facebook/docusaurus/pull/6832) docs: add Spicetify site to showcase ([@afonsojramos](https://github.com/afonsojramos)) + - [#6830](https://github.com/facebook/docusaurus/pull/6830) docs: simplify imported code blocks syntax ([@nathan-contino-mongo](https://github.com/nathan-contino-mongo)) +- `docusaurus-types` + - [#6881](https://github.com/facebook/docusaurus/pull/6881) docs: mention configureWebpack devServer return value ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus` + - [#6833](https://github.com/facebook/docusaurus/pull/6833) docs: make tutorial code block directly copyable ([@samgutentag](https://github.com/samgutentag)) + +#### :house: Internal + +- `create-docusaurus`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-module-type-aliases`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-debug`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-ideal-image`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-types`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`, `lqip-loader` + - [#6995](https://github.com/facebook/docusaurus/pull/6995) refactor: ensure all types are using index signature instead of Record ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus`, `docusaurus-cssnano-preset`, `docusaurus-plugin-pwa`, `docusaurus-theme-search-algolia`, `docusaurus-utils`, `docusaurus`, `lqip-loader` + - [#6991](https://github.com/facebook/docusaurus/pull/6991) chore: upgrade dependencies ([@Josh-Cena](https://github.com/Josh-Cena)) +- `lqip-loader` + - [#6992](https://github.com/facebook/docusaurus/pull/6992) refactor(lqip-loader): remove unused palette option ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus` + - [#6975](https://github.com/facebook/docusaurus/pull/6975) chore: update static-site-generator-webpack-plugin ([@slorber](https://github.com/slorber)) +- `stylelint-copyright` + - [#6967](https://github.com/facebook/docusaurus/pull/6967) chore: publish stylelint-copyright again ([@slorber](https://github.com/slorber)) +- `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-google-analytics`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-plugin-sitemap`, `docusaurus-theme-classic`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-search-algolia`, `docusaurus-types`, `docusaurus-utils-validation`, `docusaurus` + - [#6961](https://github.com/facebook/docusaurus/pull/6961) refactor: unify how validateOptions is handled ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-types` + - [#6957](https://github.com/facebook/docusaurus/pull/6957) chore(types): remove querystring from dependencies ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-common`, `docusaurus` + - [#6956](https://github.com/facebook/docusaurus/pull/6956) test: improve test coverage; reorder theme-common files ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6955](https://github.com/facebook/docusaurus/pull/6955) refactor(core): move browserContext and docusaurusContext out of client exports ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6944](https://github.com/facebook/docusaurus/pull/6944) chore: migrate Jest and website to SWC ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-utils` + - [#6951](https://github.com/facebook/docusaurus/pull/6951) test: fix Windows test for gitUtils ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-debug`, `docusaurus-plugin-pwa`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-translations`, `docusaurus-utils`, `docusaurus`, `stylelint-copyright` + - [#6931](https://github.com/facebook/docusaurus/pull/6931) chore: tighten ESLint config ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-module-type-aliases`, `docusaurus-plugin-client-redirects` + - [#6924](https://github.com/facebook/docusaurus/pull/6924) refactor(client-redirects): migrate validation to validateOptions lifecycle ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus`, `docusaurus-cssnano-preset`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-theme-classic`, `docusaurus-theme-search-algolia`, `docusaurus-utils`, `docusaurus`, `lqip-loader` + - [#6916](https://github.com/facebook/docusaurus/pull/6916) chore: upgrade dependencies ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus`, `docusaurus-plugin-content-docs`, `docusaurus-theme-translations`, `docusaurus-types`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`, `stylelint-copyright` + - [#6912](https://github.com/facebook/docusaurus/pull/6912) test: improve test coverage; multiple internal refactors ([@Josh-Cena](https://github.com/Josh-Cena)) +- Other + - [#6910](https://github.com/facebook/docusaurus/pull/6910) refactor: convert Jest infrastructure to TS ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6838](https://github.com/facebook/docusaurus/pull/6838) fix(website): changelog plugin leads to CI bugs on release ([@slorber](https://github.com/slorber)) +- `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-utils`, `docusaurus` + - [#6908](https://github.com/facebook/docusaurus/pull/6908) chore: do not print prototype in jest snapshot ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-migrate`, `docusaurus-plugin-content-docs`, `docusaurus-theme-common`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus` + - [#6906](https://github.com/facebook/docusaurus/pull/6906) refactor: install eslint-plugin-regexp ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-mdx-loader`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-docs`, `docusaurus-theme-common`, `docusaurus-theme-search-algolia`, `docusaurus-utils`, `docusaurus` + - [#6905](https://github.com/facebook/docusaurus/pull/6905) test: improve test coverage; properly test core client APIs ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-sitemap`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-translations`, `docusaurus-utils`, `docusaurus` + - [#6903](https://github.com/facebook/docusaurus/pull/6903) chore: spell-check test files ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-migrate`, `docusaurus-module-type-aliases`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-theme-common`, `docusaurus-types`, `docusaurus-utils-common`, `docusaurus-utils`, `docusaurus`, `lqip-loader` + - [#6902](https://github.com/facebook/docusaurus/pull/6902) test(theme-common): improve test coverage ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-cssnano-preset`, `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-sitemap`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-utils-common`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`, `lqip-loader`, `stylelint-copyright` + - [#6900](https://github.com/facebook/docusaurus/pull/6900) test: enable a few jest eslint rules ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-translations`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`, `lqip-loader` + - [#6898](https://github.com/facebook/docusaurus/pull/6898) refactor: import jest as global; unify import style of some modules ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-classic`, `docusaurus-theme-common` + - [#6891](https://github.com/facebook/docusaurus/pull/6891) refactor(theme-classic): avoid using clsx class dict with CSS modules ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-migrate`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-theme-translations`, `docusaurus-utils`, `docusaurus` + - [#6880](https://github.com/facebook/docusaurus/pull/6880) refactor: prefer fs.outputFile to ensureDir + writeFile ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-pwa`, `docusaurus-types`, `docusaurus` + - [#6866](https://github.com/facebook/docusaurus/pull/6866) refactor: improve types ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-mdx-loader`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-pwa`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-types`, `docusaurus`, `lqip-loader` + - [#6864](https://github.com/facebook/docusaurus/pull/6864) refactor: remove unnecessary default values normalized during validation ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus`, `docusaurus-migrate`, `docusaurus` + - [#6861](https://github.com/facebook/docusaurus/pull/6861) refactor: make JS executables included in the tsconfig for editor hints ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-types`, `docusaurus` + - [#6857](https://github.com/facebook/docusaurus/pull/6857) test: improve test coverage ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-search-algolia`, `docusaurus-utils-common`, `docusaurus-utils`, `docusaurus`, `lqip-loader` + - [#6852](https://github.com/facebook/docusaurus/pull/6852) refactor: enable a few TS flags ([@Josh-Cena](https://github.com/Josh-Cena)) + +#### Committers: 28 + +- Afonso Jorge Ramos ([@afonsojramos](https://github.com/afonsojramos)) +- Alessandro Festa ([@alefesta](https://github.com/alefesta)) +- Alexey Pyltsyn ([@lex111](https://github.com/lex111)) +- Alois Klink ([@aloisklink](https://github.com/aloisklink)) +- Ariful Alam ([@arifszn](https://github.com/arifszn)) +- Begula ([@vedantmgoyal2009](https://github.com/vedantmgoyal2009)) +- Billy Chan ([@billy1624](https://github.com/billy1624)) +- Bugo ([@dragomano](https://github.com/dragomano)) +- Evan ([@DigiPie](https://github.com/DigiPie)) +- Felipe Santos ([@felipecrs](https://github.com/felipecrs)) +- Jadon N ([@jadonn](https://github.com/jadonn)) +- Joshua Chen ([@Josh-Cena](https://github.com/Josh-Cena)) +- Kayce Basques ([@kaycebasques](https://github.com/kaycebasques)) +- Kyohei Fukuda ([@hand-dot](https://github.com/hand-dot)) +- Nayan Patel ([@PatelN123](https://github.com/PatelN123)) +- Ngô Quốc Đạt ([@datlechin](https://github.com/datlechin)) +- Odarpi ([@odarpi](https://github.com/odarpi)) +- Pawel Kowaluk ([@pkowaluk](https://github.com/pkowaluk)) +- Roberto Vidal ([@jrvidal](https://github.com/jrvidal)) +- Sam Gutentag ([@samgutentag](https://github.com/samgutentag)) +- Sébastien Lorber ([@slorber](https://github.com/slorber)) +- Tsz W. TAM ([@rccttwd](https://github.com/rccttwd)) +- WonChul Heo ([@heowc](https://github.com/heowc)) +- Yorkie Liu ([@yorkie](https://github.com/yorkie)) +- [@seladb](https://github.com/seladb) +- moonrailgun ([@moonrailgun](https://github.com/moonrailgun)) +- nate contino ([@nathan-contino-mongo](https://github.com/nathan-contino-mongo)) +- tae ([@taejs](https://github.com/taejs)) + ## 2.0.0-beta.17 (2022-03-03) #### :rocket: New Feature diff --git a/admin/new.docusaurus.io/package.json b/admin/new.docusaurus.io/package.json index 16c6bd0abef5..b756cdbeea9e 100644 --- a/admin/new.docusaurus.io/package.json +++ b/admin/new.docusaurus.io/package.json @@ -1,6 +1,6 @@ { "name": "new.docusaurus.io", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "private": true, "scripts": { "start": "netlify dev" diff --git a/lerna.json b/lerna.json index cb868eb2e866..a6c855450b0b 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "npmClient": "yarn", "useWorkspaces": true, "changelog": { diff --git a/packages/create-docusaurus/package.json b/packages/create-docusaurus/package.json index 418329635a2f..e9d943f4b5c3 100755 --- a/packages/create-docusaurus/package.json +++ b/packages/create-docusaurus/package.json @@ -1,6 +1,6 @@ { "name": "create-docusaurus", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Create Docusaurus apps easily.", "type": "module", "repository": { @@ -22,7 +22,7 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/logger": "2.0.0-beta.17", + "@docusaurus/logger": "2.0.0-beta.18", "commander": "^5.1.0", "fs-extra": "^10.0.1", "lodash": "^4.17.21", diff --git a/packages/create-docusaurus/templates/classic-typescript/package.json b/packages/create-docusaurus/templates/classic-typescript/package.json index acfd86d994c4..519ecaed3b66 100644 --- a/packages/create-docusaurus/templates/classic-typescript/package.json +++ b/packages/create-docusaurus/templates/classic-typescript/package.json @@ -1,6 +1,6 @@ { "name": "docusaurus-2-classic-typescript-template", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "private": true, "scripts": { "docusaurus": "docusaurus", @@ -15,8 +15,8 @@ "typecheck": "tsc" }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/preset-classic": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/preset-classic": "2.0.0-beta.18", "@mdx-js/react": "^1.6.22", "clsx": "^1.1.1", "prism-react-renderer": "^1.3.1", @@ -24,7 +24,7 @@ "react-dom": "^17.0.2" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.17", + "@docusaurus/module-type-aliases": "2.0.0-beta.18", "@tsconfig/docusaurus": "^1.0.5", "typescript": "^4.6.3" }, diff --git a/packages/create-docusaurus/templates/classic/package.json b/packages/create-docusaurus/templates/classic/package.json index b2e3ecb8df4c..56e16d39efaa 100644 --- a/packages/create-docusaurus/templates/classic/package.json +++ b/packages/create-docusaurus/templates/classic/package.json @@ -1,6 +1,6 @@ { "name": "docusaurus-2-classic-template", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "private": true, "scripts": { "docusaurus": "docusaurus", @@ -14,8 +14,8 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/preset-classic": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/preset-classic": "2.0.0-beta.18", "@mdx-js/react": "^1.6.22", "clsx": "^1.1.1", "prism-react-renderer": "^1.3.1", diff --git a/packages/create-docusaurus/templates/facebook/package.json b/packages/create-docusaurus/templates/facebook/package.json index 2c547bd44f61..38bd9866b0af 100644 --- a/packages/create-docusaurus/templates/facebook/package.json +++ b/packages/create-docusaurus/templates/facebook/package.json @@ -1,6 +1,6 @@ { "name": "docusaurus-2-facebook-template", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "private": true, "scripts": { "docusaurus": "docusaurus", @@ -18,8 +18,8 @@ "format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\"" }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/preset-classic": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/preset-classic": "2.0.0-beta.18", "@mdx-js/react": "^1.6.22", "clsx": "^1.1.1", "react": "^17.0.2", diff --git a/packages/docusaurus-cssnano-preset/package.json b/packages/docusaurus-cssnano-preset/package.json index b42011147953..43d2f19522ff 100644 --- a/packages/docusaurus-cssnano-preset/package.json +++ b/packages/docusaurus-cssnano-preset/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/cssnano-preset", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Advanced cssnano preset for maximum optimization.", "main": "index.js", "license": "MIT", diff --git a/packages/docusaurus-logger/package.json b/packages/docusaurus-logger/package.json index c43d320fcab9..238e44277965 100644 --- a/packages/docusaurus-logger/package.json +++ b/packages/docusaurus-logger/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/logger", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "An encapsulated logger for semantically formatting console messages.", "main": "./lib/index.js", "repository": { diff --git a/packages/docusaurus-mdx-loader/package.json b/packages/docusaurus-mdx-loader/package.json index 0472d7bfefb8..1215aed4270e 100644 --- a/packages/docusaurus-mdx-loader/package.json +++ b/packages/docusaurus-mdx-loader/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/mdx-loader", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Docusaurus Loader for MDX", "main": "lib/index.js", "types": "src/mdx-loader.d.ts", @@ -20,8 +20,8 @@ "dependencies": { "@babel/parser": "^7.17.8", "@babel/traverse": "^7.17.3", - "@docusaurus/logger": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", + "@docusaurus/logger": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", "@mdx-js/mdx": "^1.6.22", "escape-html": "^1.0.3", "file-loader": "^6.2.0", @@ -36,7 +36,7 @@ "webpack": "^5.70.0" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.17", + "@docusaurus/types": "2.0.0-beta.18", "@types/escape-html": "^1.0.1", "@types/mdast": "^3.0.10", "@types/stringify-object": "^3.3.1", diff --git a/packages/docusaurus-migrate/package.json b/packages/docusaurus-migrate/package.json index 4ae500341ba1..01457dd55b72 100644 --- a/packages/docusaurus-migrate/package.json +++ b/packages/docusaurus-migrate/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/migrate", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "A CLI tool to migrate from older versions of Docusaurus.", "license": "MIT", "engines": { @@ -23,8 +23,8 @@ }, "dependencies": { "@babel/preset-env": "^7.16.11", - "@docusaurus/logger": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", + "@docusaurus/logger": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", "@mapbox/hast-util-to-jsx": "^2.0.0", "color": "^4.2.1", "commander": "^5.1.0", diff --git a/packages/docusaurus-module-type-aliases/package.json b/packages/docusaurus-module-type-aliases/package.json index 44cb25e3a571..f15a3a6c7685 100644 --- a/packages/docusaurus-module-type-aliases/package.json +++ b/packages/docusaurus-module-type-aliases/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/module-type-aliases", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Docusaurus module type aliases.", "types": "./src/index.d.ts", "publishConfig": { @@ -12,7 +12,7 @@ "directory": "packages/docusaurus-module-type-aliases" }, "dependencies": { - "@docusaurus/types": "2.0.0-beta.17", + "@docusaurus/types": "2.0.0-beta.18", "@types/react": "*", "@types/react-router-config": "*", "@types/react-router-dom": "*", diff --git a/packages/docusaurus-plugin-client-redirects/package.json b/packages/docusaurus-plugin-client-redirects/package.json index 20b2aedbcf38..3bee353ebe93 100644 --- a/packages/docusaurus-plugin-client-redirects/package.json +++ b/packages/docusaurus-plugin-client-redirects/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-client-redirects", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Client redirects plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-client-redirects.d.ts", @@ -18,18 +18,18 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/logger": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", - "@docusaurus/utils-common": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/logger": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", + "@docusaurus/utils-common": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "eta": "^1.12.3", "fs-extra": "^10.0.1", "lodash": "^4.17.21", "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.17" + "@docusaurus/types": "2.0.0-beta.18" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-plugin-content-blog/package.json b/packages/docusaurus-plugin-content-blog/package.json index 88af116f4d2f..4dffa1a94040 100644 --- a/packages/docusaurus-plugin-content-blog/package.json +++ b/packages/docusaurus-plugin-content-blog/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-content-blog", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Blog plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-content-blog.d.ts", @@ -18,12 +18,12 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/logger": "2.0.0-beta.17", - "@docusaurus/mdx-loader": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", - "@docusaurus/utils-common": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/logger": "2.0.0-beta.18", + "@docusaurus/mdx-loader": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", + "@docusaurus/utils-common": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "cheerio": "^1.0.0-rc.10", "feed": "^4.2.2", "fs-extra": "^10.0.1", @@ -35,7 +35,7 @@ "webpack": "^5.70.0" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.17", + "@docusaurus/types": "2.0.0-beta.18", "escape-string-regexp": "^4.0.0" }, "peerDependencies": { diff --git a/packages/docusaurus-plugin-content-docs/package.json b/packages/docusaurus-plugin-content-docs/package.json index 522135a1d0a3..c080891df07f 100644 --- a/packages/docusaurus-plugin-content-docs/package.json +++ b/packages/docusaurus-plugin-content-docs/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-content-docs", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Docs plugin for Docusaurus.", "main": "lib/index.js", "exports": { @@ -23,11 +23,11 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/logger": "2.0.0-beta.17", - "@docusaurus/mdx-loader": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/logger": "2.0.0-beta.18", + "@docusaurus/mdx-loader": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "combine-promises": "^1.1.0", "fs-extra": "^10.0.1", "import-fresh": "^3.3.0", @@ -39,8 +39,8 @@ "webpack": "^5.70.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.17", - "@docusaurus/types": "2.0.0-beta.17", + "@docusaurus/module-type-aliases": "2.0.0-beta.18", + "@docusaurus/types": "2.0.0-beta.18", "@types/js-yaml": "^4.0.5", "@types/picomatch": "^2.3.0", "commander": "^5.1.0", diff --git a/packages/docusaurus-plugin-content-pages/package.json b/packages/docusaurus-plugin-content-pages/package.json index 29a27364c5be..8cc6de8765f0 100644 --- a/packages/docusaurus-plugin-content-pages/package.json +++ b/packages/docusaurus-plugin-content-pages/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-content-pages", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Pages plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-content-pages.d.ts", @@ -18,17 +18,17 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/mdx-loader": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/mdx-loader": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "fs-extra": "^10.0.1", "remark-admonitions": "^1.2.1", "tslib": "^2.3.1", "webpack": "^5.70.0" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.17" + "@docusaurus/types": "2.0.0-beta.18" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-plugin-debug/package.json b/packages/docusaurus-plugin-debug/package.json index bdcad0c78251..3a99d1b859a3 100644 --- a/packages/docusaurus-plugin-debug/package.json +++ b/packages/docusaurus-plugin-debug/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-debug", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Debug plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-debug.d.ts", @@ -18,14 +18,14 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", "fs-extra": "^10.0.1", "react-json-view": "^1.21.3", "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.17" + "@docusaurus/types": "2.0.0-beta.18" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-plugin-google-analytics/package.json b/packages/docusaurus-plugin-google-analytics/package.json index 22799299275c..7dfbc3578232 100644 --- a/packages/docusaurus-plugin-google-analytics/package.json +++ b/packages/docusaurus-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-google-analytics", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Global analytics (analytics.js) plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-google-analytics.d.ts", @@ -18,12 +18,12 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.17" + "@docusaurus/types": "2.0.0-beta.18" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-plugin-google-gtag/package.json b/packages/docusaurus-plugin-google-gtag/package.json index 72d03781ed89..925a196a9e9e 100644 --- a/packages/docusaurus-plugin-google-gtag/package.json +++ b/packages/docusaurus-plugin-google-gtag/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-google-gtag", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Global Site Tag (gtag.js) plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-google-gtag.d.ts", @@ -18,12 +18,12 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.17" + "@docusaurus/types": "2.0.0-beta.18" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-plugin-ideal-image/package.json b/packages/docusaurus-plugin-ideal-image/package.json index 8a00967829e3..18044e5c43ad 100644 --- a/packages/docusaurus-plugin-ideal-image/package.json +++ b/packages/docusaurus-plugin-ideal-image/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-ideal-image", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder).", "main": "lib/index.js", "types": "src/plugin-ideal-image.d.ts", @@ -21,11 +21,11 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/lqip-loader": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/lqip-loader": "2.0.0-beta.18", "@docusaurus/responsive-loader": "^1.7.0", - "@docusaurus/theme-translations": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/theme-translations": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "@endiliey/react-ideal-image": "^0.0.11", "react-waypoint": "^10.1.0", "sharp": "^0.30.3", @@ -33,8 +33,8 @@ "webpack": "^5.70.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.17", - "@docusaurus/types": "2.0.0-beta.17", + "@docusaurus/module-type-aliases": "2.0.0-beta.18", + "@docusaurus/types": "2.0.0-beta.18", "fs-extra": "^10.0.1" }, "peerDependencies": { diff --git a/packages/docusaurus-plugin-pwa/package.json b/packages/docusaurus-plugin-pwa/package.json index 0c29557a51bb..3150d85f7df8 100644 --- a/packages/docusaurus-plugin-pwa/package.json +++ b/packages/docusaurus-plugin-pwa/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-pwa", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Docusaurus Plugin to add PWA support.", "main": "lib/index.js", "types": "src/plugin-pwa.d.ts", @@ -22,11 +22,11 @@ "dependencies": { "@babel/core": "^7.17.8", "@babel/preset-env": "^7.16.11", - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/theme-common": "2.0.0-beta.17", - "@docusaurus/theme-translations": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/theme-common": "2.0.0-beta.18", + "@docusaurus/theme-translations": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "babel-loader": "^8.2.4", "clsx": "^1.1.1", "core-js": "^3.21.1", @@ -39,7 +39,7 @@ "workbox-window": "^6.5.2" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.17", + "@docusaurus/module-type-aliases": "2.0.0-beta.18", "fs-extra": "^10.0.1" }, "peerDependencies": { diff --git a/packages/docusaurus-plugin-sitemap/package.json b/packages/docusaurus-plugin-sitemap/package.json index fd186fa89048..9eb611ed0126 100644 --- a/packages/docusaurus-plugin-sitemap/package.json +++ b/packages/docusaurus-plugin-sitemap/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-sitemap", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Simple sitemap generation plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-sitemap.d.ts", @@ -18,16 +18,16 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", - "@docusaurus/utils-common": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", + "@docusaurus/utils-common": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "fs-extra": "^10.0.1", "sitemap": "^7.1.1", "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.17" + "@docusaurus/types": "2.0.0-beta.18" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-preset-classic/package.json b/packages/docusaurus-preset-classic/package.json index 59187fb486d3..850c52f9e030 100644 --- a/packages/docusaurus-preset-classic/package.json +++ b/packages/docusaurus-preset-classic/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/preset-classic", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Classic preset for Docusaurus.", "main": "lib/index.js", "types": "src/preset-classic.d.ts", @@ -18,17 +18,17 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/plugin-content-blog": "2.0.0-beta.17", - "@docusaurus/plugin-content-docs": "2.0.0-beta.17", - "@docusaurus/plugin-content-pages": "2.0.0-beta.17", - "@docusaurus/plugin-debug": "2.0.0-beta.17", - "@docusaurus/plugin-google-analytics": "2.0.0-beta.17", - "@docusaurus/plugin-google-gtag": "2.0.0-beta.17", - "@docusaurus/plugin-sitemap": "2.0.0-beta.17", - "@docusaurus/theme-classic": "2.0.0-beta.17", - "@docusaurus/theme-common": "2.0.0-beta.17", - "@docusaurus/theme-search-algolia": "2.0.0-beta.17" + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/plugin-content-blog": "2.0.0-beta.18", + "@docusaurus/plugin-content-docs": "2.0.0-beta.18", + "@docusaurus/plugin-content-pages": "2.0.0-beta.18", + "@docusaurus/plugin-debug": "2.0.0-beta.18", + "@docusaurus/plugin-google-analytics": "2.0.0-beta.18", + "@docusaurus/plugin-google-gtag": "2.0.0-beta.18", + "@docusaurus/plugin-sitemap": "2.0.0-beta.18", + "@docusaurus/theme-classic": "2.0.0-beta.18", + "@docusaurus/theme-common": "2.0.0-beta.18", + "@docusaurus/theme-search-algolia": "2.0.0-beta.18" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-remark-plugin-npm2yarn/package.json b/packages/docusaurus-remark-plugin-npm2yarn/package.json index f183f95cafd6..3c0468b12340 100644 --- a/packages/docusaurus-remark-plugin-npm2yarn/package.json +++ b/packages/docusaurus-remark-plugin-npm2yarn/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/remark-plugin-npm2yarn", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Remark plugin for converting npm commands to Yarn commands as tabs.", "main": "lib/index.js", "publishConfig": { diff --git a/packages/docusaurus-theme-classic/package.json b/packages/docusaurus-theme-classic/package.json index dfbe3ddf767f..6820614d1571 100644 --- a/packages/docusaurus-theme-classic/package.json +++ b/packages/docusaurus-theme-classic/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/theme-classic", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Classic theme for Docusaurus", "main": "lib/index.js", "types": "src/theme-classic.d.ts", @@ -21,15 +21,15 @@ "format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\"" }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/plugin-content-blog": "2.0.0-beta.17", - "@docusaurus/plugin-content-docs": "2.0.0-beta.17", - "@docusaurus/plugin-content-pages": "2.0.0-beta.17", - "@docusaurus/theme-common": "2.0.0-beta.17", - "@docusaurus/theme-translations": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", - "@docusaurus/utils-common": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/plugin-content-blog": "2.0.0-beta.18", + "@docusaurus/plugin-content-docs": "2.0.0-beta.18", + "@docusaurus/plugin-content-pages": "2.0.0-beta.18", + "@docusaurus/theme-common": "2.0.0-beta.18", + "@docusaurus/theme-translations": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", + "@docusaurus/utils-common": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "@mdx-js/react": "^1.6.22", "clsx": "^1.1.1", "copy-text-to-clipboard": "^3.0.1", @@ -42,8 +42,8 @@ "rtlcss": "^3.5.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.17", - "@docusaurus/types": "2.0.0-beta.17", + "@docusaurus/module-type-aliases": "2.0.0-beta.18", + "@docusaurus/types": "2.0.0-beta.18", "@types/mdx-js__react": "^1.5.5", "@types/prismjs": "^1.26.0", "@types/rtlcss": "^3.1.2", diff --git a/packages/docusaurus-theme-common/package.json b/packages/docusaurus-theme-common/package.json index ab293316f44c..9c77f8eb95b9 100644 --- a/packages/docusaurus-theme-common/package.json +++ b/packages/docusaurus-theme-common/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/theme-common", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Common code for Docusaurus themes.", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -18,10 +18,10 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.17", - "@docusaurus/plugin-content-blog": "2.0.0-beta.17", - "@docusaurus/plugin-content-docs": "2.0.0-beta.17", - "@docusaurus/plugin-content-pages": "2.0.0-beta.17", + "@docusaurus/module-type-aliases": "2.0.0-beta.18", + "@docusaurus/plugin-content-blog": "2.0.0-beta.18", + "@docusaurus/plugin-content-docs": "2.0.0-beta.18", + "@docusaurus/plugin-content-pages": "2.0.0-beta.18", "clsx": "^1.1.1", "parse-numeric-range": "^1.3.0", "prism-react-renderer": "^1.3.1", @@ -29,8 +29,8 @@ "utility-types": "^3.10.0" }, "devDependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/types": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/types": "2.0.0-beta.18", "fs-extra": "^10.0.1", "lodash": "^4.17.21" }, diff --git a/packages/docusaurus-theme-live-codeblock/package.json b/packages/docusaurus-theme-live-codeblock/package.json index da1802a21bfa..ffdcbb6ca6b0 100644 --- a/packages/docusaurus-theme-live-codeblock/package.json +++ b/packages/docusaurus-theme-live-codeblock/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/theme-live-codeblock", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Docusaurus live code block component.", "main": "lib/index.js", "types": "src/theme-live-codeblock.d.ts", @@ -21,10 +21,10 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/theme-common": "2.0.0-beta.17", - "@docusaurus/theme-translations": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/theme-common": "2.0.0-beta.18", + "@docusaurus/theme-translations": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "@philpl/buble": "^0.19.7", "clsx": "^1.1.1", "fs-extra": "^10.0.1", @@ -32,7 +32,7 @@ "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.17", + "@docusaurus/types": "2.0.0-beta.18", "@types/buble": "^0.20.1" }, "peerDependencies": { diff --git a/packages/docusaurus-theme-search-algolia/package.json b/packages/docusaurus-theme-search-algolia/package.json index 6f47d1110da8..e2cd35f6bdf6 100644 --- a/packages/docusaurus-theme-search-algolia/package.json +++ b/packages/docusaurus-theme-search-algolia/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/theme-search-algolia", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Algolia search component for Docusaurus.", "main": "lib/index.js", "exports": { @@ -26,13 +26,13 @@ }, "dependencies": { "@docsearch/react": "^3.0.0", - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/logger": "2.0.0-beta.17", - "@docusaurus/plugin-content-docs": "2.0.0-beta.17", - "@docusaurus/theme-common": "2.0.0-beta.17", - "@docusaurus/theme-translations": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/logger": "2.0.0-beta.18", + "@docusaurus/plugin-content-docs": "2.0.0-beta.18", + "@docusaurus/theme-common": "2.0.0-beta.18", + "@docusaurus/theme-translations": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "algoliasearch": "^4.13.0", "algoliasearch-helper": "^3.7.4", "clsx": "^1.1.1", @@ -43,7 +43,7 @@ "utility-types": "^3.10.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.17" + "@docusaurus/module-type-aliases": "2.0.0-beta.18" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-theme-translations/package.json b/packages/docusaurus-theme-translations/package.json index b690f7d48513..64b10648c7a5 100644 --- a/packages/docusaurus-theme-translations/package.json +++ b/packages/docusaurus-theme-translations/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/theme-translations", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Docusaurus theme translations.", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -23,8 +23,8 @@ "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/logger": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/logger": "2.0.0-beta.18", "lodash": "^4.17.21" }, "engines": { diff --git a/packages/docusaurus-types/package.json b/packages/docusaurus-types/package.json index 59eec31416ef..245d45cedd10 100644 --- a/packages/docusaurus-types/package.json +++ b/packages/docusaurus-types/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/types", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Common types for Docusaurus packages.", "types": "./src/index.d.ts", "publishConfig": { diff --git a/packages/docusaurus-utils-common/package.json b/packages/docusaurus-utils-common/package.json index a2728c53dec3..ee7156d5b08b 100644 --- a/packages/docusaurus-utils-common/package.json +++ b/packages/docusaurus-utils-common/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/utils-common", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Common (Node/Browser) utility functions for Docusaurus packages.", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -21,7 +21,7 @@ "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.17" + "@docusaurus/types": "2.0.0-beta.18" }, "engines": { "node": ">=14" diff --git a/packages/docusaurus-utils-validation/package.json b/packages/docusaurus-utils-validation/package.json index 1cd8f64b0561..ea845a2df40d 100644 --- a/packages/docusaurus-utils-validation/package.json +++ b/packages/docusaurus-utils-validation/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/utils-validation", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Node validation utility functions for Docusaurus packages.", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -18,10 +18,10 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/logger": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", - "js-yaml": "^4.1.0", + "@docusaurus/logger": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", "joi": "^17.6.0", + "js-yaml": "^4.1.0", "tslib": "^2.3.1" }, "engines": { diff --git a/packages/docusaurus-utils/package.json b/packages/docusaurus-utils/package.json index df9eb8ef298d..51435bb08ab7 100644 --- a/packages/docusaurus-utils/package.json +++ b/packages/docusaurus-utils/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/utils", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Node utility functions for Docusaurus packages.", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -18,7 +18,7 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/logger": "2.0.0-beta.17", + "@docusaurus/logger": "2.0.0-beta.18", "@svgr/webpack": "^6.2.1", "file-loader": "^6.2.0", "fs-extra": "^10.0.1", @@ -38,7 +38,7 @@ "node": ">=14" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.17", + "@docusaurus/types": "2.0.0-beta.18", "@types/dedent": "^0.7.0", "@types/github-slugger": "^1.3.0", "@types/micromatch": "^4.0.2", diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index 0164015184df..e4776f9e4895 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -1,7 +1,7 @@ { "name": "@docusaurus/core", "description": "Easy to Maintain Open Source Documentation Websites", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "license": "MIT", "publishConfig": { "access": "public" @@ -41,13 +41,13 @@ "@babel/runtime": "^7.17.8", "@babel/runtime-corejs3": "^7.17.8", "@babel/traverse": "^7.17.3", - "@docusaurus/cssnano-preset": "2.0.0-beta.17", - "@docusaurus/logger": "2.0.0-beta.17", - "@docusaurus/mdx-loader": "2.0.0-beta.17", + "@docusaurus/cssnano-preset": "2.0.0-beta.18", + "@docusaurus/logger": "2.0.0-beta.18", + "@docusaurus/mdx-loader": "2.0.0-beta.18", "@docusaurus/react-loadable": "5.5.2", - "@docusaurus/utils": "2.0.0-beta.17", - "@docusaurus/utils-common": "2.0.0-beta.17", - "@docusaurus/utils-validation": "2.0.0-beta.17", + "@docusaurus/utils": "2.0.0-beta.18", + "@docusaurus/utils-common": "2.0.0-beta.18", + "@docusaurus/utils-validation": "2.0.0-beta.18", "@slorber/static-site-generator-webpack-plugin": "^4.0.4", "@svgr/webpack": "^6.2.1", "autoprefixer": "^10.4.4", @@ -106,8 +106,8 @@ "webpackbar": "^5.0.2" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.17", - "@docusaurus/types": "2.0.0-beta.17", + "@docusaurus/module-type-aliases": "2.0.0-beta.18", + "@docusaurus/types": "2.0.0-beta.18", "@types/detect-port": "^1.3.2", "@types/nprogress": "^0.2.0", "@types/react-dom": "^17.0.14", diff --git a/packages/lqip-loader/package.json b/packages/lqip-loader/package.json index 66ccece761dd..7c524b8bf7ba 100644 --- a/packages/lqip-loader/package.json +++ b/packages/lqip-loader/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/lqip-loader", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Low Quality Image Placeholders (LQIP) loader for webpack.", "main": "lib/index.js", "publishConfig": { @@ -17,7 +17,7 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/logger": "2.0.0-beta.17", + "@docusaurus/logger": "2.0.0-beta.18", "file-loader": "^6.2.0", "lodash": "^4.17.21", "sharp": "^0.30.3", diff --git a/packages/stylelint-copyright/package.json b/packages/stylelint-copyright/package.json index be46ef9595d4..f5a24cd77cda 100644 --- a/packages/stylelint-copyright/package.json +++ b/packages/stylelint-copyright/package.json @@ -1,6 +1,6 @@ { "name": "stylelint-copyright", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "description": "Stylelint plugin to check CSS files for a copyright header.", "main": "index.js", "license": "MIT", diff --git a/website/package.json b/website/package.json index 2323ae995ee4..2ee13f7bb689 100644 --- a/website/package.json +++ b/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "2.0.0-beta.17", + "version": "2.0.0-beta.18", "private": true, "scripts": { "docusaurus": "docusaurus", @@ -36,18 +36,18 @@ "dependencies": { "@crowdin/cli": "^3.7.8", "@crowdin/crowdin-api-client": "^1.15.0", - "@docusaurus/core": "2.0.0-beta.17", - "@docusaurus/logger": "2.0.0-beta.17", - "@docusaurus/plugin-client-redirects": "2.0.0-beta.17", - "@docusaurus/plugin-ideal-image": "2.0.0-beta.17", - "@docusaurus/plugin-pwa": "2.0.0-beta.17", - "@docusaurus/preset-classic": "2.0.0-beta.17", - "@docusaurus/remark-plugin-npm2yarn": "2.0.0-beta.17", - "@docusaurus/theme-classic": "2.0.0-beta.17", - "@docusaurus/theme-common": "2.0.0-beta.17", - "@docusaurus/theme-live-codeblock": "2.0.0-beta.17", - "@docusaurus/utils": "2.0.0-beta.17", - "@docusaurus/utils-common": "2.0.0-beta.17", + "@docusaurus/core": "2.0.0-beta.18", + "@docusaurus/logger": "2.0.0-beta.18", + "@docusaurus/plugin-client-redirects": "2.0.0-beta.18", + "@docusaurus/plugin-ideal-image": "2.0.0-beta.18", + "@docusaurus/plugin-pwa": "2.0.0-beta.18", + "@docusaurus/preset-classic": "2.0.0-beta.18", + "@docusaurus/remark-plugin-npm2yarn": "2.0.0-beta.18", + "@docusaurus/theme-classic": "2.0.0-beta.18", + "@docusaurus/theme-common": "2.0.0-beta.18", + "@docusaurus/theme-live-codeblock": "2.0.0-beta.18", + "@docusaurus/utils": "2.0.0-beta.18", + "@docusaurus/utils-common": "2.0.0-beta.18", "@popperjs/core": "^2.11.4", "@swc/core": "^1.2.160", "clsx": "^1.1.1", diff --git a/website/versioned_docs/version-2.0.0-beta.16/advanced/architecture.md b/website/versioned_docs/version-2.0.0-beta.18/advanced/architecture.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/advanced/architecture.md rename to website/versioned_docs/version-2.0.0-beta.18/advanced/architecture.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/advanced/client.md b/website/versioned_docs/version-2.0.0-beta.18/advanced/client.md similarity index 73% rename from website/versioned_docs/version-2.0.0-beta.16/advanced/client.md rename to website/versioned_docs/version-2.0.0-beta.18/advanced/client.md index 4148f270318d..ef4c4d220c60 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/advanced/client.md +++ b/website/versioned_docs/version-2.0.0-beta.18/advanced/client.md @@ -1,3 +1,7 @@ +--- +description: How the Docusaurus client is structured +--- + # Client architecture ## Theme aliases {#theme-aliases} @@ -75,3 +79,43 @@ The components in this "stack" are pushed in the order of `preset plugins > pres `@theme-original/*` always points to the topmost non-swizzled component. That's why you can import `@theme-original/CodeBlock` in the swizzled component—it points to the next one in the "component stack", a theme-provided one. Plugin authors should not try to use this because your component could be the topmost component and cause a self-import. `@theme-init/*` always points to the bottommost component—usually, this comes from the theme or plugin that first provides this component. Individual plugins / themes trying to enhance code block can safely use `@theme-init/CodeBlock` to get its basic version. Site creators should generally not use this because you likely want to enhance the _topmost_ instead of the _bottommost_ component. It's also possible that the `@theme-init/CodeBlock` alias does not exist at all—Docusaurus only creates it when it points to a different one from `@theme-original/CodeBlock`, i.e. when it's provided by more than one theme. We don't waste aliases! + +## Client modules {#client-modules} + +Client modules are part of your site's bundle, just like theme components. However, they are usually side-effect-ful. Client modules are anything that can be `import`ed by Webpack—CSS, JS, etc. JS scripts usually work on the global context, like registering event listeners, creating global variables... + +These modules are imported globally before React even renders the initial UI. + +```js title="App.tsx" +// How it works under the hood +import '@generated/client-modules'; +``` + +Plugins and sites can both declare client modules, through [`getClientModules`](../api/plugin-methods/lifecycle-apis.md#getClientModules) and [`siteConfig.clientModules`](../api/docusaurus.config.js.md#clientModules), respectively. + +Client modules are called during server-side rendering as well, so remember to check the [execution environment](./ssg.md#escape-hatches) before accessing client-side globals. + +```js title="mySiteGlobalJs.js" +import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; + +if (ExecutionEnvironment.canUseDOM) { + // As soon as the site loads in the browser, register a global event listener + window.addEventListener('keydown', (e) => { + if (e.code === 'Period') { + location.assign(location.href.replace('.com', '.dev')); + } + }); +} +``` + +CSS stylesheets imported as client modules are [global](../styling-layout.md#global-styles). + +```css title="mySiteGlobalCss.css" +/* This stylesheet is global. */ +.globalSelector { + color: red; +} +``` + + + diff --git a/website/versioned_docs/version-2.0.0-beta.16/advanced/index.md b/website/versioned_docs/version-2.0.0-beta.18/advanced/index.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/advanced/index.md rename to website/versioned_docs/version-2.0.0-beta.18/advanced/index.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/advanced/plugins.md b/website/versioned_docs/version-2.0.0-beta.18/advanced/plugins.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/advanced/plugins.md rename to website/versioned_docs/version-2.0.0-beta.18/advanced/plugins.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/advanced/routing.md b/website/versioned_docs/version-2.0.0-beta.18/advanced/routing.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/advanced/routing.md rename to website/versioned_docs/version-2.0.0-beta.18/advanced/routing.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/advanced/ssg.md b/website/versioned_docs/version-2.0.0-beta.18/advanced/ssg.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/advanced/ssg.md rename to website/versioned_docs/version-2.0.0-beta.18/advanced/ssg.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/docusaurus.config.js.md b/website/versioned_docs/version-2.0.0-beta.18/api/docusaurus.config.js.md similarity index 96% rename from website/versioned_docs/version-2.0.0-beta.16/api/docusaurus.config.js.md rename to website/versioned_docs/version-2.0.0-beta.18/api/docusaurus.config.js.md index ab50dc53956c..5a52885277b7 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/api/docusaurus.config.js.md +++ b/website/versioned_docs/version-2.0.0-beta.18/api/docusaurus.config.js.md @@ -284,18 +284,6 @@ module.exports = { defaultMode: 'light', disableSwitch: false, respectPrefersColorScheme: true, - switchConfig: { - darkIcon: '🌙', - lightIcon: '\u2600', - // React inline style object - // see https://reactjs.org/docs/dom-elements.html#style - darkIconStyle: { - marginLeft: '2px', - }, - lightIconStyle: { - marginLeft: '1px', - }, - }, }, navbar: { title: 'Site Title', @@ -450,7 +438,7 @@ module.exports = { ### `clientModules` {#clientmodules} -An array of client modules to load globally on your site: +An array of [client modules](../advanced/client.md#client-modules) to load globally on your site: Example: @@ -463,8 +451,6 @@ module.exports = { }; ``` -See also: [`getClientModules()`](./plugin-methods/lifecycle-apis.md#getClientModules). - ### `ssrTemplate` {#ssrtemplate} An HTML template written in [Eta's syntax](https://eta.js.org/docs/syntax#syntax-overview) that will be used to render your application. This can be used to set custom attributes on the `body` tags, additional `meta` tags, customize the `viewport`, etc. Please note that Docusaurus will rely on the template to be correctly structured in order to function properly, once you do customize it, you will have to make sure that your template is compliant with the requirements from `upstream`. diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/README.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/README.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/README.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/README.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/_category_.yml b/website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/_category_.yml similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/_category_.yml rename to website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/_category_.yml diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/extend-infrastructure.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/extend-infrastructure.md similarity index 96% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/extend-infrastructure.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/extend-infrastructure.md index f4a5bc89db3a..1885129b7007 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/extend-infrastructure.md +++ b/website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/extend-infrastructure.md @@ -61,7 +61,7 @@ module.exports = function (context, options) { ## `getThemePath()` {#getThemePath} -Returns the path to the directory where the theme components can be found. When your users call `swizzle`, `getThemePath` is called and its returned path is used to find your theme components. +Returns the path to the directory where the theme components can be found. When your users call `swizzle`, `getThemePath` is called and its returned path is used to find your theme components. Relative paths are resolved against the folder containing the entry point. For example, your `getThemePath` can be: @@ -73,7 +73,7 @@ module.exports = function (context, options) { name: 'my-theme', // highlight-start getThemePath() { - return path.resolve(__dirname, './theme'); + return './theme'; }, // highlight-end }; @@ -103,11 +103,11 @@ module.exports = function (context, options) { // highlight-start getThemePath() { // Where compiled JavaScript output lives - return path.join(__dirname, '../lib/theme'); + return '../lib/theme'; }, getTypeScriptThemePath() { // Where TypeScript source code lives - return path.resolve(__dirname, '../src/theme'); + return '../src/theme'; }, // highlight-end }; diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/i18n-lifecycles.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/i18n-lifecycles.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/i18n-lifecycles.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/i18n-lifecycles.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/lifecycle-apis.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/lifecycle-apis.md similarity index 94% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/lifecycle-apis.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/lifecycle-apis.md index b25455eed31f..3d30cb3ea5ba 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/lifecycle-apis.md +++ b/website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/lifecycle-apis.md @@ -233,6 +233,27 @@ module.exports = function (context, options) { Read the [webpack-merge strategy doc](https://github.com/survivejs/webpack-merge#merging-with-strategies) for more details. +### Configuring dev server {#configuring-dev-server} + +The dev server can be configured through returning a `devServer` field. + +```js title="docusaurus-plugin/src/index.js" +module.exports = function (context, options) { + return { + name: 'custom-docusaurus-plugin', + configureWebpack(config, isServer, utils) { + return { + // highlight-start + devServer: { + open: '/docs', // Opens localhost:3000/docs instead of localhost:3000/ + }, + // highlight-end + }; + }, + }; +}; +``` + ## `configurePostCss(options)` {#configurePostCss} Modifies [`postcssOptions` of `postcss-loader`](https://webpack.js.org/loaders/postcss-loader/#postcssoptions) during the generation of the client bundle. @@ -378,7 +399,7 @@ module.exports = function (context, options) { ## `getClientModules()` {#getClientModules} -Returns an array of paths to the modules that are to be imported into the client bundle. These modules are imported globally before React even renders the initial UI. +Returns an array of paths to the [client modules](../../advanced/client.md#client-modules) that are to be imported into the client bundle. As an example, to make your theme load a `customCss` or `customJs` file path from `options` passed in by the user: diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/static-methods.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/static-methods.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugin-methods/static-methods.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugin-methods/static-methods.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/_category_.yml b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/_category_.yml similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugins/_category_.yml rename to website/versioned_docs/version-2.0.0-beta.18/api/plugins/_category_.yml diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/overview.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/overview.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugins/overview.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugins/overview.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-client-redirects.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-client-redirects.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-client-redirects.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-client-redirects.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-content-blog.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-content-blog.md similarity index 90% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-content-blog.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-content-blog.md index 7eda77338a4c..dbd658b6812e 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-content-blog.md +++ b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-content-blog.md @@ -37,32 +37,32 @@ Accepted fields: | Name | Type | Default | Description | | --- | --- | --- | --- | -| `path` | `string` | `'blog'` | Path to the blog content directory on the filesystem, relative to site dir. | -| `editUrl` | string \| EditUrlFunction | `undefined` | Base URL to edit your site. The final URL is computed by `editUrl + relativeDocPath`. Using a function allows more nuanced control for each file. Omitting this variable entirely will disable edit links. | +| `path` | `string` | `'blog'` | Path to the blog content directory on the file system, relative to site dir. | +| `editUrl` | string \| EditUrlFunction | `undefined` | Base URL to edit your site. The final URL is computed by `editUrl + relativePostPath`. Using a function allows more nuanced control for each file. Omitting this variable entirely will disable edit links. | | `editLocalizedFiles` | `boolean` | `false` | The edit URL will target the localized file, instead of the original unlocalized file. Ignored when `editUrl` is a function. | | `blogTitle` | `string` | `'Blog'` | Blog page title for better SEO. | | `blogDescription` | `string` | `'Blog'` | Blog page meta description for better SEO. | -| `blogSidebarCount` | number \| 'ALL' | `5` | Number of blog post elements to show in the blog sidebar. `'ALL'` to show all blog posts; `0` to disable | +| `blogSidebarCount` | number \| 'ALL' | `5` | Number of blog post elements to show in the blog sidebar. `'ALL'` to show all blog posts; `0` to disable. | | `blogSidebarTitle` | `string` | `'Recent posts'` | Title of the blog sidebar. | | `routeBasePath` | `string` | `'blog'` | URL route for the blog section of your site. **DO NOT** include a trailing slash. Use `/` to put the blog at root path. | -| `tagsBasePath` | `string` | `'tags'` | URL route for the tags list page of your site. It is prepended to the `routeBasePath`. | -| `archiveBasePath` | string \| null | `'/archive'` | URL route for the archive blog section of your site. It is prepended to the `routeBasePath`. **DO NOT** include a trailing slash. Use `null` to disable generation of archive. | -| `include` | `string[]` | `['**/*.{md,mdx}']` | Matching files will be included and processed. | -| `exclude` | `string[]` | _See example configuration_ | No route will be created for matching files. | +| `tagsBasePath` | `string` | `'tags'` | URL route for the tags section of your blog. Will be appended to `routeBasePath`. **DO NOT** include a trailing slash. | +| `archiveBasePath` | string \| null | `'archive'` | URL route for the archive section of your blog. Will be appended to `routeBasePath`. **DO NOT** include a trailing slash. Use `null` to disable generation of archive. | +| `include` | `string[]` | `['**/*.{md,mdx}']` | Array of glob patterns matching Markdown files to be built, relative to the content path. | +| `exclude` | `string[]` | _See example configuration_ | Array of glob patterns matching Markdown files to be excluded. Serves as refinement based on the `include` option. | | `postsPerPage` | number \| 'ALL' | `10` | Number of posts to show per page in the listing page. Use `'ALL'` to display all posts on one listing page. | | `blogListComponent` | `string` | `'@theme/BlogListPage'` | Root component of the blog listing page. | | `blogPostComponent` | `string` | `'@theme/BlogPostPage'` | Root component of each blog post page. | -| `blogTagsListComponent` | `string` | `'@theme/BlogTagsListPage'` | Root component of the tags list page | +| `blogTagsListComponent` | `string` | `'@theme/BlogTagsListPage'` | Root component of the tags list page. | | `blogTagsPostsComponent` | `string` | `'@theme/BlogTagsPostsPage'` | Root component of the "posts containing tag" page. | | `blogArchiveComponent` | `string` | `'@theme/BlogArchivePage'` | Root component of the blog archive page. | | `remarkPlugins` | `any[]` | `[]` | Remark plugins passed to MDX. | | `rehypePlugins` | `any[]` | `[]` | Rehype plugins passed to MDX. | | `beforeDefaultRemarkPlugins` | `any[]` | `[]` | Custom Remark plugins passed to MDX before the default Docusaurus Remark plugins. | | `beforeDefaultRehypePlugins` | `any[]` | `[]` | Custom Rehype plugins passed to MDX before the default Docusaurus Rehype plugins. | -| `truncateMarker` | `string` | `//` | Truncate marker, can be a regex or string. | +| `truncateMarker` | `RegExp` | `//` | Truncate marker marking where the summary ends. | | `showReadingTime` | `boolean` | `true` | Show estimated reading time for the blog post. | | `readingTime` | `ReadingTimeFunctionOption` | The default reading time | A callback to customize the reading time number displayed. | -| `authorsMapPath` | `string` | `'authors.yml'` | Path to the authors map file, relative to the blog content directory specified with `path`. Can also be a `json` file. | +| `authorsMapPath` | `string` | `'authors.yml'` | Path to the authors map file, relative to the blog content directory. | | `feedOptions` | _See below_ | `{type: ['rss', 'atom']}` | Blog feed. | | `feedOptions.type` | FeedType \| FeedType[] \| 'all' \| null | **Required** | Type of feed to be generated. Use `null` to disable generation. | | `feedOptions.title` | `string` | `siteConfig.title` | Title of the feed. | diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-content-docs.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-content-docs.md similarity index 99% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-content-docs.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-content-docs.md index 2c97cd4ab78e..cf69f8f8a220 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-content-docs.md +++ b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-content-docs.md @@ -89,6 +89,7 @@ type SidebarGenerator = (generatorArgs: { version: {contentPath: string; versionName: string}; // the current version docs: Array<{ id: string; + title: string; frontMatter: DocFrontMatter & Record; source: string; sourceDirName: string; diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-content-pages.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-content-pages.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-content-pages.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-content-pages.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-debug.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-debug.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-debug.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-debug.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-google-analytics.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-google-analytics.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-google-analytics.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-google-analytics.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-google-gtag.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-google-gtag.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-google-gtag.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-google-gtag.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-ideal-image.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-ideal-image.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-ideal-image.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-ideal-image.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-pwa.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-pwa.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-pwa.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-pwa.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-sitemap.md b/website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-sitemap.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-sitemap.md rename to website/versioned_docs/version-2.0.0-beta.18/api/plugins/plugin-sitemap.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/themes/_category_.yml b/website/versioned_docs/version-2.0.0-beta.18/api/themes/_category_.yml similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/themes/_category_.yml rename to website/versioned_docs/version-2.0.0-beta.18/api/themes/_category_.yml diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/themes/overview.md b/website/versioned_docs/version-2.0.0-beta.18/api/themes/overview.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/themes/overview.md rename to website/versioned_docs/version-2.0.0-beta.18/api/themes/overview.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/themes/theme-classic.md b/website/versioned_docs/version-2.0.0-beta.18/api/themes/theme-classic.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/themes/theme-classic.md rename to website/versioned_docs/version-2.0.0-beta.18/api/themes/theme-classic.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/themes/theme-configuration.md b/website/versioned_docs/version-2.0.0-beta.18/api/themes/theme-configuration.md similarity index 96% rename from website/versioned_docs/version-2.0.0-beta.16/api/themes/theme-configuration.md rename to website/versioned_docs/version-2.0.0-beta.18/api/themes/theme-configuration.md index e79cf89614cf..d954079d52bb 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/api/themes/theme-configuration.md +++ b/website/versioned_docs/version-2.0.0-beta.18/api/themes/theme-configuration.md @@ -28,11 +28,6 @@ Accepted fields: | `defaultMode` | 'light' \| 'dark' | `'light'` | The color mode when user first visits the site. | | `disableSwitch` | `boolean` | `false` | Hides the switch in the navbar. Useful if you want to support a single color mode. | | `respectPrefersColorScheme` | `boolean` | `false` | Whether to use the `prefers-color-scheme` media-query, using user system preferences, instead of the hardcoded `defaultMode`. | -| `switchConfig` | _See below_ | _See below_ | Dark/light switch icon options. | -| `switchConfig.darkIcon` | `string` | `'🌜'` | Icon for the switch while in dark mode. | -| `switchConfig.darkIconStyle` | JSX style object (see [documentation](https://reactjs.org/docs/dom-elements.html#style)) | `{}` | CSS to apply to dark icon. | -| `switchConfig.lightIcon` | `string` | `'🌞'` | Icon for the switch while in light mode. | -| `switchConfig.lightIconStyle` | JSX style object | `{}` | CSS to apply to light icon. | @@ -46,18 +41,6 @@ module.exports = { defaultMode: 'light', disableSwitch: false, respectPrefersColorScheme: false, - switchConfig: { - darkIcon: '🌙', - darkIconStyle: { - marginLeft: '2px', - }, - // Unicode icons such as '\u2600' will work - // Unicode with 5 chars require brackets: '\u{1F602}' - lightIcon: '\u{1F602}', - lightIconStyle: { - marginLeft: '1px', - }, - }, }, // highlight-end }, @@ -918,9 +901,9 @@ import {useColorMode} from '@docusaurus/theme-common'; const Example = () => { // highlight-next-line - const {isDarkTheme, setLightTheme, setDarkTheme} = useColorMode(); + const {colorMode, setColorMode} = useColorMode(); - return

Dark mode is now {isDarkTheme ? 'on' : 'off'}

; + return

Dark mode is now {colorMode === 'dark' ? 'on' : 'off'}

; }; ``` diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/themes/theme-live-codeblock.md b/website/versioned_docs/version-2.0.0-beta.18/api/themes/theme-live-codeblock.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/themes/theme-live-codeblock.md rename to website/versioned_docs/version-2.0.0-beta.18/api/themes/theme-live-codeblock.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/api/themes/theme-search-algolia.md b/website/versioned_docs/version-2.0.0-beta.18/api/themes/theme-search-algolia.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/api/themes/theme-search-algolia.md rename to website/versioned_docs/version-2.0.0-beta.18/api/themes/theme-search-algolia.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/assets/docusaurus-asset-example-banner.png b/website/versioned_docs/version-2.0.0-beta.18/assets/docusaurus-asset-example-banner.png similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/assets/docusaurus-asset-example-banner.png rename to website/versioned_docs/version-2.0.0-beta.18/assets/docusaurus-asset-example-banner.png diff --git a/website/versioned_docs/version-2.0.0-beta.16/assets/docusaurus-asset-example.docx b/website/versioned_docs/version-2.0.0-beta.18/assets/docusaurus-asset-example.docx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/assets/docusaurus-asset-example.docx rename to website/versioned_docs/version-2.0.0-beta.18/assets/docusaurus-asset-example.docx diff --git a/website/versioned_docs/version-2.0.0-beta.16/assets/docusaurus-asset-example.xyz b/website/versioned_docs/version-2.0.0-beta.18/assets/docusaurus-asset-example.xyz similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/assets/docusaurus-asset-example.xyz rename to website/versioned_docs/version-2.0.0-beta.18/assets/docusaurus-asset-example.xyz diff --git a/website/versioned_docs/version-2.0.0-beta.16/blog.mdx b/website/versioned_docs/version-2.0.0-beta.18/blog.mdx similarity index 97% rename from website/versioned_docs/version-2.0.0-beta.16/blog.mdx rename to website/versioned_docs/version-2.0.0-beta.18/blog.mdx index bdee3fcb351f..3e0173879a5f 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/blog.mdx +++ b/website/versioned_docs/version-2.0.0-beta.18/blog.mdx @@ -185,7 +185,7 @@ date: 2021-09-13T18:00 ## Blog post authors {#blog-post-authors} -Use the `authors` front matter field to declare blog post authors. +Use the `authors` front matter field to declare blog post authors. An author should have at least a `name` or an `image_url`. Docusaurus uses information like `url`, `email`, and `title`, but any other information is allowed. ### Inline authors {#inline-authors} @@ -202,6 +202,7 @@ authors: title: Co-creator of Docusaurus 1 url: https://github.com/JoelMarcey image_url: https://github.com/JoelMarcey.png + email: jimarcey@gmail.com --- ``` @@ -215,6 +216,7 @@ authors: title: Co-creator of Docusaurus 1 url: https://github.com/JoelMarcey image_url: https://github.com/JoelMarcey.png + email: jimarcey@gmail.com - name: Sébastien Lorber title: Docusaurus maintainer url: https://sebastienlorber.com @@ -259,6 +261,7 @@ jmarcey: title: Co-creator of Docusaurus 1 url: https://github.com/JoelMarcey image_url: https://github.com/JoelMarcey.png + email: jimarcey@gmail.com slorber: name: Sébastien Lorber @@ -353,6 +356,12 @@ website/i18n/[locale]/docusaurus-plugin-content-blog/authors.yml An author, either declared through front matter or through the authors map, needs to have a name or an avatar, or both. If all authors of a post don't have names, Docusaurus will display their avatars compactly. See [this test post](/tests/blog/2022/01/20/image-only-authors) for the effect. +:::caution Feed generation + +[RSS feeds](#feed) require the author's email to be set for the author to appear in the feed. + +::: + ## Reading time {#reading-time} Docusaurus generates a reading time estimation for each blog post based on word count. We provide an option to customize this. diff --git a/website/versioned_docs/version-2.0.0-beta.16/browser-support.md b/website/versioned_docs/version-2.0.0-beta.18/browser-support.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/browser-support.md rename to website/versioned_docs/version-2.0.0-beta.18/browser-support.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/cli.md b/website/versioned_docs/version-2.0.0-beta.18/cli.md similarity index 96% rename from website/versioned_docs/version-2.0.0-beta.16/cli.md rename to website/versioned_docs/version-2.0.0-beta.18/cli.md index f300d26abef7..530c55c7a49f 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/cli.md +++ b/website/versioned_docs/version-2.0.0-beta.18/cli.md @@ -50,6 +50,16 @@ Please note that some functionality (for example, anchor links) will not work in ::: +:::info Development over network + +When forwarding port 3000 from a remote server or VM (e.g. GitHub Codespaces), you can run the dev server on `0.0.0.0` to make it listen on the local IP. + +```bash npm2yarn +npm run start -- --host 0.0.0.0 +``` + +::: + #### Enabling HTTPS {#enabling-https} There are multiple ways to obtain a certificate. We will use [mkcert](https://github.com/FiloSottile/mkcert) as an example. diff --git a/website/versioned_docs/version-2.0.0-beta.16/configuration.md b/website/versioned_docs/version-2.0.0-beta.18/configuration.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/configuration.md rename to website/versioned_docs/version-2.0.0-beta.18/configuration.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/deployment.mdx b/website/versioned_docs/version-2.0.0-beta.18/deployment.mdx similarity index 97% rename from website/versioned_docs/version-2.0.0-beta.16/deployment.mdx rename to website/versioned_docs/version-2.0.0-beta.18/deployment.mdx index 5abf43320e68..d2016ed0d58f 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/deployment.mdx +++ b/website/versioned_docs/version-2.0.0-beta.18/deployment.mdx @@ -213,7 +213,7 @@ Refer to [slorber/trailing-slash-guide](https://github.com/slorber/trailing-slas Deploying your Docusaurus project to [Vercel](https://vercel.com/) will provide you with [various benefits](https://vercel.com/) in the areas of performance and ease of use. -To deploy your Docusaurus project with a [Vercel for Git Integration](https://vercel.com/docs/git-integrations), make sure it has been pushed to a Git repository. +To deploy your Docusaurus project with a [Vercel for Git Integration](https://vercel.com/docs/concepts/git), make sure it has been pushed to a Git repository. Import the project into Vercel using the [Import Flow](https://vercel.com/import/git). During the import, you will find all relevant options preconfigured for you; however, you can choose to change any of these options, a list of which can be found [here](https://vercel.com/docs/build-step#build-&-development-settings). @@ -339,12 +339,12 @@ Alternatively, you can use SSH (`USE_SSH=true`) to log in. [GitHub Actions](https://help.github.com/en/actions) allow you to automate, customize, and execute your software development workflows right in your repository. -The workflow examples below assume your website source resides in the `main` branch of your repository (the _source branch_ is `main`), under a folder called `website/`, and your [publishing source](https://help.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) is configured for the `gh-pages` branch (the _deployment branch_ is `gh-pages`). +The workflow examples below assume your website source resides in the `main` branch of your repository (the _source branch_ is `main`), and your [publishing source](https://help.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) is configured for the `gh-pages` branch (the _deployment branch_ is `gh-pages`). Our goal is that: -1. When a new pull request is made to `main` and updates `website/`, there's an action that ensures the site builds successfully, without actually deploying. This job will be called `test-deploy`. -2. When a pull request is merged to the `main` branch or someone pushes to the `main` branch directly and `website/` is updated, it will be built and deployed to the `gh-pages` branch. After that, the new build output will be served on the GitHub Pages site. This job will be called `deploy`. +1. When a new pull request is made to `main`, there's an action that ensures the site builds successfully, without actually deploying. This job will be called `test-deploy`. +2. When a pull request is merged to the `main` branch or someone pushes to the `main` branch directly, it will be built and deployed to the `gh-pages` branch. After that, the new build output will be served on the GitHub Pages site. This job will be called `deploy`. Here are two approaches to deploying your docs with GitHub Actions. Based on the location of your deployment branch (`gh-pages`), choose the relevant tab below: @@ -369,7 +369,7 @@ Add these two workflow files: These files assume you are using yarn. If you use npm, change `cache: yarn`, `yarn install --frozen-lockfile`, `yarn build` to `cache: npm`, `npm ci`, `npm run build` accordingly. -If your Docusaurus project is not at the root of the repo, you would need to change the paths as well. +If your Docusaurus project is not at the root of your repo, you may need to configure a [default working directory](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-set-the-default-shell-and-working-directory), and adjust the paths accordingly. ::: @@ -499,7 +499,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 16.x cache: yarn - uses: webfactory/ssh-agent@v0.5.0 with: diff --git a/website/versioned_docs/version-2.0.0-beta.16/docusaurus-core.md b/website/versioned_docs/version-2.0.0-beta.18/docusaurus-core.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/docusaurus-core.md rename to website/versioned_docs/version-2.0.0-beta.18/docusaurus-core.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/creating-pages.md b/website/versioned_docs/version-2.0.0-beta.18/guides/creating-pages.md similarity index 98% rename from website/versioned_docs/version-2.0.0-beta.16/guides/creating-pages.md rename to website/versioned_docs/version-2.0.0-beta.18/guides/creating-pages.md index bf4c277d4a15..160b4dbf1dec 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/guides/creating-pages.md +++ b/website/versioned_docs/version-2.0.0-beta.18/guides/creating-pages.md @@ -35,9 +35,9 @@ Create a file `/src/pages/helloReact.js`: import React from 'react'; import Layout from '@theme/Layout'; -function Hello() { +export default function Hello() { return ( - +
); } - -export default Hello; ``` Once you save the file, the development server will automatically reload the changes. Now open `http://localhost:3000/helloReact` and you will see the new page you just created. diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/docs/docs-create-doc.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/docs/docs-create-doc.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/docs/docs-create-doc.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/docs/docs-create-doc.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/docs/docs-introduction.md b/website/versioned_docs/version-2.0.0-beta.18/guides/docs/docs-introduction.md similarity index 85% rename from website/versioned_docs/version-2.0.0-beta.16/guides/docs/docs-introduction.md rename to website/versioned_docs/version-2.0.0-beta.18/guides/docs/docs-introduction.md index 426186a72bbd..02e9d76b45cd 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/guides/docs/docs-introduction.md +++ b/website/versioned_docs/version-2.0.0-beta.18/guides/docs/docs-introduction.md @@ -37,17 +37,31 @@ id: part1 Lorem ipsum ``` -If you want more control over the last part of the document URL, it is possible to add a `slug` (defaults to the `id`). +### Customizing doc URLs {#customizing-doc-urls} + +By default, a document's URL location is its file path relative to the `docs` folder. Use the `slug` front matter to change a document's URL. + +For example, suppose your site structure looks like this: + +```bash +website # Root directory of your site +└── docs + └── guide + └── hello.md +``` + +By default `hello.md` will be available at `/docs/guide/hello`. You can change its URL location to `/docs/bonjour`: ```md --- -id: part1 -slug: part1.html +slug: /bonjour --- Lorem ipsum ``` +`slug` will be appended to the doc plugin's `routeBasePath`, which is `/docs` by default. See [Docs-only mode](#docs-only-mode) for how to remove the `/docs` part from the URL. + :::note It is possible to use: diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/docs/docs-markdown-features.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/docs/docs-markdown-features.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/docs/docs-markdown-features.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/docs/docs-markdown-features.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/docs/docs-multi-instance.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/docs/docs-multi-instance.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/docs/docs-multi-instance.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/docs/docs-multi-instance.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/autogenerated.md b/website/versioned_docs/version-2.0.0-beta.18/guides/docs/sidebar/autogenerated.md similarity index 97% rename from website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/autogenerated.md rename to website/versioned_docs/version-2.0.0-beta.18/guides/docs/sidebar/autogenerated.md index 807de81571de..239888b99f30 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/autogenerated.md +++ b/website/versioned_docs/version-2.0.0-beta.18/guides/docs/sidebar/autogenerated.md @@ -323,7 +323,7 @@ sidebar_class_name: green This is the easy tutorial! ``` -**For categories**: add a `_category_.json` or `_category_.yml` file in the respective folder. You can specify any category metadata and also the `position` metadata. +**For categories**: add a `_category_.json` or `_category_.yml` file in the respective folder. You can specify any category metadata and also the `position` metadata. `label`, `className`, `position`, and `customProps` will default to the respective values of the category's linked doc, if there is one. @@ -338,6 +338,9 @@ This is the easy tutorial! "link": { "type": "generated-index", "title": "Tutorial overview" + }, + "customProps": { + "description": "This description can be used in the swizzled DocCard" } } ``` @@ -354,6 +357,8 @@ className: red link: type: generated-index title: Tutorial overview +customProps: + description: This description can be used in the swizzled DocCard ``` diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/index.md b/website/versioned_docs/version-2.0.0-beta.18/guides/docs/sidebar/index.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/index.md rename to website/versioned_docs/version-2.0.0-beta.18/guides/docs/sidebar/index.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/items.md b/website/versioned_docs/version-2.0.0-beta.18/guides/docs/sidebar/items.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/items.md rename to website/versioned_docs/version-2.0.0-beta.18/guides/docs/sidebar/items.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/multiple-sidebars.md b/website/versioned_docs/version-2.0.0-beta.18/guides/docs/sidebar/multiple-sidebars.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/multiple-sidebars.md rename to website/versioned_docs/version-2.0.0-beta.18/guides/docs/sidebar/multiple-sidebars.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/docs/versioning.md b/website/versioned_docs/version-2.0.0-beta.18/guides/docs/versioning.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/docs/versioning.md rename to website/versioned_docs/version-2.0.0-beta.18/guides/docs/versioning.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/_markdown-partial-example.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/_markdown-partial-example.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/_markdown-partial-example.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/_markdown-partial-example.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-admonitions.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-admonitions.mdx similarity index 99% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-admonitions.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-admonitions.mdx index 365641ab2504..3302ee532661 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-admonitions.mdx +++ b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-admonitions.mdx @@ -87,14 +87,14 @@ If you use [Prettier](https://prettier.io) to format your Markdown files, Pretti ```md -::: note +:::note Hello world ::: -::: note +:::note Hello world ::: diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-assets.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-assets.mdx similarity index 92% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-assets.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-assets.mdx index 32194db3291e..321ddb5d9ad2 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-assets.mdx +++ b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-assets.mdx @@ -6,6 +6,8 @@ slug: /markdown-features/assets --- import BrowserWindow from '@site/src/components/BrowserWindow'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; Sometimes you want to link to assets (e.g. docx files, images...) directly from Markdown files, and it is convenient to co-locate the asset next to the Markdown file using it. @@ -24,12 +26,18 @@ Let's imagine the following file structure: You can display images in three different ways: Markdown syntax, CJS require, or ES imports syntax. + + + Display images using simple Markdown syntax: ```md ![Example banner](./assets/docusaurus-asset-example-banner.png) ``` + + + Display images using inline CommonJS `require` in JSX image tag: ```jsx @@ -39,6 +47,9 @@ Display images using inline CommonJS `require` in JSX image tag: /> ``` + + + Display images using ES `import` syntax and JSX image tag: ```jsx @@ -47,7 +58,10 @@ import myImageUrl from './assets/docusaurus-asset-example-banner.png'; Example banner; ``` -This results in displaying the image: + + + +All of the above result in displaying the image: @@ -63,7 +77,7 @@ If you are using [@docusaurus/plugin-ideal-image](../../api/plugins/plugin-ideal ## Files {#files} -In the same way, you can link to existing assets by requiring them and using the returned url in videos, links, etc. +In the same way, you can link to existing assets by `require`'ing them and using the returned URL in `video`s, `a` anchor links, etc. ```md # My Markdown page @@ -89,7 +103,7 @@ or :::info markdown links are always file paths -If you use the Markdown image or link syntax, all asset paths will be resolved as file paths by Docusaurus and automatically converted to `require()` calls. You don't need to use `require()` in Markdown unless you use the JSX syntax. +If you use the Markdown image or link syntax, all asset paths will be resolved as file paths by Docusaurus and automatically converted to `require()` calls. You don't need to use `require()` in Markdown unless you use the JSX syntax, which you do have to handle yourself. ::: diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-code-blocks.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-code-blocks.mdx similarity index 87% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-code-blocks.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-code-blocks.mdx index 7934b6ebaafb..085d944ca429 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-code-blocks.mdx +++ b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-code-blocks.mdx @@ -14,11 +14,13 @@ Code blocks within documentation are super-powered 💪. You can add a title to the code block by adding a `title` key after the language (leave a space between them). - ```jsx title="/src/components/HelloCodeTitle.js" - function HelloCodeTitle(props) { - return

Hello, {props.name}

; - } - ``` +````md +```jsx title="/src/components/HelloCodeTitle.js" +function HelloCodeTitle(props) { + return

Hello, {props.name}

; +} +``` +```` @@ -34,9 +36,11 @@ function HelloCodeTitle(props) { Code blocks are text blocks wrapped around by strings of 3 backticks. You may check out [this reference](https://github.com/mdx-js/specification) for the specifications of MDX. - ```js - console.log('Every repo must come with a mascot.'); - ``` +````md +```js +console.log('Every repo must come with a mascot.'); +``` +```` Use the matching language meta string for your code block, and Docusaurus will pick up syntax highlighting automatically, powered by [Prism React Renderer](https://github.com/FormidableLabs/prism-react-renderer). @@ -127,26 +131,28 @@ You can refer to [Prism's official language definitions](https://github.com/Pris You can use comments with `highlight-next-line`, `highlight-start`, and `highlight-end` to select which lines are highlighted. - ```js - function HighlightSomeText(highlight) { - if (highlight) { - // highlight-next-line - return 'This text is highlighted!'; - } +````md +```js +function HighlightSomeText(highlight) { + if (highlight) { + // highlight-next-line + return 'This text is highlighted!'; + } - return 'Nothing highlighted'; - } + return 'Nothing highlighted'; +} - function HighlightMoreText(highlight) { - // highlight-start - if (highlight) { - return 'This range is highlighted!'; - } - // highlight-end +function HighlightMoreText(highlight) { + // highlight-start + if (highlight) { + return 'This range is highlighted!'; + } + // highlight-end - return 'Nothing highlighted'; - } - ``` + return 'Nothing highlighted'; +} +``` +```` ````mdx-code-block @@ -177,14 +183,14 @@ function HighlightMoreText(highlight) { Supported commenting syntax: -| Language | Syntax | +| Style | Syntax | | ---------- | ------------------------ | -| JavaScript | `/* ... */` and `// ...` | -| JSX | `{/* ... */}` | -| Python | `# ...` | -| HTML | `` | +| C-style | `/* ... */` and `// ...` | +| JSX-style | `{/* ... */}` | +| Bash-style | `# ...` | +| HTML-style | `` | -If there's a syntax that is not currently supported, we are open to adding them! Pull requests welcome. +We will do our best to infer which set of comment styles to use based on the language, and default to allowing _all_ comment styles. If there's a comment style that is not currently supported, we are open to adding them! Pull requests welcome. To accomplish this, Docusaurus adds the `docusaurus-highlight-code-line` class to the highlighted lines. You will need to define your own styling for this CSS, possibly in your `src/css/custom.css` with a custom background color which is dependent on your selected syntax highlighting theme. The color given below works for the default highlighting theme (Palenight), so if you are using another theme, you will have to tweak the color accordingly. @@ -207,19 +213,21 @@ To accomplish this, Docusaurus adds the `docusaurus-highlight-code-line` class t You can also specify highlighted line ranges within the language meta string (leave a space after the language). To highlight multiple lines, separate the line numbers by commas or use the range syntax to select a chunk of lines. This feature uses the `parse-number-range` library and you can find [more syntax](https://www.npmjs.com/package/parse-numeric-range) on their project details. - ```jsx {1,4-6,11} - import React from 'react'; +````md +```jsx {1,4-6,11} +import React from 'react'; - function MyComponent(props) { - if (props.isBar) { - return
Bar
; - } +function MyComponent(props) { + if (props.isBar) { + return
Bar
; + } - return
Foo
; - } + return
Foo
; +} - export default MyComponent; - ``` +export default MyComponent; +``` +```` @@ -265,9 +273,7 @@ In the future, we may extend the magic comment system and let you define custom (Powered by [React Live](https://github.com/FormidableLabs/react-live)) -You can create an interactive coding editor with the `@docusaurus/theme-live-codeblock` plugin. - -First, add the plugin to your package. +You can create an interactive coding editor with the `@docusaurus/theme-live-codeblock` plugin. First, add the plugin to your package. ```bash npm2yarn npm install --save @docusaurus/theme-live-codeblock @@ -285,28 +291,30 @@ module.exports = { To use the plugin, create a code block with `live` attached to the language meta string. - ```jsx live - function Clock(props) { - const [date, setDate] = useState(new Date()); - useEffect(() => { - var timerID = setInterval(() => tick(), 1000); - - return function cleanup() { - clearInterval(timerID); - }; - }); - - function tick() { - setDate(new Date()); - } - - return ( -
-

It is {date.toLocaleTimeString()}.

-
- ); - } - ``` +````md +```jsx live +function Clock(props) { + const [date, setDate] = useState(new Date()); + useEffect(() => { + var timerID = setInterval(() => tick(), 1000); + + return function cleanup() { + clearInterval(timerID); + }; + }); + + function tick() { + setDate(new Date()); + } + + return ( +
+

It is {date.toLocaleTimeString()}.

+
+ ); +} +``` +```` The code block will be rendered as an interactive editor. Changes to the code will reflect on the result panel live. @@ -445,9 +453,9 @@ Syntax highlighting only works on plain strings. Docusaurus will not attempt to With MDX, you can easily create interactive components within your documentation, for example, to display code in multiple programming languages and switch between them using a tabs component. -Instead of implementing a dedicated component for multi-language support code blocks, we've implemented a generic Tabs component in the classic theme so that you can use it for other non-code scenarios as well. +Instead of implementing a dedicated component for multi-language support code blocks, we've implemented a general-purpose [``](./markdown-features-tabs.mdx) component in the classic theme so that you can use it for other non-code scenarios as well. -The following example is how you can have multi-language code tabs in your docs. Note that the empty lines above and below each language block are **intentional**. This is a current limitation of MDX: you have to leave empty lines around Markdown syntax for the MDX parser to know that it's Markdown syntax and not JSX. +The following example is how you can have multi-language code tabs in your docs. Note that the empty lines above and below each language block are **intentional**. This is a [current limitation of MDX](./markdown-features-react.mdx#markdown-and-jsx-interoperability): you have to leave empty lines around Markdown syntax for the MDX parser to know that it's Markdown syntax and not JSX. ````jsx import Tabs from '@theme/Tabs'; @@ -467,7 +475,7 @@ function helloWorld() { ```py def hello_world(): - print 'Hello, world!' + print("Hello, world!") ``` @@ -503,7 +511,7 @@ function helloWorld() { ```py def hello_world(): - print 'Hello, world!' + print("Hello, world!") ``` diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-head-metadata.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-head-metadata.mdx similarity index 63% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-head-metadata.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-head-metadata.mdx index fa987eb1fedf..1a2c04095c1c 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-head-metadata.mdx +++ b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-head-metadata.mdx @@ -7,9 +7,7 @@ slug: /markdown-features/head-metadata # Head Metadata -Docusaurus automatically sets useful page metadata in ``, `` and `` for you. - -It is possible to add extra metadata (or override existing ones) by using the `` tag in Markdown files: +Docusaurus automatically sets useful page metadata in ``, `` and `` for you. It is possible to add extra metadata (or override existing ones) with the `` tag in Markdown files: ```md title="markdown-features-head-metadata.mdx" --- @@ -46,22 +44,18 @@ My text :::tip -This `` declaration has been added to the current Markdown doc, as a demo. - -Open your browser DevTools and check how this page's metadata has been affected. +This `` declaration has been added to the current Markdown doc as a demo. Open your browser DevTools and check how this page's metadata has been affected. ::: -:::tip +:::tip You don't need this for regular SEO -**You don't always need this for typical SEO needs.** Content plugins (e.g. docs and blog) provide front matter options like `description`, `keywords`, and `image`, which will be automatically applied to both `description` and `og:description`, while you would have to manually declare two metadata tags when using the `` tag. +Content plugins (e.g. docs and blog) provide front matter options like `description`, `keywords`, and `image`, which will be automatically applied to both `description` and `og:description`, while you would have to manually declare two metadata tags when using the `` tag. ::: :::note -This feature is built on top of the Docusaurus [``](./../../docusaurus-core.md#head) component. - -Refer to [react-helmet](https://github.com/nfl/react-helmet) for exhaustive documentation. +This feature is built on top of the Docusaurus [``](./../../docusaurus-core.md#head) component. Refer to [react-helmet](https://github.com/nfl/react-helmet) for exhaustive documentation. ::: diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-headings.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-headings.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-headings.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-headings.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-inline-toc.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-inline-toc.mdx similarity index 81% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-inline-toc.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-inline-toc.mdx index 4a48251ac4d0..8369a133184d 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-inline-toc.mdx +++ b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-inline-toc.mdx @@ -7,15 +7,11 @@ slug: /markdown-features/inline-toc import BrowserWindow from '@site/src/components/BrowserWindow'; -Each Markdown document displays a tab of content on the top-right corner. - -But it is also possible to display an inline table of contents directly inside a markdown document, thanks to MDX. +Each Markdown document displays a table of contents on the top-right corner. But it is also possible to display an inline table of contents directly inside a markdown document, thanks to MDX. ## Full table of contents {#full-table-of-contents} -The `toc` variable is available in any MDX document and contains all the headings of an MDX document. - -By default, only `h2` and `h3` headings are displayed in the TOC. You can change which heading levels are visible by setting `minHeadingLevel` or `maxHeadingLevel`. +The `toc` variable is available in any MDX document and contains all the headings of an MDX document. By default, only `h2` and `h3` headings are displayed in the TOC. You can change which heading levels are visible by setting `minHeadingLevel` or `maxHeadingLevel` for individual `TOCInline` components. ```jsx import TOCInline from '@theme/TOCInline'; @@ -27,9 +23,7 @@ import TOCInline from '@theme/TOCInline'; import TOCInline from '@theme/TOCInline'; - - ``` @@ -53,12 +47,19 @@ import TOCInline from '@theme/TOCInline'; node.level === 2 || node.level === 4)} + minHeadingLevel={2} + // Show h4 headings in addition to the default h2 and h3 headings + maxHeadingLevel={4} />; ``` ```mdx-code-block - node.level === 2 || node.level === 4)} /> + node.level === 2 || node.level === 4)} + minHeadingLevel={2} + maxHeadingLevel={4} +/> ``` diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-intro.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-intro.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-intro.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-intro.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-math-equations.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-math-equations.mdx similarity index 95% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-math-equations.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-math-equations.mdx index d785f3d027c0..e3281d6fd6ad 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-math-equations.mdx +++ b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-math-equations.mdx @@ -17,9 +17,10 @@ Please read [KaTeX](https://katex.org) documentation for more details. Write inline math equations by wrapping LaTeX equations between `$`: -```mdx -Let $f\colon[a,b] \to \R$ be Riemann integrable. Let $F\colon[a,b]\to\R$ be $F(x)= -\int_{a}^{x} f(t)\,dt$. Then $$F$$ is continuous, and at all $x$ such that $f$ is continuous at $x$, $F$ is differentiable at $x$ with $F'(x)=f(x)$. +```latex +Let $f\colon[a,b]\to\R$ be Riemann integrable. Let $F\colon[a,b]\to\R$ be +$F(x)=\int_{a}^{x} f(t)\,dt$. Then $F$ is continuous, and at all $x$ such that +$f$ is continuous at $x$, $F$ is differentiable at $x$ with $F'(x)=f(x)$. ``` @@ -33,7 +34,7 @@ Let $f\colon[a,b] \to \R$ be Riemann integrable. Let $F\colon[a,b]\to\R$ be $F(x For equation block or display mode, use line breaks and `$$`: -```mdx +```latex $$ I = \int_0^{2\pi} \sin(x)\,dx $$ diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-plugins.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-plugins.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-plugins.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-plugins.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-react.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-react.mdx similarity index 98% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-react.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-react.mdx index be6f0018fa05..08530fd72efc 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-react.mdx +++ b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-react.mdx @@ -352,7 +352,7 @@ Now you can import code snippets from another file as it is: import CodeBlock from '@theme/CodeBlock'; import MyComponentSource from '!!raw-loader!./myComponent'; -{MyComponentSource} +{MyComponentSource} ``` @@ -362,7 +362,7 @@ import MyComponentSource from '!!raw-loader!@site/src/pages/examples/_myComponen -{MyComponentSource} +{MyComponentSource} diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-react.module.css b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-react.module.css similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-react.module.css rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-react.module.css diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-tabs-styles.module.css b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-tabs-styles.module.css similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-tabs-styles.module.css rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-tabs-styles.module.css diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-tabs.mdx b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-tabs.mdx similarity index 98% rename from website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-tabs.mdx rename to website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-tabs.mdx index 55ce040ead00..062a9abe54f7 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-tabs.mdx +++ b/website/versioned_docs/version-2.0.0-beta.18/guides/markdown-features/markdown-features-tabs.mdx @@ -12,7 +12,7 @@ import TabItem from '@theme/TabItem'; import styles from './markdown-features-tabs-styles.module.css'; ``` -Docusaurus provides `` components that you can use thanks to [MDX](./markdown-features-react.mdx): +Docusaurus provides the `` component that you can use in Markdown thanks to [MDX](./markdown-features-react.mdx): ```jsx diff --git a/website/versioned_docs/version-2.0.0-beta.16/guides/whats-next.md b/website/versioned_docs/version-2.0.0-beta.18/guides/whats-next.md similarity index 89% rename from website/versioned_docs/version-2.0.0-beta.16/guides/whats-next.md rename to website/versioned_docs/version-2.0.0-beta.18/guides/whats-next.md index 17c322a59b8e..7782f58eeb29 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/guides/whats-next.md +++ b/website/versioned_docs/version-2.0.0-beta.18/guides/whats-next.md @@ -6,8 +6,8 @@ Congratulations! You have understood most core features of Docusaurus now. You h - [Used the docs plugin](./docs/docs-introduction.md) to create documentation pages. This includes [configuring the sidebar](./docs/sidebar/index.md), and even [versioning](./docs/versioning.md) - [Used the blog plugin](../blog.mdx) to create a fully featured blog - Tried your hands on [a range of Markdown features](./markdown-features/markdown-features-intro.mdx), which are useful for all content plugins -- [Used stylesheets](../styling-layout.md) to customize your site's appearance -- [Put images and other assets](../static-assets.md) in your pages +- [Used stylesheets](../styling-layout.md) or [swizzling](../swizzling.md) to customize your site's appearance +- [Included images and other assets](../static-assets.md) in your pages - [Added search](../search.md) to your site - Understood how [browser support](../browser-support.md) and [SEO](../seo.md) are done through standard Docusaurus APIs - Learned about how [individual plugins](../using-plugins.md) are installed and configured diff --git a/website/versioned_docs/version-2.0.0-beta.16/i18n/i18n-crowdin.mdx b/website/versioned_docs/version-2.0.0-beta.18/i18n/i18n-crowdin.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/i18n/i18n-crowdin.mdx rename to website/versioned_docs/version-2.0.0-beta.18/i18n/i18n-crowdin.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.16/i18n/i18n-git.md b/website/versioned_docs/version-2.0.0-beta.18/i18n/i18n-git.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/i18n/i18n-git.md rename to website/versioned_docs/version-2.0.0-beta.18/i18n/i18n-git.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/i18n/i18n-introduction.md b/website/versioned_docs/version-2.0.0-beta.18/i18n/i18n-introduction.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/i18n/i18n-introduction.md rename to website/versioned_docs/version-2.0.0-beta.18/i18n/i18n-introduction.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/i18n/i18n-tutorial.md b/website/versioned_docs/version-2.0.0-beta.18/i18n/i18n-tutorial.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/i18n/i18n-tutorial.md rename to website/versioned_docs/version-2.0.0-beta.18/i18n/i18n-tutorial.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/installation.md b/website/versioned_docs/version-2.0.0-beta.18/installation.md similarity index 90% rename from website/versioned_docs/version-2.0.0-beta.16/installation.md rename to website/versioned_docs/version-2.0.0-beta.18/installation.md index 0a79f9b3f7cb..ceee8a5df6c8 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/installation.md +++ b/website/versioned_docs/version-2.0.0-beta.18/installation.md @@ -41,7 +41,7 @@ If you do not specify `name` or `template`, it will prompt you for them. We recommend the `classic` template so that you can get started quickly, and it contains features found in Docusaurus 1. The `classic` template contains `@docusaurus/preset-classic` which includes standard documentation, a blog, custom pages, and a CSS framework (with dark mode support). You can get up and running extremely quickly with the classic template and customize things later on when you have gained more familiarity with Docusaurus. -The `template` also accepts a git repo URL or a local file path, with the latter evaluated relative to the current working directory. The repo/folder content will be copied to the site directory. If it's a git repository, you can also specify a cloning strategy. Run `npx create-docusaurus@latest --help` for more information. +The `template` also accepts a git repo URL or a local file path, with the latter evaluated relative to the current working directory. The repo/folder content will be copied to the site directory. If it's a git repository, you can also specify a cloning strategy. You can also use the template's TypeScript variant by passing the `--typescript` flag. @@ -66,24 +66,24 @@ You can also initialize a new project using your preferred project manager: ````mdx-code-block - + ```bash -npm init docusaurus website classic +npm init docusaurus ``` ```bash -yarn create docusaurus website classic +yarn create docusaurus ``` ```bash -pnpm create docusaurus website classic +pnpm create docusaurus ``` @@ -99,11 +99,7 @@ Docusaurus makes best efforts to select a package manager to install dependencie npx create-docusaurus@latest my-website classic --package-manager yarn ``` -If you want to skip installing dependencies, use the `--skip-install` option. - -```bash -npx create-docusaurus@latest my-website classic --skip-install -``` +Run `npx create-docusaurus@latest --help` for more information about all available flags. ## Project structure {#project-structure} @@ -137,10 +133,10 @@ my-website ### Project structure rundown {#project-structure-rundown} -- `/blog/` - Contains the blog Markdown files. You can delete the directory if you do not want/need a blog. More details can be found in the [blog guide](blog.mdx) -- `/docs/` - Contains the Markdown files for the docs. Customize the order of the docs sidebar in `sidebars.js`. More details can be found in the [docs guide](./guides/docs/docs-markdown-features.mdx) -- `/src/` - Non-documentation files like pages or custom React components. You don't have to strictly put your non-documentation files in here but putting them under a centralized directory makes it easier to specify in case you need to do some sort of linting/processing - - `/src/pages` - Any files within this directory will be converted into a website page. More details can be found in the [pages guide](guides/creating-pages.md) +- `/blog/` - Contains the blog Markdown files. You can delete the directory if you've disabled the blog plugin, or you can change its name after setting the `path` option. More details can be found in the [blog guide](blog.mdx) +- `/docs/` - Contains the Markdown files for the docs. Customize the order of the docs sidebar in `sidebars.js`. You can delete the directory if you've disabled the docs plugin, or you can change its name after setting the `path` option. More details can be found in the [docs guide](./guides/docs/docs-markdown-features.mdx) +- `/src/` - Non-documentation files like pages or custom React components. You don't have to strictly put your non-documentation files here, but putting them under a centralized directory makes it easier to specify in case you need to do some sort of linting/processing + - `/src/pages` - Any JSX/TSX/MDX file within this directory will be converted into a website page. More details can be found in the [pages guide](guides/creating-pages.md) - `/static/` - Static directory. Any contents inside here will be copied into the root of the final `build` directory - `/docusaurus.config.js` - A config file containing the site configuration. This is the equivalent of `siteConfig.js` in Docusaurus v1 - `/package.json` - A Docusaurus website is a React app. You can install and use any npm packages you like in them diff --git a/website/versioned_docs/version-2.0.0-beta.16/introduction.md b/website/versioned_docs/version-2.0.0-beta.18/introduction.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/introduction.md rename to website/versioned_docs/version-2.0.0-beta.18/introduction.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/migration/migration-automated.md b/website/versioned_docs/version-2.0.0-beta.18/migration/migration-automated.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/migration/migration-automated.md rename to website/versioned_docs/version-2.0.0-beta.18/migration/migration-automated.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/migration/migration-manual.md b/website/versioned_docs/version-2.0.0-beta.18/migration/migration-manual.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/migration/migration-manual.md rename to website/versioned_docs/version-2.0.0-beta.18/migration/migration-manual.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/migration/migration-overview.md b/website/versioned_docs/version-2.0.0-beta.18/migration/migration-overview.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/migration/migration-overview.md rename to website/versioned_docs/version-2.0.0-beta.18/migration/migration-overview.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/migration/migration-translated-sites.md b/website/versioned_docs/version-2.0.0-beta.18/migration/migration-translated-sites.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/migration/migration-translated-sites.md rename to website/versioned_docs/version-2.0.0-beta.18/migration/migration-translated-sites.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/migration/migration-versioned-sites.md b/website/versioned_docs/version-2.0.0-beta.18/migration/migration-versioned-sites.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/migration/migration-versioned-sites.md rename to website/versioned_docs/version-2.0.0-beta.18/migration/migration-versioned-sites.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/playground.mdx b/website/versioned_docs/version-2.0.0-beta.18/playground.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/playground.mdx rename to website/versioned_docs/version-2.0.0-beta.18/playground.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.16/search.md b/website/versioned_docs/version-2.0.0-beta.18/search.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/search.md rename to website/versioned_docs/version-2.0.0-beta.18/search.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/seo.md b/website/versioned_docs/version-2.0.0-beta.18/seo.md similarity index 96% rename from website/versioned_docs/version-2.0.0-beta.16/seo.md rename to website/versioned_docs/version-2.0.0-beta.18/seo.md index 111560af2801..3c61f7fae51b 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/seo.md +++ b/website/versioned_docs/version-2.0.0-beta.18/seo.md @@ -42,8 +42,30 @@ Similar to [global metadata](#global-metadata), Docusaurus also allows for the a Some content... ``` +Docusaurus automatically adds `description`, `title`, canonical URL links, and other useful metadata to each Markdown page. They are configurable through front matter: + +```md +--- +title: Title for search engines; can be different from the actual heading +description: A short description of this page +image: a thumbnail image to be shown in social media cards +keywords: [keywords, describing, the main topics] +--- +``` + +When creating your React page, adding these fields in `Layout` would also improve SEO. + +:::tip + +Prefer to use front matter for fields like `description` and `keywords`: Docusaurus will automatically apply this to both `description` and `og:description`, while you would have to manually declare two metadata tags when using the `` tag. + +::: + +For JSX pages, you can use the Docusaurus [``](docusaurus-core.md#head) component. + ```jsx title="my-react-page.jsx" import React from 'react'; +import Layout from '@theme/Layout'; import Head from '@docusaurus/Head'; export default function page() { @@ -58,22 +80,9 @@ export default function page() { } ``` -Docusaurus automatically adds `description`, `title`, canonical URL links, and other useful metadata to each Markdown page. They are configurable through front matter: - -```md ---- -title: Title for search engines; can be different from the actual heading -description: A short description of this page -image: a thumbnail image to be shown in social media cards -keywords: [keywords, describing, the main topics] ---- -``` - -When creating your React page, adding these fields in `Layout` would also improve SEO. - :::tip -Prefer to use front matter for fields like `description` and `keywords`: Docusaurus will automatically apply this to both `description` and `og:description`, while you would have to manually declare two metadata tags when using the `` tag. +For convenience, the default theme `` component accept `title` and `description` as props. ::: diff --git a/website/versioned_docs/version-2.0.0-beta.16/static-assets.md b/website/versioned_docs/version-2.0.0-beta.18/static-assets.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/static-assets.md rename to website/versioned_docs/version-2.0.0-beta.18/static-assets.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/styling-layout.md b/website/versioned_docs/version-2.0.0-beta.18/styling-layout.md similarity index 91% rename from website/versioned_docs/version-2.0.0-beta.16/styling-layout.md rename to website/versioned_docs/version-2.0.0-beta.18/styling-layout.md index e2f877d4b362..b6cba21b2e5d 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/styling-layout.md +++ b/website/versioned_docs/version-2.0.0-beta.18/styling-layout.md @@ -20,7 +20,7 @@ There are a few approaches/frameworks which will work, depending on your prefere This is the most traditional way of styling that most developers (including non-front-end developers) would be familiar with. It works fine for small websites that do not have much customization. -If you're using `@docusaurus/preset-classic`, you can create your own CSS files (e.g. `/src/css/custom.css`) and import them globally by passing them as an option into the preset. +If you're using `@docusaurus/preset-classic`, you can create your own CSS files (e.g. `/src/css/custom.css`) and import them globally by passing them as an option of the classic theme. ```js title="docusaurus.config.js" module.exports = { @@ -114,7 +114,7 @@ Alternatively, use the following tool to generate the different shades for your ### Dark Mode {#dark-mode} -In light mode, the `` element has a `data-theme="light"` attribute; and in dark mode, it's `data-theme="dark"`. Therefore, you can scope your CSS to dark-mode-only by targeting `html` with a specific attribute. +In light mode, the `` element has a `data-theme="light"` attribute; in dark mode, it's `data-theme="dark"`. Therefore, you can scope your CSS to dark-mode-only by targeting `html` with a specific attribute. ```css /* Overriding root Infima variables */ @@ -129,14 +129,14 @@ In light mode, the `` element has a `data-theme="light"` attribute; and in ### Mobile View {#mobile-view} -Docusaurus uses `966px` as the cutoff between mobile screen width and desktop. If you want your layout to be different in the mobile view, you can use media queries. +Docusaurus uses `996px` as the cutoff between mobile screen width and desktop. If you want your layout to be different in the mobile view, you can use media queries. ```css .banner { padding: 4rem; } /** In mobile view, reduce the padding */ -@media screen and (max-width: 966px) { +@media screen and (max-width: 996px) { .heroBanner { padding: 2rem; } @@ -145,7 +145,7 @@ Docusaurus uses `966px` as the cutoff between mobile screen width and desktop. I ## CSS modules {#css-modules} -To style your components using [CSS Modules](https://github.com/css-modules/css-modules), name your stylesheet files with the `.module.css` suffix (e.g. `welcome.module.css`). webpack will load such CSS files as CSS modules and you have to reference the class names from the imported CSS module (as opposed to using plain strings). This is similar to the convention used in [Create React App](https://facebook.github.io/create-react-app/docs/adding-a-css-modules-stylesheet). +To style your components using [CSS Modules](https://github.com/css-modules/css-modules), name your stylesheet files with the `.module.css` suffix (e.g. `welcome.module.css`). Webpack will load such CSS files as CSS modules and you have to reference the class names as properties of the imported CSS module (as opposed to using plain strings). This is similar to the convention used in [Create React App](https://facebook.github.io/create-react-app/docs/adding-a-css-modules-stylesheet). ```css title="styles.module.css" .main { @@ -180,7 +180,7 @@ The class names will be processed by webpack into a globally unique class name d :::caution -This section is a work in progress. [Welcoming PRs](https://github.com/facebook/docusaurus/issues/1640). +CSS-in-JS support is a work in progress, so libs like MUI may have display quirks. [Welcoming PRs](https://github.com/facebook/docusaurus/issues/1640). ::: diff --git a/website/versioned_docs/version-2.0.0-beta.16/swizzling.md b/website/versioned_docs/version-2.0.0-beta.18/swizzling.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/swizzling.md rename to website/versioned_docs/version-2.0.0-beta.18/swizzling.md diff --git a/website/versioned_docs/version-2.0.0-beta.16/typescript-support.md b/website/versioned_docs/version-2.0.0-beta.18/typescript-support.md similarity index 99% rename from website/versioned_docs/version-2.0.0-beta.16/typescript-support.md rename to website/versioned_docs/version-2.0.0-beta.18/typescript-support.md index 3f9e09716855..13f6ad57158e 100644 --- a/website/versioned_docs/version-2.0.0-beta.16/typescript-support.md +++ b/website/versioned_docs/version-2.0.0-beta.18/typescript-support.md @@ -115,7 +115,7 @@ By default, the Docusaurus TypeScript config does not type-check JavaScript file The `// @ts-check` comment ensures the config file is properly type-checked when running: ```bash npm2yarn -npm run tsc +npx tsc ``` ::: diff --git a/website/versioned_docs/version-2.0.0-beta.16/using-plugins.md b/website/versioned_docs/version-2.0.0-beta.18/using-plugins.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.16/using-plugins.md rename to website/versioned_docs/version-2.0.0-beta.18/using-plugins.md diff --git a/website/versioned_sidebars/version-2.0.0-beta.16-sidebars.json b/website/versioned_sidebars/version-2.0.0-beta.18-sidebars.json similarity index 100% rename from website/versioned_sidebars/version-2.0.0-beta.16-sidebars.json rename to website/versioned_sidebars/version-2.0.0-beta.18-sidebars.json diff --git a/website/versions.json b/website/versions.json index c93a85922de0..17b19bf8eb64 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,4 +1,4 @@ [ - "2.0.0-beta.17", - "2.0.0-beta.16" + "2.0.0-beta.18", + "2.0.0-beta.17" ] diff --git a/website/versionsArchived.json b/website/versionsArchived.json index 561012c93e6b..c1fdc2893621 100644 --- a/website/versionsArchived.json +++ b/website/versionsArchived.json @@ -1,4 +1,5 @@ { + "2.0.0-beta.16": "https://623daf53d815110008446e27--docusaurus-2.netlify.app/docs/2.0.0-beta.16", "2.0.0-beta.15": "https://6220d0362c028b000827f851--docusaurus-2.netlify.app/docs/2.0.0-beta.15", "2.0.0-beta.14": "https://6218ceed1b19a70008d9c348--docusaurus-2.netlify.app/docs/2.0.0-beta.14", "2.0.0-beta.13": "https://61f16eafc42e860008d41557--docusaurus-2.netlify.app/docs/2.0.0-beta.13",