Compare commits

..

1458 Commits

Author SHA1 Message Date
Sébastien Lorber 26e0bd928c
docs(website): Announce v3.2 on website/homepage (#10004) 2024-03-29 19:43:45 +01:00
Sébastien Lorber 70415a4cef
chore: fix codesandbox default privacy (#9993) 2024-03-29 18:30:47 +01:00
Sébastien Lorber a34e3f8f91
chore: update examples to v3.2.0 (#10003) 2024-03-29 18:27:36 +01:00
Sébastien Lorber 7edfe0e2d1
docs: fix 3.2 blog post headings (#10002) 2024-03-29 18:06:33 +01:00
Sébastien Lorber debfc87d34
chore: release Docusaurus v3.2.0 (#10000) 2024-03-29 17:51:27 +01:00
Sébastien Lorber 1a5fe5c412
fix(mdx-loader): Ignore contentTitle coming after Markdown thematicBreak (#9999) 2024-03-29 15:07:53 +01:00
ozaki 821247142e
refactor(utils): remove duplicated function (#9972)
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
2024-03-29 14:45:30 +01:00
Sébastien Lorber efbe474e9c
refactor(core): improve dev perf, fine-grained site reloads - part 3 (#9975) 2024-03-28 12:39:07 +01:00
dependabot[bot] 06e70a4f9a
chore(deps): bump actions/dependency-review-action from 4.1.3 to 4.2.4 (#9981)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-28 11:37:03 +01:00
dependabot[bot] 1430c85a82
chore(deps): bump katex from 0.16.8 to 0.16.10 (#9982)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-28 11:36:54 +01:00
dependabot[bot] 8024d9b858
chore(deps): bump express from 4.18.2 to 4.19.2 (#9983)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-28 11:36:44 +01:00
dependabot[bot] 3877c1254f
chore(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 (#9977)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
2024-03-24 17:26:35 +01:00
Vlad Nestorov 6f17d54938
docs: use official GitHub Action to deploy to GitHub Pages (#9937)
Co-authored-by: ozakione <29860391+OzakIOne@users.noreply.github.com>
2024-03-21 16:01:10 +01:00
Sébastien Lorber 93a09ea086
refactor(core): improve dev perf, fine-grained site reloads - part2 (#9968) 2024-03-21 13:05:19 +01:00
Fafowora Sunkanmi 91f93656d8
docs: replace VuePress by VitePress on tool comparison section (#9971)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2024-03-21 13:05:05 +01:00
Zed Spencer-Milnes 9a47ec0581
refactor(website): organise blog posts by year (#9965) 2024-03-20 18:08:05 +01:00
Sébastien Lorber 9017fb9b1d
feat(sitemap): add support for "lastmod" (#9954) 2024-03-20 11:47:44 +01:00
Sébastien Lorber 465cf4d82c
refactor(docs,blog): last update timestamp should be in milliseconds instead of seconds (#9963) 2024-03-19 09:51:27 +01:00
dependabot[bot] 6c724ed857
chore(deps): bump follow-redirects from 1.15.4 to 1.15.6 (#9958)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 16:28:58 +01:00
ozaki c745021b01
feat(blog): add LastUpdateAuthor & LastUpdateTime (#9912)
Co-authored-by: OzakIOne <OzakIOne@users.noreply.github.com>
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
2024-03-15 12:50:06 +01:00
Max Schmitt 7938803747
fix(a11y): move focus algolia-search focus back to search input on Escape (#9945) 2024-03-14 17:26:26 +01:00
ozaki 14bec09670
fix(blog): apply trailing slash to blog feed (#9920)
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
2024-03-14 16:45:00 +01:00
Max Schmitt 032e3b8f4d
fix(theme): improve a11y of DocSidebarItemCategory expand/collapsed button (#9944) 2024-03-14 14:59:36 +01:00
ozaki 6151a41428
docs(website): update wrong translate id (#9946) 2024-03-14 12:54:41 +01:00
Sébastien Lorber 8d115a9e0d
feat(core): add new plugin allContentLoaded lifecycle (#9931) 2024-03-08 19:13:59 +01:00
Sébastien Lorber d02b96f7f5
refactor(core): improve dev perf, fine-grained site reloads - part1 (#9903) 2024-03-08 12:59:11 +01:00
ozaki eb6424cc27
docs(showcase): update link (#9929) 2024-03-07 23:47:28 +01:00
Hallbjörn Magnússon ee53208f9d
feat(theme-translations) Icelandic (is) (#9928)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2024-03-07 19:18:40 +01:00
suenryu 9d89607d4d
fix(theme-translations): complete and modify Japanese translations (#9915) 2024-03-07 18:59:09 +01:00
ozaki 319d73d54f
docs(team): update active docusaurus team member (#9893)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: OzakIOne <OzakIOne@users.noreply.github.com>
2024-03-06 11:17:28 +01:00
suenryu 2b6d8bd646
fix(theme-translations): add Japanese translations (#9910) 2024-03-06 00:00:57 +01:00
ozaki 6d8108b653
docs: update legacy MDX v1 links to markdown links (#9914) 2024-03-05 23:46:52 +01:00
ozaki 2851c93d0d
feat(blog): allow processing blog posts through a processBlogPosts function (#9886)
Co-authored-by: OzakIOne <OzakIOne@users.noreply.github.com>
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2024-03-05 22:58:16 +01:00
ozaki 05279dc3d8
docs: update legacy MDX v1 links to markdown links (#9913) 2024-03-05 20:04:12 +01:00
Joshua Chen 324c853da0
docs: emphasize "index slug" convention (#9906) 2024-03-04 12:33:17 +01:00
Sébastien Lorber 2152572a3b
fix(mdx-loader): mdx-code-block should support CRLF (#9897) 2024-02-29 13:20:03 +01:00
dependabot[bot] 0589b1475d
chore(deps): bump actions/dependency-review-action from 4.1.2 to 4.1.3 (#9892)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 10:05:12 +01:00
Sébastien Lorber f159bb2472
perf: optimize getFileCommitDate, make it async (#9890) 2024-02-24 23:32:18 +01:00
ozaki 0279c329ad
refactor(theme): dates should be formatted on the client-side instead of in nodejs code (#9868)
Co-authored-by: OzakIOne <OzakIOne@users.noreply.github.com>
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
2024-02-23 18:30:05 +01:00
Sébastien Lorber 6bf21d215c
fix(core): fix default i18n calendar used, infer it from locale if possible (#9878) 2024-02-22 17:06:12 +01:00
axel7083 85d74245f8
fix(argos): waiting for images decoding (#9875)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
2024-02-22 15:02:39 +01:00
Josue [4tro] A 76c0f5c2d9
fix(theme-translations): complete and improve Spanish theme translations (#9872)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2024-02-22 14:35:57 +01:00
dependabot[bot] 7a4826baa8
chore(deps): bump actions/dependency-review-action from 4.0.0 to 4.1.2 (#9869)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 14:02:19 +01:00
Aolin 06dabc69bd
docs: fix typos in deployment.mdx (#9877) 2024-02-22 10:39:24 +01:00
dependabot[bot] 4ca9b8e508
chore(deps): bump ip from 2.0.0 to 2.0.1 (#9874)
Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-20 14:43:21 -05:00
Chris Bateman 6b0f9703a3
chore(website): update @crowdin/crowdin-api-client (#9865) 2024-02-20 19:50:39 +01:00
krinza.eth 0d3ac877d5
docs(showcase): remove supabase (#9856)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2024-02-20 17:54:45 +01:00
ozaki 1bbc68bc30
chore(deps): update npm to yarn from 2.0.0 to 2.2.1 (#9861)
* chore(deps): update npm to yarn from 2.0.0 to 2.2.1

* test: update tests
2024-02-17 16:36:57 -05:00
Нуриль Барадусов 3426f848a3
fix(theme-classic): should use plurals for category items description (#9851)
Co-authored-by: Нуриль Барадусов <nuril.b@ati.su>
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
2024-02-15 20:07:48 +01:00
Sébastien Lorber b26e262981
fix(core): ensure core error boundary is able to render theme layout (#9852) 2024-02-15 17:25:17 +01:00
John Reilly 60d9346965
refactor(theme): use JSON-LD instead of microdata for blog structured data (#9669)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
2024-02-15 16:25:21 +01:00
翊小久 8abd1899a6
feat(swizzle): ask user preferred language if no language CLI option provided (#9681)
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
2024-02-15 15:08:01 +01:00
Rafael Martins 628752d92a
feat(create-docusaurus): ask user for preferred language when no language CLI option provided (#9442)
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
2024-02-15 13:05:05 +01:00
ozaki 6fd8408a2c
docs: typo (#9845) 2024-02-14 14:39:03 +01:00
ozaki 77723a1121
feat(plugin-vercel-analytics): add new vercel analytics plugin (#9687)
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
2024-02-14 13:25:39 +01:00
Liviu Ionescu 70ba9d2d01
feat(blog): add blog pageBasePath plugin option (#9838)
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
2024-02-13 13:27:23 +01:00
dependabot[bot] cc7f43580c
chore(deps): bump actions/setup-node from 4.0.1 to 4.0.2 (#9843)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-13 11:21:17 +01:00
ozaki a296d727b6
docs(blog-only): add warning and improve error log (#9839) 2024-02-09 19:34:32 +01:00
Sébastien Lorber 34297bc56d
refactor(core): internalize, simplify and optimize the SSG logic (#9798) 2024-02-08 18:44:45 +01:00
dependabot[bot] d740be0e9c
chore(deps): bump treosh/lighthouse-ci-action from 10.1.0 to 11.4.0 (#9824)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 10:28:33 +01:00
dependabot[bot] 506e763c07
chore(deps): bump marocchino/sticky-pull-request-comment from 2.8.0 to 2.9.0 (#9823)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 10:28:25 +01:00
n4n5 9e5679ff1a
docs: Add docs for Mermaid Component (#9816)
* add docs

* fix: missplace

* Update markdown-features-diagrams.mdx

* yarn format

* fix: correct language

* fix: typo
2024-02-02 17:26:07 +01:00
Vahid Naderi c1ac06768b
fix(i18n): add missing theme translations for fa locale (#9812) 2024-02-01 14:21:36 +01:00
Alberto Vilches 436e20a42a
docs: add "TypeScript support" section in the "Modules using Sass/SCSS" section (#9807)
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
2024-02-01 12:03:53 +01:00
Tatsunori Uchino 09b2005759
docs: backport #9471, #9692, and #9695 changes in v3.1.1 docs (#9804) 2024-02-01 11:46:18 +01:00
Sébastien Lorber 48cab8e3fb
chore: release Docusaurus 3.1.1 examples (#9797) 2024-01-26 14:33:03 +01:00
Sébastien Lorber ed88097f63
chore: release Docusaurus 3.1.1 docs (#9794) 2024-01-26 14:10:57 +01:00
Shamoil Arsiwala 3d8b70e0b3
docs: fix documented path of swizzled component (#9786) 2024-01-25 19:57:42 +01:00
Sébastien Lorber d3142c5ed5
fix(core): broken links optimization behaves differently than non-optimized logic (#9791) 2024-01-25 19:49:45 +01:00
Sébastien Lorber 2f2ed41829
fix(core): links with target "_blank" should no be checked by the broken link checker (#9788) 2024-01-25 18:18:11 +01:00
Emjek Cordover cce1698c60
docs: Note `showLastUpdateTime` requires complete checkout (#9784) 2024-01-25 13:19:55 +01:00
eitsupi 0266549a51
fix(mdx-loader): allow spaces before `mdx-code-block` info string (#9776) 2024-01-24 14:12:54 +01:00
Sébastien Lorber c827b6de2d
perf(core): optimize broken links checker (#9778) 2024-01-24 12:14:26 +01:00
Cole Cecil 8597e5dcdb
docs: update troubleshooting details for v3 migration (#9782) 2024-01-24 12:12:06 +01:00
dawei-wang 4b444d55e5
fix(create-docusaurus): fix typo in init template sample docs (#9783) 2024-01-24 11:57:55 +01:00
dependabot[bot] 333889d38d
chore(deps): bump actions/dependency-review-action from 3.1.5 to 4.0.0 (#9779)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 10:17:31 +01:00
Anatoly Kopyl 3c982127d7
fix(mdx-loader): the table-of-contents should display toc/headings of imported MDX partials (#9684)
Co-authored-by: Titus <tituswormer@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2024-01-19 18:58:11 +01:00
Jack Robson bed11f62bc
fix(core): conditionally include `hostname` parameter when using… (#9407) 2024-01-18 14:03:45 +01:00
Tatsunori Uchino f794559962
docs: add admonition for incompatibility with `*` and `**` in Chinese and Japanese in MDX v2+ (#9692) 2024-01-18 13:50:15 +01:00
Clément Vannicatte 604ccaa89c
docs: update Algolia DocSearch support links (#9755) 2024-01-18 13:31:24 +01:00
Sébastien Lorber 0469590cc4
docs: GitHub actions deployment should use fetch-depth: 0 + actions upgrades (#9759) 2024-01-18 12:01:02 +01:00
Sanjaiyan Parthipan e1899786a4
polish(theme): MDX images should use async decoding (#9470) 2024-01-12 21:25:18 +01:00
Tatsunori Uchino d75f99f9a6
fix(theme-common): fix missing code block MagicComments style in Visual Basic (.NET) 16 (#9727) 2024-01-12 21:13:24 +01:00
Sébastien Lorber 0a2e6e67d3
fix: remove old useless mdx typedefs (#9733) 2024-01-12 19:12:09 +01:00
Sébastien Lorber 4388267c26
fix(core): various broken anchor link fixes (#9732) 2024-01-12 16:09:45 +01:00
dependabot[bot] d94adf6a6c
chore(deps): bump follow-redirects from 1.15.2 to 1.15.4 (#9723)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 13:24:00 +01:00
dependabot[bot] 21599e22d0
chore(deps): bump actions/dependency-review-action from 3.1.4 to 3.1.5 (#9718)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 12:58:44 +01:00
Tatsunori Uchino 849608bcab
chore: check MDX even by VS Code cspell extension (#9713) 2024-01-08 15:51:20 +01:00
Sébastien Lorber e19b681e51
chore: Docusaurus v3.1 examples (#9707) 2024-01-05 19:46:02 +01:00
Sébastien Lorber c7e090f13a
chore: Docusaurus v3.1 docs + changelog + blog post (#9706) 2024-01-05 19:31:58 +01:00
Sébastien Lorber 16500436f7
fix(theme): allow empty code blocks and live playgrounds (#9704) 2024-01-05 13:37:48 +01:00
Sébastien Lorber ca09f238f3
docs: replace docLayoutComponent by new Docusaurus v3 options (#9697) 2024-01-04 14:27:51 +01:00
Sébastien Lorber e0052edc4c
fix(create-docusaurus): fix init template code blocks, and little improvements (#9696)
Co-authored-by: Ivan Mar (sOkam!) <7308253+heysokam@users.noreply.github.com>
2024-01-04 14:03:10 +01:00
ozaki fd49301a45
feat(core): make broken link checker detect broken anchors - add `onBrokenAnchors` config (#9528)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2024-01-04 12:56:20 +01:00
Tatsunori Uchino 332a466893
docs: add guide to keep title of caution admonitions (#9695) 2024-01-04 11:05:24 +01:00
ayip8 ece3d04d57
docs: Updates the Algolia DocSearch eligibility description to match DocSearch page (#9693) 2024-01-04 01:22:19 +01:00
Shahed Nasser ac5642079d
docs: update CLI command options (#9690) 2024-01-03 12:09:24 +01:00
Greg Bergé 5baa68bea0
docs: add Argos badge (#9685) 2024-01-02 15:45:58 +01:00
Kyle Tsang 5123035333
docs: fix remark-emoji name in 3.0.1 migration guide (#9677) 2024-01-02 15:44:06 +01:00
Simen Bekkhus 3389daefac
fix(pwa-plugin): upgrade workbox (#9668) 2023-12-27 23:32:33 +01:00
Sébastien Lorber bfb882c2f0
feat(mdx-loader): add support for siteConfig.markdown.remarkRehypeOptions (#9674) 2023-12-27 23:19:25 +01:00
Tatsunori Uchino bd7d64f455
feat(theme-common): code block MagicComments support for (Visual) Basic/Batch/Fortran/COBOL/ML (#9671) 2023-12-27 23:02:48 +01:00
Arthur d9d700c54f
docs(math): use list of steps for clearer guidance (#9659)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-12-22 13:15:25 +01:00
dependabot[bot] a180a3012f
chore(deps): bump actions/setup-node from 4.0.0 to 4.0.1 (#9642)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-21 17:52:25 +01:00
Joshua Chen 60d62d1d65
fix(cli): output help when no conventional config + no subcommand (#9648) 2023-12-21 12:28:37 +01:00
Sébastien Lorber affca7a9a2
feat: siteConfig.markdown.parseFrontMatter hook (#9624) 2023-12-16 02:50:26 +01:00
Nick Partridge 28e7298211
docs: slight improvement to GitHub header link styles (#9634)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-12-15 12:09:00 +01:00
dependabot[bot] 63d9bf2fbc
chore(deps): bump axios from 1.5.1 to 1.6.2 (#9633)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-14 13:46:50 +01:00
Sébastien Lorber e844c57e89
chore: attempt fo fix Lint Autofix workflow (#9632) 2023-12-14 13:32:00 +01:00
Sébastien Lorber 991429ff8a
fix(live-codeblock): stabilize react-live transformCode callback, fix editor/preview desync (#9631) 2023-12-14 12:56:28 +01:00
domeav 61116e2ad6
docs: Crowdin + MT issue (#9620)
Co-authored-by: Dominique Eav <dominique.eav@blue-mind.net>
2023-12-09 00:01:43 +01:00
ozaki d3752d227b
feat(core): enable port configuration via environment variable (#9610)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-12-07 11:46:35 +01:00
Lucas Rosa e00340331d
docs: fix docusaurus-core.mdx typo on useGlobalData (#9616) 2023-12-07 11:31:11 +01:00
Joshua Chen c8c93a3854
fix(utils): Markdown link replacement with <> but no spaces (#9617) 2023-12-07 11:27:28 +01:00
axmmisaka 8dd1e13f2a
fix(type-aliases): add `title` prop for imported inline SVG React components (#9612)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-12-05 17:29:38 +01:00
dependabot[bot] 56396f32eb
chore(deps): bump actions/dependency-review-action from 3.1.3 to 3.1.4 (#9613)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-05 16:39:08 +01:00
ozaki 4cc56133f7
fix(content-blog): add baseUrl for author.image_url (#9581) 2023-12-05 16:36:46 +01:00
Sébastien Lorber 7650829e91
chore: add lint autofix CI job (#9604) 2023-12-01 20:09:04 +01:00
Janessa Garrow 209b035399
refactor(theme-common): allow optional desktopBreakpoint param in useWindowSize (#9335)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-12-01 17:40:27 +01:00
Zwyx b40524fe5f
docs: fix v2 admonitions syntax being replaced in migration guide (#9574) 2023-12-01 16:42:26 +01:00
Sébastien Lorber 452adcf735
docs: add link to onDuplicateRoutes page (#9602) 2023-12-01 16:15:43 +01:00
c0h1b4 bfd2cdbd65
fix(i18n): complete translations for theme-common.json Brazilian Portuguese (pt-BR) (#9477) 2023-12-01 16:15:03 +01:00
Sébastien Lorber 321e674cc6
chore: fix argos workflow (#9601) 2023-12-01 15:58:31 +01:00
Sébastien Lorber 13cd6d4ffd
chore: examples for Docusaurus 3.0.# (#9599) 2023-11-30 20:07:10 +01:00
Sébastien Lorber d59ea067ec
chore: docs for Docusaurus 3.0.1 (#9597) 2023-11-30 19:46:19 +01:00
Sébastien Lorber dc3584c2aa
docs: remove legacy useless readme section (#9595) 2023-11-30 18:38:51 +01:00
Tony 24e5b2c95c
docs: add meilisearch-docsearch to resources (#9594) 2023-11-30 18:18:31 +01:00
洪鈞閔 ( jasper ) 6e8292da4c
docs: update guide to mdx v3 typo (#9585) 2023-11-26 18:50:13 +01:00
Seth Falco 17c93e444e
docs: easyops-cn/docusarus-search-local v3 support (#9583) 2023-11-26 15:21:55 +01:00
Timo Wenz 829fbbdea6
docs: Anchor Tag fixed in README.md Header (#9576) 2023-11-23 22:17:09 +01:00
MCR Studio dcb36facc6
chore(debug-plugin): migrate to a new maintained JSON Viewer (#9566)
Co-authored-by: Joey Clover <joey@popos.local>
2023-11-23 19:53:45 +01:00
Tatsunori Uchino 6cc29fac01
docs: add heads up for Prettier users (#9471)
* docs: add a note on the use of Prettier for MDX

* docs: add guides for Prettier users migrating to v3

* Update website/docs/guides/markdown-features/markdown-features-react.mdx

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

* docs: Update MDX version

* Update website/docs/migration/v3.mdx

* Update v3.mdx

---------

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-11-23 13:38:04 -05:00
ozaki 8dc24b6a98
docs: broken link in release 3.0 page (#9573)
fix: typo
2023-11-23 00:28:14 -05:00
Chongyi Zheng bda8f14f89
chore: upgrade prism-react-renderer to 2.3.0 to avoid older clsx (#9572) 2023-11-21 23:37:11 +01:00
Sébastien Lorber 7c32fc341f
fix: add v2 retrocompatible support for quoted admonitions (#9570) 2023-11-21 20:49:34 +01:00
Chongyi Zheng 2c0bf8a3d8
chore: Upgrade clsx to 2.0.0 (#9464)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-11-21 19:29:18 +01:00
dependabot[bot] afacb110b5
chore(deps): bump actions/github-script from 7.0.0 to 7.0.1 (#9568)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-21 12:41:10 +01:00
Sébastien Lorber 58f59e7f89
fix(theme): upgrade prism-react-renderer, fix html script and style tag highlighting (#9567) 2023-11-21 12:40:28 +01:00
Nick Gerleman 424ffd2e29
chore(core): replace `wait-on` dependency with custom lighter code (#9547) 2023-11-20 17:45:01 +01:00
dependabot[bot] 7dcad0c632
chore(deps): bump actions/github-script from 6.4.1 to 7.0.0 (#9543)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-11-16 23:52:12 +01:00
Agastya Darma aeca87a202
docs: enhance og image tag description in documentation (#9560) 2023-11-16 11:10:11 -05:00
Shreesh Nautiyal 6f70b27694
fix(theme-classic): fixed wrong cursor on dropdown menu in navbar, when window is small (#9398) 2023-11-15 17:29:12 -05:00
Kacper Choła cf08ec9790
chore: remove CI Score badge (#9542) 2023-11-15 17:27:47 -05:00
dependabot[bot] 5e1587b4d9
chore(deps): bump actions/dependency-review-action from 3.1.1 to 3.1.3 (#9544)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 3.1.1 to 3.1.3.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](9f45b2463b...7bbfa034e7)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-15 13:28:40 -05:00
Adam Patterson 78606c4d9a
docs: add missing comma (#9555)
* Update v3.mdx Missing comma

* Fix more

---------

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-11-15 12:37:20 -05:00
Oluwatobi Sofela daf47dfba1
docs: delete duplicate closing div tag (#9545)
* docs: delete duplicate closing div tag

* Fix another

* Fix another

---------

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-11-15 12:21:16 -05:00
Emma Alexia fed25eed0b
docs: Remove extraneous "hey" from configuration page (#9540)
* fix: Remove extraneous "hey" in Docusaurus configuration docs

* Fix

---------

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-11-13 11:15:44 -05:00
Sébastien Lorber b464545629
fix: v3 admonitions should support v2 title syntax for nested admonitions (#9535)
Fix admonition title mdx v1 compat option when admonition is nested
2023-11-11 22:23:27 +01:00
reece-white 95d3a65e74
chore: ugrade babel dependencies to v7.23.3 (#9529) 2023-11-10 19:16:36 +01:00
Mikey O'Toole be5b5c660f
docs: versioning docs should show example versioned sidebar files (#9500)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-11-10 19:03:18 +01:00
Sébastien Lorber e68ef88336
fix(theme): docs html sidebar items should always be visible (#9531) 2023-11-10 18:12:55 +01:00
Sébastien Lorber 328e5f7ddc
fix(theme): fix firefox CSS :has() support bug (#9530) 2023-11-10 17:46:25 +01:00
dependabot[bot] e494f16d3c
chore(deps): bump actions/dependency-review-action from 3.1.0 to 3.1.1 (#9510)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-10 12:22:13 +01:00
Shahed Nasser 9b66f575e7
docs: fix incorrect package name for remark-emoji in migration guide (#9522) 2023-11-09 13:08:49 -05:00
Sébastien Lorber 791da2e4a1
fix(create-docusaurus): fix readme docusaurus 2 ref (#9487) 2023-10-31 23:15:16 +01:00
Mikey O'Toole 9a425bc51b
fix(website): Fix typo in announcement bar (#9484)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-10-31 23:00:14 +01:00
Sébastien Lorber b3e16c66f3
chore: update examples for v3.0.0 (#9482) 2023-10-31 22:53:06 +01:00
Sébastien Lorber a456fefca1
docs: Docusaurus v3.0 blog post (#9433)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Dmitry Vinnik <dmitryvinn@users.noreply.github.com>
2023-10-31 17:04:44 +01:00
Sébastien Lorber 85e5e552cb
chore: release Docusaurus 3.0.0 (#9478) 2023-10-31 16:39:21 +01:00
Sébastien Lorber 10897416dc
docs: archive v2 docs versions + create 2.x docs (#9472) 2023-10-30 14:06:32 +01:00
Sébastien Lorber 495c7936b6
chore: v3.0.0-rc.1 release (#9453) 2023-10-26 20:10:02 +02:00
Sébastien Lorber 4a0bd92148
docs: v3 upgrade guide should mention MDX v1 compat options (#9452) 2023-10-26 15:58:37 +02:00
Sébastien Lorber 7e456ece3c
feat(mdx-loader): upgrade to MDX v3 + (#9451) 2023-10-26 15:47:11 +02:00
Sébastien Lorber 8d19054d91
fix(theme): fix useWindowSize React hydration issue (#9446) 2023-10-25 18:18:15 +02:00
Sébastien Lorber d07567e411
chore: revert Lighthouse numberOfRuns due to bad/verbose reporting (#9448) 2023-10-25 12:28:49 +02:00
Sébastien Lorber dd03a25a71
chore: Make Lighthouse CI run on local build (#9447) 2023-10-25 11:44:47 +02:00
ozaki c6762a2542
feat(mdx-loader): Remark plugin to report unused MDX / Markdown directives (#9394)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-10-24 16:15:49 +02:00
Greg Bergé 56cc8e8ffa
chore(ci): fix missing screenshots on Argos (#9445) 2023-10-24 13:04:18 +02:00
Sébastien Lorber f80e1bdb32
refactor(blog-plugin): blog archive reverse ordering of posts (#9438) 2023-10-24 12:24:43 +02:00
dependabot[bot] 911dfb46d7
chore(deps): bump actions/setup-node from 3 to 4 (#9440)
* chore(deps): bump actions/setup-node from 3 to 4

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Update version numbers

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-10-23 16:38:50 -04:00
dependabot[bot] e525794c9e
chore(deps): bump actions/checkout from 4.1.0 to 4.1.1 (#9441)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8ade135a41...b4ffde65f4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 16:33:21 -04:00
Sébastien Lorber aa958f0cc1
fix(plugin-blog): blog archive should hide unlisted blog posts (#9437) 2023-10-23 15:27:41 +02:00
Greg Bergé 2bb4fd0a65
chore(ci): use new Argos playwright integration (#9419)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-10-20 17:03:37 +02:00
Maciek Palmowski f674e02320
docs: update Kinsta deployment documentation (#9430)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-10-20 14:59:24 +02:00
Sébastien Lorber 7ee2f75ce1
chore: v3.0.0-rc.0 release (#9418) 2023-10-20 11:24:29 +02:00
Sébastien Lorber 4e150d2b82
docs: add Docusaurus v3.0 upgrade guide (#9417) 2023-10-19 19:38:32 +02:00
Chongyi Zheng 45f1a669b5
feat(core): support TypeScript + ESM configuration (#9317)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-10-14 02:46:03 +02:00
Sébastien Lorber 336a44f3ea
chore: remove docusaurus-migrate (#9400) 2023-10-13 12:37:43 +02:00
Surav Shrestha ae3191654c
docs: fix typos in website/docs/i18n/i18n-git.mdx (#9396) 2023-10-12 18:45:14 +02:00
Surav Shrestha d7890a18d4
docs: fix typos in website/docs/migration/migration-manual.mdx (#9397) 2023-10-12 18:43:34 +02:00
John Reilly 209aae6e57
chore: point lighthouse to blog to reproduce https://github.com/facebook/docusaurus/issues/9379 (#9393)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-10-12 13:38:30 +02:00
Sébastien Lorber 4245b3d721
docs: fix algolia crowler config template link for v3 (#9388) 2023-10-09 19:20:56 +02:00
John Reilly 643a7fe5a3
fix(core): log missing errorInfo in React 18 onRecoverableError callback (#9387)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-10-09 15:28:06 +02:00
Sébastien Lorber d86aa0da5f
fix(mdx-loader): get correct error line numbers, handle front matter + contentTitle with remark (#9386) 2023-10-09 14:55:09 +02:00
Sébastien Lorber 35441b38e4
fix(theme): avoid rendering empty search container if site has no search plugin (#9385) 2023-10-08 20:04:42 +02:00
Sébastien Lorber 77b3b54def
chore: remove deprecated Google UA tracking id (#9384) 2023-10-08 19:28:48 +02:00
Jorens Merenjanu 1319996083
feat(core): throw error when official docusaurus dependencies use different versions (#9381)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-10-08 18:51:52 +02:00
Chongyi Zheng dceaae41d7
chore: upgrade syntax highlighting dependencies, `prism-react-renderer` to v2, `react-live` to v4 (#9316)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-10-06 19:15:14 +02:00
Dinh Bao Dang df42d891c2
docs(deployment): add permissions config to github action file in v2.4.3 (#9377) 2023-10-06 12:58:29 +02:00
Zwyx e17784effa
fix(mdx-loader): prevent Open Graph images from being inserted as base64 (#9369)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-10-05 14:21:27 +02:00
Sébastien Lorber 15647a3abd
chore: disable broken links check for i18n staging (#9375) 2023-10-05 12:49:12 +02:00
Sébastien Lorber 81d30a4712
chore: fix i18n staging deployment error (#9374) 2023-10-05 12:30:27 +02:00
Tatsunori Uchino bca375238f
fix(theme-translations): add Japanese translation for "warning" (#9362) 2023-10-05 09:47:44 +02:00
dependabot[bot] 360b80468f
chore(deps): bump postcss from 8.4.26 to 8.4.31 (#9367)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-05 09:45:09 +02:00
Joshua Chen 683fe37806
chore: do not error on broken links when doing test build (#9363) 2023-10-02 20:00:11 +02:00
Sébastien Lorber 0624007271
refactor(website): change date of v3 preparation blog post + add missing section (#9358) 2023-09-29 19:04:18 +02:00
Dan Roscigno 8ae5264fd4
fix(website): fix typo in v3 preparation blog post (#9357) 2023-09-29 15:41:36 +02:00
Sébastien Lorber e9e4635d76
docs: "Preparing your site for Docusaurus v3" blog post (#9333)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-09-29 13:15:20 +02:00
ozaki bde9cfd84d
chore: update node engine version 18 (#9348)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-09-28 16:45:25 +02:00
初冬 a178654446
fix(theme-translations): add missing zh-Hans messages (#9321) 2023-09-28 10:36:36 +02:00
dependabot[bot] ae4a6f9d94
chore(deps): bump actions/checkout from 4.0.0 to 4.1.0 (#9344) 2023-09-25 18:03:14 -04:00
la55u 519428bce2
fix(theme-translations): complete and fix hungarian translations (#9338) 2023-09-25 14:47:50 +02:00
Sébastien Lorber 46407ecc2d
chore: do not fail the build if a localized site has a broken link (#9339) 2023-09-22 17:50:50 +02:00
Sébastien Lorber 84b165c4f9
docs: "Upgrading frontend dependencies with confidence" blog post (#9330)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-09-22 17:07:29 +02:00
Sébastien Lorber 710dd1ab8e
chore: docs versioning typo (#9331) 2023-09-20 19:18:51 +02:00
Sébastien Lorber 6b8c5dfd11
chore: update examples to Docusaurus 2.4.3 (#9329) 2023-09-20 18:08:53 +02:00
Sébastien Lorber bca980aeef
chore: rename 2.4.2 docs/changelog to 2.4.3 after bad publish (#9327) 2023-09-20 17:57:16 +02:00
Sébastien Lorber 68e4ceaaaa
docs: create Docusaurus v2.4.2 release docs + changelog (#9325) 2023-09-20 17:29:52 +02:00
Sébastien Lorber 507d65800d
chore(theme-search-algolia): revert docsearch package range downgrade after bugfix release (#9320) 2023-09-19 11:28:27 +02:00
Sébastien Lorber 52d79c4e0c
chore: v3.0.0-beta.0 release (#9311) 2023-09-15 19:44:35 +02:00
qwerzl 6e8e276e40
fix(cli): disable vertical borders of the update notification (#9309) 2023-09-15 18:55:28 +02:00
Sébastien Lorber 598b32011f
chore(plugin-docs): remove legacy versioned prefix on doc ids and sidebar names in versioned sidebars (#9310) 2023-09-15 18:52:42 +02:00
Sébastien Lorber f5ae537d3e
fix(theme): make warning a first-class admonition, and deprecate caution admonition (#9308) 2023-09-15 10:48:21 +02:00
Sébastien Lorber 58be496da2
feat(theme-mermaid): upgrade Mermaid to v10.4 - handle async rendering (#9305) 2023-09-14 17:23:07 +02:00
Biplav Kumar Mazumdar dc7ae426ac
fix(website): fix showcase search input (#9260)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-09-14 17:03:29 +02:00
Forresst bd8616a23f
chore(theme-translations): complete French translations (#9304) 2023-09-14 14:49:42 +02:00
Pinaki Bhattacharjee 83d9f228b3
fix(theme): improve docs sidebar category caret aria-label accessibility (#9269)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-09-14 13:01:02 +02:00
qwerzl 3cad29a0ad
chore(theme-translations): complete zh-Hant translations (#9302)
* Update theme-common.json

* Update packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

---------

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-09-13 23:39:18 -04:00
dependabot[bot] 49bcd291f5
chore(deps): bump actions/dependency-review-action from 3.0.8 to 3.1.0 (#9298)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 3.0.8 to 3.1.0.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](f6fff72a32...6c5ccdad46)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 17:04:18 -04:00
Andrés Villanueva 3f09fb11a1
fix(theme-translations): add missing Spanish theme translations (#9292) 2023-09-08 19:25:13 +02:00
Forresst 7ce0d87575
docs: fix bad link for create doc (#9288) 2023-09-07 12:31:03 +02:00
dependabot[bot] b9bdad747b
chore(deps): bump actions/checkout from 3 to 4 (#9277)
* chore(deps): bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Apply suggestions from code review

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-09-05 19:14:28 -04:00
Sébastien Lorber 97d5dd094d
fix(theme-common): remove useless useSyncExternalStore shim (#9276) 2023-09-04 16:21:59 +02:00
Sébastien Lorber 6f9f8eeebd
chore: remove useless Argos screenshot css (#9273) 2023-08-31 13:56:07 +02:00
Sébastien Lorber 08f3a1163a
chore: refactor argos stylesheet + hide flaky producthunt badge (#9259) 2023-08-31 12:59:27 +02:00
Max Schmitt bc150d2c85
ci: only install Chromium for Playwright Argos tests (#9264) 2023-08-31 12:57:29 +02:00
Coupy a145205848
docs: fix typo in docs-introduction (#9267) 2023-08-31 12:28:23 +02:00
Sébastien Lorber 9868babf75
fix(mdx-loader): improve mdxJsxTextElementToHtml (#9262) 2023-08-25 19:05:16 +02:00
Sébastien Lorber b3c8f5c929
feat: Docusaurus v3 upgrades and require TypeScript 5 (#9258) 2023-08-25 10:54:58 +02:00
Sébastien Lorber da85e22778
test: fix flaky screenshots, add html data-has-hydrated attribute (#9256) 2023-08-25 08:13:48 +02:00
Hayden Hong 17d3e60e20
chore: bump devcontainer to Ubuntu 22.04 to resolve arm64 incompatibility (#9245) 2023-08-24 16:22:34 +02:00
Colin McDonnell 13a8ba1528
feat: support bun package manager in `create-docusaurus` (#9241) 2023-08-24 14:49:03 +02:00
dependabot[bot] 101e133f74
chore(deps): bump actions/dependency-review-action from 3.0.7 to 3.0.8 (#9251)
* chore(deps): bump actions/dependency-review-action from 3.0.7 to 3.0.8

Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 3.0.7 to 3.0.8.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](7d90b4f05f...f6fff72a32)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Update .github/workflows/dependency-review.yml

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-08-21 17:20:01 -04:00
dependabot[bot] bc22da956a
chore(deps): bump marocchino/sticky-pull-request-comment from 2.7.0 to 2.8.0 (#9250)
chore(deps): bump marocchino/sticky-pull-request-comment

Bumps [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/marocchino/sticky-pull-request-comment/releases)
- [Commits](f6a2580ed5...efaaab3fd4)

---
updated-dependencies:
- dependency-name: marocchino/sticky-pull-request-comment
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 17:08:43 -04:00
Hidde de Vries 0cb84b831d
docs: Reword comparison between React authoring and CSS authoring (#9247)
This sentence contrasts authoring React with authoring CSS. The previous version did this in a way that makes the React authoring seem like a more advanced activity (“actual (…) code”), and authoring CSS the less advanced (described as “playing with”). The rewording tries to address that.
2023-08-20 13:30:03 -04:00
Sébastien Lorber cf723b74e7
chore: remove QuestDB from showcase (#9244) 2023-08-18 17:45:53 +02:00
Sébastien Lorber ca352686dc
fix(theme-common): ThemedComponent should display something when JS is disabled (#9243) 2023-08-18 17:11:52 +02:00
James Kerrane 67c40069d1
docs: fix grammatical error, rewrite sentence to make clearer (#9223) 2023-08-17 12:24:48 +02:00
dependabot[bot] 24fabd2fa4
chore(deps): bump actions/dependency-review-action from 3.0.6 to 3.0.7 (#9227)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-17 11:03:01 +02:00
Biplav Kumar Mazumdar 9da986e626
docs(website): Add a "clearAll" button to site showcase (#9233) 2023-08-16 19:51:51 +02:00
Sébastien Lorber a59aead1e2
chore: attempt to fix Crowdin issues (#9220) 2023-08-12 02:56:54 +02:00
Sébastien Lorber 4aef958a99
test(argos): fix Argos visual tests flakiness, hide docs last-update element (#9219) 2023-08-11 15:30:20 +02:00
yosukekato165 19ee437f64
fix(mdx-loader): ensure heading anchor slugs respect GitHub emoji behavior (#9202)
Co-authored-by: YosukeKato <katouyousuke@YosukeKato.local>
2023-08-10 18:17:07 +02:00
Sujal Gupta 1e40943176
fix(theme): make Prism code block language / additionalLanguages case insensitive (#9183)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-08-10 17:30:41 +02:00
Sébastien Lorber b96004e77e
fix(create-docusaurus): increase Browserslist support query in dev (#9217) 2023-08-10 16:30:07 +02:00
Gareth Dwyer 577df0346d
fix(theme): fix typo in swizzle component config (#9216) 2023-08-10 15:13:50 +02:00
Jean Humann fa39e8c008
docs(pdf): replace mr-pdf with maintained fork docs-to-pdf (#9212) 2023-08-10 15:09:12 +02:00
Joshua Chen 3e9648e3d6
docs: add the missing import logger statement (#9210) 2023-08-07 17:41:23 -04:00
rsteele6 3c1fe15b17
docs: grammar fixes and minor clarifications (#9150)
* Grammar fixes and minor clarifications

* Apply suggestions from code review

There's still a few pending ones that I posted replies on; I'll send those in a separate commit.

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

* Update website/docs/deployment.mdx

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

* Update website/docs/deployment.mdx

* PR 9150: made updates based on comments

* Prettier

---------

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-08-06 23:28:39 -04:00
VinceCYLiao 109ab0c293
fix(content-blog): links in feed should be absolute (#9151)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: 政宇 廖 <vince.liao@nextbank.com.tw>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-08-03 18:36:40 +02:00
Sébastien Lorber 062a0d2eb6
test(blog-plugin): fix ability to generate proper blog website fixture build snapshot (#9195) 2023-08-03 17:57:11 +02:00
John Reilly 4ecc86f89f
feat(blog-plugin): limit option for blog feedOptions (#9189) 2023-08-03 15:53:43 +02:00
thedevwonder e0bb39a40a
fix(theme): change schema.org itemType prop urls from http to https (#9184) 2023-07-28 19:37:05 +02:00
FlorinaPacurar 5e147e8914
feat(theme): add support for meta og locale and alternates (#9152) 2023-07-28 17:16:46 +02:00
Oluwatobi Sofela 983fb2d273
docs: remove 'import type' declaration in javascript snippet (#9180) 2023-07-27 15:07:57 +02:00
Oluwatobi Sofela 2276dfbd3e
docs: improve the opening sentence's clarity (#9177) 2023-07-27 12:39:08 +02:00
dependabot[bot] b7f16b7b2e
chore(deps): bump marocchino/sticky-pull-request-comment from 2.6.2 to 2.7.0 (#9174)
chore(deps): bump marocchino/sticky-pull-request-comment

Bumps [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment) from 2.6.2 to 2.7.0.
- [Release notes](https://github.com/marocchino/sticky-pull-request-comment/releases)
- [Commits](f61b6cf21e...f6a2580ed5)

---
updated-dependencies:
- dependency-name: marocchino/sticky-pull-request-comment
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-25 10:41:49 -04:00
Sébastien Lorber 09ea3bcfab
feat(client-redirects-plugin): support fully qualified urls and querystring/hash in destination/to url (#9171) 2023-07-21 19:54:40 +02:00
Ori Shalom 4ea0a70f93
fix(theme): canonical url should be not change after hydration if url accessed with/without trailing slash (#9130)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-07-21 19:22:26 +02:00
Joshua Chen cd61c7bddc
fix(core): handle single quotes inside file paths (#9160) 2023-07-21 15:16:10 +02:00
Webber Takken 43d070ec55
docs: improve yarn deps upgrade command (#9149) 2023-07-20 12:08:06 +02:00
ModupeD f295e4fd64
docs: add Flightcontrol as a deployment option (#9139)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-07-20 11:46:44 +02:00
Joshua Chen ff227283d2
chore: upgrade dependencies (non-major) (#9148)
* chore: upgrade dependencies (non-major)

* Downgrade
2023-07-16 23:44:17 +08:00
Tatsunori Uchino 16a366b5ec
fix(init): change initial site URL to one that is safe for the future (#9133)
RFC 2606 reserves the `.example` domain for illustrative purposes.
2023-07-13 21:59:23 +08:00
Ahmad Shrif 26ae4164d6
feat(cli): deploy command should allow customizing git config user.name / user.email in deployment branch (#9101) (#9102)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-07-03 09:51:50 +02:00
Sébastien Lorber e8c1312793
fix(debug-plugin): upgrade react-json-view to maintained React-18 compatible fork (#9116) 2023-06-30 19:12:47 +02:00
Sébastien Lorber cde35d0f1f
chore: optimize Argos CI setup (#9115) 2023-06-30 18:12:46 +02:00
thedevwonder 8ea1945f35
fix(core): throw error if build folder already exists on initial clean (#9112)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-06-30 17:58:24 +02:00
Mikey O'Toole c8e7ce33f5
fix(theme): only set classname on ul elements if they have an existing class (#9099)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-06-30 15:39:07 +02:00
TheCatLady 9391a33c41
fix(content-docs): sidebar generator should return customProps for doc items (#9107) 2023-06-29 12:13:48 +02:00
TheCatLady 05156d05b9
feat(theme-classic): add description & keywords microdata to blog posts (#9108) 2023-06-29 12:02:22 +02:00
Sébastien Lorber ae2a09359a
fix(mdx): fix for html multi-line comments (#9100) 2023-06-23 19:33:03 +02:00
Sébastien Lorber cc6d9696f0
feat(mdx): add siteConfig.markdown.format to configure the default content parser (MDX / CommonMark) (#9097) 2023-06-23 18:15:05 +02:00
dependabot[bot] be4e67caa9
chore(deps): bump semver from 7.3.8 to 7.5.2 (#9096)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-23 09:18:49 +02:00
Sébastien Lorber 3b85f0713a
fix(theme): support details/summary in CommonMark + add md dogfood test cases (#9093) 2023-06-22 18:33:07 +02:00
Kolja Lampe 7225d80271
docs: fix themeConfig.prism.defaultLanguage table api ref docs (#9082)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-06-22 18:30:39 +02:00
Sébastien Lorber 0b3d5cb59e
fix(mdx-loader): loader error message should display stacktrace if no extra MDX details (#9091) 2023-06-22 16:44:01 +02:00
Shun Wakatsuki 48df4f1f0d
docs: fix filenames in docs/swizzling.mdx (#9074) 2023-06-16 17:40:17 +02:00
Sébastien Lorber 7d033cc8c0
chore: v3.0.0-alpha.0 release (#9072) 2023-06-15 17:48:55 +02:00
Sébastien Lorber 9866af7f44
feat(pages): add support for missing SEO front matter + improve SEO docs (#9071)
Co-authored-by: Thad Guidry <thadguidry@gmail.com>
2023-06-15 16:07:00 +02:00
Sujal Gupta 117cbac702
docs: update link for commonly used languages (#9065) 2023-06-14 17:33:23 +02:00
Manuel adebab969c
docs: update outdated links in showcase (#9055) 2023-06-14 17:24:30 +02:00
Marie ae1e49de5e
docs: add @markprompt/docusaurus-theme-search (#9063)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-06-14 17:23:25 +02:00
dependabot[bot] d7a9c9f18e
chore(deps): bump github/codeql-action from 2.3.6 to 2.13.4 (#9061)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.6 to 2.13.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](83f0fe6c49...cdcdbb5797)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 12:01:22 +08:00
Sébastien Lorber 012b285805
feat: create official TypeScript base config @docusaurus/tsconfig (#9050) 2023-06-09 15:21:46 +02:00
Sanjaiyan Parthipan 6102a5a671
feat: use React 18 startTransition for hydration (#9051) 2023-06-09 12:18:25 +02:00
Sébastien Lorber 187e5aa218
feat: React 18 + automatic JSX runtime + build --dev (#8961) 2023-06-08 19:40:15 +02:00
Joshua Chen 76f920359b
fix(utils): better handling of code blocks in link replacement (#9046) 2023-06-08 12:16:56 +02:00
Grégory Heitz dcce8ff3cd
docs: update info for community plugin docusaurus2-graphql-doc-generator (#9033) 2023-06-08 11:45:53 +02:00
Adithya Krishna 9d686bd7c8
docs: fix prism theme broken link in code blocks docs (#9044) 2023-06-08 10:53:33 +02:00
Adam Patterson c6c619e2f6
docs: fix grammar typo in swizzling.mdx (#9043) 2023-06-08 10:50:33 +02:00
dependabot[bot] ee15dec809
chore(deps): bump github/codeql-action from 2.3.5 to 2.3.6 (#9038)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-07 17:55:28 +02:00
dependabot[bot] 31da9a96e7
chore(deps): bump actions/dependency-review-action from 3.0.4 to 3.0.6 (#9039)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-07 17:55:15 +02:00
Akshay Bhalotia 4ac900da24
fix: typo in the sample site structure (#9042) 2023-06-07 01:57:28 +08:00
Sébastien Lorber 2d35edf911
feat(theme): add ability to inject data attributes from query-string - possibility to create an iframe/embed variant of a page (#9028) 2023-05-31 16:22:25 +02:00
bitpredator 444c1576ca
chore(theme-translations): complete it translations (#9025)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-05-31 14:35:15 +02:00
Sébastien Lorber ffcc68d1cf
chore: remove facebook template (#9026) 2023-05-31 12:54:40 +02:00
Wan Sim b4087720cb
fix(core): docusaurus CLI should detect the correct yarn version when suggesting upgrades (#9006)
* fix(core): Correct yarn version detection

Correct yarn version detection by checking `yarnPath` value inside `.yarnrc.yml` file
Add js-yaml in package.json

* Change to use `shelljs` instead of `js-yaml`

* Change echo mode to silent

* Check `yarn.lock` exist, before version checking

* Remove unnecessary optional chaining

Nullish coalescing operator still provides the fallback value

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

---------

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-05-31 11:54:44 +02:00
0x24Karthick 6939444c31
docs: remove Meta Data Policy footer link on website (#9024) 2023-05-31 11:37:05 +02:00
Mogyuchi 07d85af144
docs: fix link to rehype (#9018) 2023-05-30 17:17:52 +02:00
Gustav Tonér 8fb6057e31
fix(theme-transalations): fix Swedish translation of "last updated" (#9021) 2023-05-30 17:15:22 +02:00
JJ Style 30a4181290
feat(theme-common): code block MagicComments support for TeX/LaTeX/Matlab (#8982)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-05-30 15:28:28 +02:00
Naman Garg 4f3901b932
docs: fix broken link in code blocks docs (#8993) 2023-05-30 15:02:02 +02:00
dependabot[bot] e6533ca2f1
chore(deps): bump github/codeql-action from 2.3.3 to 2.3.5 (#9019) 2023-05-30 14:15:35 +08:00
Sébastien Lorber 9af32ae0d5
chore: update examples to Docusaurus 2.4.1 (#8981) 2023-05-15 15:50:54 +02:00
Sébastien Lorber ec3cb1f67d
docs: create Docusaurus v2.4.1 release docs + changelog (#8980) 2023-05-15 15:40:37 +02:00
Raphaël Barbazza 8b109342c8
docs: update link in md code blocks section (#8975)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-05-15 14:38:07 +02:00
Raphaël Barbazza 509189e61f
docs: update broken links theme configuration page (#8976)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-05-15 14:37:24 +02:00
Sébastien Lorber d746f689ae
fix: remove useless js-loader in front of mdx-loader (#8972) 2023-05-12 16:31:39 +02:00
Sébastien Lorber 905fe7f4b4
fix(theme): fix collapsible sidebar behavior when prefers-reduced-motion (#8971) 2023-05-12 12:18:34 +02:00
conlacda 3170515c89
docs: fix broken link to Prism includeLangs.js default list of languages (#8904) 2023-05-12 12:15:09 +02:00
Sébastien Lorber 07ad635b69
fix: allow html syntax in MDX v2 with format md (#8960)
* attempt to support html embeds in mdx with format md

* refactor mdx loader + support embedding html in commonmark thanks to rehype-raw

* extract processor code

* refactor processor code

* extract format + unit test

* try to refactor processor

* try to refactor processor

* adjust md page

* do not apply rehype-raw when format is mdx

* fix lint issue
2023-05-12 11:36:42 +02:00
dependabot[bot] af9a4f2a2e
chore(deps): bump github/codeql-action from 2.3.2 to 2.3.3 (#8964)
* chore(deps): bump github/codeql-action from 2.3.2 to 2.3.3

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.2 to 2.3.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f3feb00acb...29b1f65c5e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Apply suggestions from code review

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-05-08 20:16:49 -04:00
Thad Guidry fb4a5fb197
docs: mention equivalent config syntaxes (#8951)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-05-05 12:41:50 +02:00
samatt14 8beeb81c8a
docs(plugin-ideal-image): mention plugin changes type of imported images (#8948)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-05-03 19:38:05 +02:00
Thad Guidry cf9fa2e78f
docs: bidirectional link between api config and guide config (#8950)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-05-03 19:14:41 +02:00
Thad Guidry 2a96ec01de
polish(create-docusaurus): add comment in config to mention different ways to declare config + doc link (#8944)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-05-03 18:36:29 +02:00
allyw2002 7e01f36f37
docs: mention blog truncating marker edge case (#8953) 2023-05-03 18:17:27 +02:00
dependabot[bot] 1be4585f49
chore(deps): bump github/codeql-action from 2.3.0 to 2.3.2 (#8955)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-03 17:59:23 +02:00
MetuMortis 090316e66d
fix(theme-translations): fix Turkish translation for aria label "Enter key" (#8933) 2023-04-29 19:28:34 +02:00
Sébastien Lorber 44b5b06814
test: add visual regression tests with Argos CI (#8947) 2023-04-28 16:04:22 +02:00
Sébastien Lorber 7e09ae0c57
docs: rewrite some docs for mdx v2 (#8941)
Co-authored-by: Balthasar Hofer <lebalz@outlook.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-04-28 15:49:41 +02:00
Thad Guidry 2cae24fe5f
docs: mention docusaurus.community site in resources (#8943)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-04-28 12:46:55 +02:00
Joshua Chen 9e0b62fe6c
fix(utils): make Markdown link replacement much more rigorous (#8927) 2023-04-27 17:57:11 +02:00
John Cao 41f1c1e3c2
docs: mdx-js is using v2 for next edition (#8920) 2023-04-26 17:57:37 +02:00
Joshua Chen 1279765f75
chore: upgrade TypeScript to v5.0 (#8926) 2023-04-25 03:10:16 -04:00
dependabot[bot] 85b108aed2
chore(deps): bump marocchino/sticky-pull-request-comment from 2.5.0 to 2.6.2 (#8922) 2023-04-24 19:59:03 -04:00
dependabot[bot] a1129167da
chore(deps): bump treosh/lighthouse-ci-action from 9.6.8 to 10.1.0 (#8923) 2023-04-24 19:50:11 -04:00
dependabot[bot] 08f2b6828b
chore(deps): bump github/codeql-action from 2.2.12 to 2.3.0 (#8924) 2023-04-24 19:48:32 -04:00
Sébastien Lorber bf913aea2a
feat: upgrade to MDX v2 (#8288)
Co-authored-by: Armano <armano2@users.noreply.github.com>
2023-04-21 19:48:57 +02:00
Will Ceolin 10f161d578
feat(theme): add queryString option to localeDropdown (#8915)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-04-21 12:35:02 +02:00
Sébastien Lorber 4a4a8be062
chore: migrate website config to createConfigAsync (#8911) 2023-04-21 12:00:09 +02:00
Andrew Lyons 41a52161fd
fix(core): Correct yarn upgrade command for yarn 2.x (#8908)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-04-20 16:54:04 +02:00
Sébastien Lorber d220f481a7
fix(theme): add __ prefix to technical anchors, search crawlers (Algolia) should ignore them (#8909) 2023-04-20 16:39:50 +02:00
Sébastien Lorber f154b2f870
fix(theme-common): fix collapsible component with prefers-reduced-motion (#8906) 2023-04-19 19:07:31 +02:00
Aqueeb 9c7e29a157
docs: changing shopping card to shopping cart (#8898)
* docs: changing shopping card to shopping cart

* docs: changing shoppping card to shoppint cart (retriggering builds)
2023-04-18 22:56:56 -04:00
dependabot[bot] f852ea631f
chore(deps): bump github/codeql-action from 2.2.11 to 2.2.12 (#8899) 2023-04-17 20:50:24 -04:00
dependabot[bot] 4f7ff9448d
chore(deps): bump actions/checkout from 3.5.0 to 3.5.2 (#8900) 2023-04-17 20:50:03 -04:00
Tarun Chauhan b169404efd
feat(theme-common): code block MagicComments support for Lua/Haskell -- and WebAssembly ;; (#8870)
Co-authored-by: Tarun Chauhan <tarun.chauhan@tripjack.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-04-14 12:01:28 +02:00
Sébastien Lorber 08cfe4e3c9
fix(theme-common): fix confusing theme error message: bad sidebar id suggestions (#8873) 2023-04-13 16:41:29 +02:00
Sébastien Lorber f76fc1bfac
feat(theme): create more generic ThemedComponent util from ThemedImage (#8890) 2023-04-13 16:29:02 +02:00
Sébastien Lorber 14586895ae
docs: improve sidebar items custom props docs (#8888) 2023-04-13 12:24:27 +02:00
Eduardo Mínguez 35183d7d87
docs: add "permissions.content: write" to GH workflow examples (#8877)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-04-13 10:04:07 +02:00
Aleksandr Vladykin 2b994262b0
fix(utils): handle Markdown links with spaces to route correctly (#8874) 2023-04-12 19:14:26 +02:00
dependabot[bot] 3d31c55fe7
chore(deps): bump actions/github-script from 6.4.0 to 6.4.1 (#8879)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](98814c53be...d7906e4ad0)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-10 21:22:11 -04:00
dependabot[bot] 54f66c9e4e
chore(deps): bump github/codeql-action from 2.2.9 to 2.2.11 (#8878)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.9 to 2.2.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](04df1262e6...d186a2a36c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-10 21:21:55 -04:00
Sébastien Lorber a9a5f89b9f
fix(core): better error logging on SSR/dev failures + log stacktraces and error causes (#8872) 2023-04-07 19:00:59 +02:00
Chua Chee How 46d2aa231d
docs: add description on blog post file/folder naming conventions and date extraction patterns (#8845)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-04-06 15:51:01 +02:00
Armano 1d42955d67
refactor(theme): expose copy, success and word-wrap icons as standalone components (#8862) 2023-04-06 15:46:52 +02:00
Tarun Chauhan 59a0b7ae15
fix(theme-translations): remove redundant navigation text in aria label (#8842)
Co-authored-by: Tarun Chauhan <tarun.chauhan@tripjack.com>
2023-04-06 15:05:43 +02:00
Mikey O'Toole 096a7b5f23
fix: add auto theme switch to the Canny widget (#8846)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-04-06 15:00:27 +02:00
Jordan Manley 829a218a3f
docs: correct small grammar error (#8865)
Co-authored-by: JORDAN MANLEY <jordanmanley@JORDANs-MacBook-Pro.local>
2023-04-06 12:35:03 +02:00
Paul Razvan Berg 22f0101015
docs: link to mermaid config types (#8830) 2023-04-06 12:02:34 +02:00
Sachin Nanayakkara be0ac6c2cd
fix(create): add missing await (#8831) 2023-03-28 12:28:34 -04:00
dependabot[bot] 3f73221286
chore(deps): bump github/codeql-action from 2.2.7 to 2.2.9 (#8836)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.7 to 2.2.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](168b99b3c2...04df1262e6)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 17:25:51 -04:00
dependabot[bot] 1857d17b9e
chore(deps): bump actions/checkout from 3.4.0 to 3.5.0 (#8837)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](24cb908017...8f4b7f8486)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 17:25:14 -04:00
Sébastien Lorber e983f87005
chore: Crowdin download languages pt-BR + ja (#8822) 2023-03-24 16:38:18 +01:00
Sébastien Lorber 7e817a42ac
chore: use Crowdin CLI --language option to filter languages to download (#8820) 2023-03-24 15:10:16 +01:00
Sébastien Lorber b0f9fb2db4
chore: fix production site deployment due to Crowdin (#8818) 2023-03-24 13:26:07 +01:00
Sébastien Lorber c985513280
chore: update examples to Docusaurus 2.4.0 (#8815) 2023-03-23 19:50:19 +01:00
Sébastien Lorber 97caab16d4
docs: create Docusaurus v2.4.0 release docs + changelog + release blog post (#8811) 2023-03-23 19:32:09 +01:00
Sébastien Lorber da9f86409d
chore: fix workbox precaching page link + weird mdx structure breaking Crowdin (#8810) 2023-03-23 16:07:46 +01:00
Vishruta Patil a51ec623df
fix(theme): codeblock buttons should be kept on the right when using RTL locale (#8803)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-03-22 19:59:59 +01:00
Anton Kastritskii 9c6b79b579
docs: update suggestion for OSS meta projects (#8804) 2023-03-22 19:42:11 +01:00
Joshua Chen 3a73fdb53f
fix(theme): allow tabs children to be falsy (#8801) 2023-03-22 19:15:43 +01:00
dependabot[bot] c04fab3bfb
chore(deps): bump actions/checkout from 3.3.0 to 3.4.0 (#8797)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](ac59398561...24cb908017)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20 22:24:36 +01:00
dependabot[bot] 2c4d2c1522
chore(deps): bump actions/dependency-review-action from 3.0.3 to 3.0.4 (#8796)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](c090f4e553...f46c48ed6d)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20 22:24:17 +01:00
dependabot[bot] 2106b17688
chore(deps): bump github/codeql-action from 2.2.6 to 2.2.7 (#8795)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.6 to 2.2.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](16964e90ba...168b99b3c2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20 22:24:01 +01:00
Sébastien Lorber 361dfda2fd
docs: remove problematic mdx2 anchor id docs for MDX 2 migration (#8788) 2023-03-17 18:10:04 +01:00
biplavmz 49b1795c8a
polish(create-docusaurus): the starter template should use a navbar item "docSidebar" instead of "doc" (less fragile on updates) (#8712)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-03-16 17:18:42 +01:00
Sébastien Lorber 9c920c531b
docs: prepare docs for MDX 2 (#8782) 2023-03-16 17:02:38 +01:00
Sébastien Lorber 07c57a1528
chore: vendor MDX deps for Jest and the MDX 2 upgrade (#8781) 2023-03-16 15:57:46 +01:00
Sébastien Lorber ced57e501a
docs: fix localhost url without link (#8780) 2023-03-16 15:41:17 +01:00
Sébastien Lorber 88b6f5fc68
docs: v2 docs should discourage the usage of a lower-case MDX component (will not work in v3) (#8779) 2023-03-16 15:23:55 +01:00
Davide Donadio 5c271f5622
feat(content-docs): add support for sidebar item category/link descriptions in generated index page (#8236)
Co-authored-by: Davide Donadio <davide.donadio@it.clara.net>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-03-16 10:14:42 +01:00
Fxpby ca86fab2c9
docs: add description for themeConfig.footer fields copyright (#8761) 2023-03-15 19:11:35 +01:00
dependabot[bot] cff6c01dbf
chore(deps): bump treosh/lighthouse-ci-action from 9.3.1 to 9.6.8 (#8766)
Bumps [treosh/lighthouse-ci-action](https://github.com/treosh/lighthouse-ci-action) from 9.3.1 to 9.6.8.
- [Release notes](https://github.com/treosh/lighthouse-ci-action/releases)
- [Commits](e0fe113967...2e159d989f)

---
updated-dependencies:
- dependency-name: treosh/lighthouse-ci-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-13 22:11:13 +01:00
dependabot[bot] f478e27dc1
chore(deps): bump github/codeql-action from 2.2.5 to 2.2.6 (#8767)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.5 to 2.2.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](32dc499307...16964e90ba)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-13 22:11:04 +01:00
Sébastien Lorber 2f75979bc5
fix(search): search page should react to querystring changes + cleanup/refactor (#8757) 2023-03-10 19:13:58 +01:00
Tanner Dolby ea2b13ea94
polish(theme): better error messages on navbar item rendering failures + ErrorCauseBoundary API (#8735)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-03-09 18:56:21 +01:00
Tanner Dolby 7961c5b8d5
polish(core): better styling for error screens (#8736)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-03-09 16:13:19 +01:00
Joshua Chen e21591c073
chore: upgrade dependencies (non-major) (#8749)
chore: upgrade dependencies
2023-03-08 21:28:14 -05:00
Sébastien Lorber 4f790c705f
fix(core): baseUrl error banner link anchor case (#8746) 2023-03-08 19:21:22 +01:00
Anas 1a6879218d
fix(theme-translations): fix wrong arabic words (tip/next) (#8744) 2023-03-08 18:40:18 +01:00
dependabot[bot] 9866b7ef90
chore(deps): bump github/codeql-action from 2.2.4 to 2.2.5 (#8739)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-08 17:14:40 +01:00
Sébastien Lorber 0f7552accb
feat(theme): allow to load a Docusaurus page with theme from query-string: ?docusaurus-theme=dark (#8708) 2023-03-03 12:54:35 +01:00
Sébastien Lorber 50b1dc7db3
fix: bad routing for docusaurus.new ts functions (#8724) 2023-03-02 17:37:22 +01:00
Sébastien Lorber 62aba771df
docs: add TypeScript playgrounds to docusaurus.new + Playground page (#8723) 2023-03-02 17:07:29 +01:00
Fredrik Stave e78a6a6610
docs: add dark mode version of BrowserStack logo (#8709)
Co-authored-by: Fredrik Stave <fredrik.stave@schibsted.com>
2023-03-02 16:24:31 +01:00
Armano fabf053def
feat(npm-to-yarn): add support for PnPm and custom converters (#8690)
Co-authored-by: Ben Gubler <nebrelbug@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-02-24 17:59:15 +01:00
Sébastien Lorber 17781fd5d3
feat(core): add script env variables: NODE_ENV + BABEL_ENV + DOCUSAURUS_CURRENT_LOCALE (temporary i18n workaround) (#8677) 2023-02-24 14:19:39 +01:00
Dewansh Thakur fd021bdf47
fix(theme): improve color toggle when using dark navbar (#8615)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-02-23 19:24:03 +01:00
Kagan 1293970ebf
fix(theme-classic): fix tab focus bug in dropdown (#8697) (#8699)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-02-23 16:56:06 +01:00
Sébastien Lorber f8edeb0816
feat(theme-classic): respect `prefers-reduced-motion: reduce` mediaquery, bump Infima to alpha.43 (#8674) 2023-02-17 13:03:38 +01:00
Oleksandr Fediashov d98edcd95c
chore: bump update-notifier (#8660)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Fixes https://github.com/facebook/docusaurus/issues/8277
2023-02-17 11:18:15 +01:00
TrueQAP 1b9e2f2d45
feat(theme-translations): add Hungarian theme translations (#8668)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-02-16 17:15:34 +01:00
Mysterious_Dev 10a8d1264b
feat(theme): add ability to translate navbar+footer logo alt text (#8616)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-02-16 17:14:45 +01:00
Moritz Stückler 533777cf2b
feat(theme-common): allow passing a string for details summary (#8656)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2023-02-16 16:14:09 +01:00
Mikey O'Toole 5edd594613
docs: clarify query string behavior (#8642) 2023-02-16 16:07:15 +01:00
Petter Drønnen f40ac082ef
feat(theme-translations): add Norwegian (Bokmål) theme translation (#8631) 2023-02-15 20:00:55 +01:00
dependabot[bot] 1b4808d5d6
chore(deps): bump marocchino/sticky-pull-request-comment from 2.3.1 to 2.5.0 (#8663) 2023-02-13 16:52:24 -05:00
dependabot[bot] 6cb83fb5db
chore(deps): bump github/codeql-action from 2.2.2 to 2.2.4 (#8662) 2023-02-13 16:51:51 -05:00
Mysterious_Dev 6b618bc9e5
docs: normalize README for ideal-image plugin (#8630) 2023-02-08 01:05:14 -05:00
prateekbytes 620d185f13
docs: fix typo in CONTRIBUTING (#8637)
Update CONTRIBUTING.md
2023-02-08 01:00:33 -05:00
dependabot[bot] d23514d84c
chore(deps): bump github/codeql-action from 2.2.1 to 2.2.2 (#8638) 2023-02-06 15:29:30 -05:00
Sébastien Lorber 4a0d18905c
chore: update examples to Docusaurus 2.3.1 (#8629) 2023-02-03 15:04:21 +01:00
Sébastien Lorber ed1628e182
docs: create Docusaurus v2.3.1 release docs + changelog (#8627) 2023-02-03 14:48:39 +01:00
Sébastien Lorber 50d6d1e56b
fix(theme-common): fix issue in tab scroll position restoration on tab click (#8628) 2023-02-03 12:48:58 +01:00
dependabot[bot] faadfad30d
chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (#8624)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-03 11:12:43 +01:00
Sébastien Lorber fc64705148
chore: add "pr: dependencies" to lerna changelog labels (#8622) 2023-02-03 10:16:01 +01:00
Sébastien Lorber 32384b761c
feat(gtag-plugin): gtag should support multiple tracking ids, notably for the UA => GA4 transition (#8620) 2023-02-02 18:06:12 +01:00
Sébastien Lorber 5b05c0e73e
fix(theme-common): localStorage utils dispatch too many storage events leading to infinite loop (#8619) 2023-02-02 15:39:40 +01:00
Sébastien Lorber 140f0b1d4c
fix(theme-common): prepare usage of useSyncExternalStore compatibility with React 18 (#8618) 2023-02-02 14:41:33 +01:00
Joshua Chen 1bff83cacc
fix(theme-classic): allow rendering single tab item (#8593) 2023-02-02 12:19:31 +01:00
Sébastien Castiel 2f02beebe2
fix(utils): handle CRLF when parsing MDX imports (#8606) 2023-02-02 09:48:28 +01:00
Joshua Chen ece720b1a7
chore(theme-translations): complete zh translations (#8614) 2023-02-01 18:45:50 +01:00
Joshua Chen 58b3044306
misc: configure dependabot to use the right label (#8611) 2023-02-01 16:41:28 +01:00
Joshua Chen 0425917a50
fix(preset-classic): install the right plugin for googleTagManager (#8597) 2023-02-01 16:35:16 +01:00
dependabot[bot] 847a401669
chore(deps): bump actions/github-script from 6.3.3 to 6.4.0 (#8604)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.3 to 6.4.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](d556feaca3...98814c53be)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-31 19:22:42 -05:00
dependabot[bot] dfdd272f10
chore(deps): bump github/codeql-action from 2.1.39 to 2.2.1 (#8605)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.39 to 2.2.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](a34ca99b46...3ebbd71c74)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-31 19:22:14 -05:00
dependabot[bot] 0f9edc3c11
chore(deps): bump eta from 1.12.3 to 2.0.0 (#8610)
Bumps [eta](https://github.com/eta-dev/eta) from 1.12.3 to 2.0.0.
- [Release notes](https://github.com/eta-dev/eta/releases)
- [Commits](https://github.com/eta-dev/eta/compare/v1.12.3...v2.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-31 18:58:38 -05:00
Sébastien Lorber d184e84739
chore: update examples to Docusaurus 2.3.0 (#8590) 2023-01-27 18:20:52 +01:00
Sébastien Lorber de6ec3db18
docs: create Docusaurus v2.3.0 release docs + changelog + release blog post (#8586) 2023-01-27 17:02:28 +01:00
Jiří d8459e5916
fix(theme): add accessible name for the heading hash-link (#8562)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
closes undefined
2023-01-26 12:00:30 +01:00
Danilo Woznica 58f0327de5
docs(playground): use CodeSandbox cloud sandboxes (#8576) 2023-01-26 11:57:16 +01:00
Sainan a0058f9c5a
docs: fix dead anchor for issue reporting guidelines in template (#8578) 2023-01-25 18:08:10 +01:00
dependabot[bot] b4863934de
chore(deps): bump github/codeql-action from 2.1.38 to 2.1.39 (#8572) 2023-01-24 22:32:14 -05:00
Mikey O'Toole c2352a387e
docs: add link to pluralization docs (#8543)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2023-01-20 15:32:52 +01:00
Matija Sirk c32316eb2b
feat(theme-translations): default translations for Slovenian (sl-SI) (#8541)
Co-authored-by: Matija Sirk <matija.sirk@kopit.si>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-01-19 18:14:17 +01:00
Devansu Yadav 90e7e321d1
feat(eslint-plugin): new prefer-docusaurus-heading rule (#8384) 2023-01-19 17:08:24 +01:00
Mikey O'Toole a53d4cb2b3
docs: document plugin-content-pages wrapperClassName frontmatter. (#8556) 2023-01-19 14:39:07 +01:00
Joshua Chen 19c1e27b52
fix(algolia): make search footer respect searchPagePath (#8539) 2023-01-19 14:14:12 +01:00
Joshua Chen 00023c24b6
fix(core): avoid hash collision when generating chunk names (#8538) 2023-01-18 19:19:07 +01:00
Mariusz Krzaczkowski 8714a95900
chore(theme-translations): complete pl translations (#8525)
* Update theme-common.json

* Add content from #8520

* Update packages/docusaurus-theme-translations/locales/pl/theme-common.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/theme-common.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/theme-common.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/theme-common.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>
2023-01-18 11:45:52 -05:00
Eunkwang Shin d1d3585df0
docs: fix typo 'validationOptions' (#8548)
docs(plugin-methods): fix typo 'validationOptions'
2023-01-18 11:44:48 -05:00
dependabot[bot] 6f7ffae11f
chore(deps): bump github/codeql-action from 2.1.37 to 2.1.38 (#8553)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.37 to 2.1.38.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](959cbb7472...515828d974)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-17 00:27:20 -05:00
Joshua Chen 3526059214
chore: bump dependencies major versions (#8537) 2023-01-10 15:22:19 -05:00
Joshua Chen e8a07633ba
chore: upgrade dependencies (#8534)
* chore: upgrade dependencies

* FIxes

* Bump again
2023-01-10 13:23:16 -05:00
dependabot[bot] 64c6b5c100
chore(deps): bump actions/checkout from 3.2.0 to 3.3.0 (#8531)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](755da8c3cf...ac59398561)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 16:05:17 -05:00
dependabot[bot] c0c7d77f14
chore(deps): bump actions/dependency-review-action from 3.0.2 to 3.0.3 (#8532) 2023-01-09 15:53:54 -05:00
dependabot[bot] 2fc475d340
chore(deps): bump actions/setup-node from 3.5.1 to 3.6.0 (#8533) 2023-01-09 15:52:49 -05:00
Sébastien Lorber bc00bda5e9
chore: revert docs(website): use MDX comments instead of HTML comments (#8517) 2023-01-06 17:07:53 +01:00
Sébastien Lorber 9c9d17d6aa
docs(website): use MDX comments instead of HTML comments (#8516) 2023-01-06 16:22:01 +01:00
Sébastien Lorber 5a59378e11
chore: vendor MDX deps for Jest and the MDX 2 upgrade (#8515) 2023-01-06 12:08:15 +01:00
Serenus 773529a3bc
docs(website): fix broken external links wrongly modified to use the .mdx extension (ex: github README.mdx) (#8509)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-01-05 13:28:30 +01:00
Sébastien Lorber 3adc4ea809
docs: blog + community + dogfood docs should use .mdx extension (#8507) 2023-01-04 19:59:56 +01:00
dependabot[bot] 6eb40e0591
chore(deps): bump json5 from 1.0.1 to 1.0.2 (#8502)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2023-01-04 18:35:59 +01:00
John Reilly 3038ae793c
docs: blog.johnnyreilly.com moved to johnnyreilly.com - updated showcase (#8492) 2023-01-04 17:32:51 +01:00
dependabot[bot] 795a8468c9
chore(deps): bump jakepartusch/wait-for-netlify-action from 1.3 to 1.4 (#8496)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-04 17:12:12 +01:00
Sébastien Lorber 648a5a03df
fix(website): Netlify increase NODE_OPTIONS memory (#8491) 2022-12-30 17:46:33 +01:00
Sébastien Lorber 120b99b1f3
docs(website): use .mdx extension for every docs (#8490) 2022-12-30 15:08:28 +01:00
Lane Goolsby 428af8af5e
feat(plugin-google-tag-manager): add new google-tag-manager plugin + deprecate google-analytics plugin (#8470)
Co-authored-by: Goolsby, Lane <lanegoolsby@rocketmortgage.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
fix https://github.com/facebook/docusaurus/issues/7221
2022-12-29 16:53:54 +01:00
Riccardo e1d6292d46
fix(theme-classic) extract HomeBreadcrumbItem + fix swizzle bugs (#8445)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-12-29 13:48:25 +01:00
John Reilly 022e00554e
feat(blog): add options.createFeedItems to filter/limit/transform feed items (#8378)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-12-29 13:31:32 +01:00
mturoci 0985fa0af3
fix(search-algolia): pass custom transformItems function to SearchBar (#8462)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
closes undefined
Closes https://github.com/facebook/docusaurus/pull/8462
Closes https://github.com/facebook/docusaurus/issues/8461
2022-12-29 13:29:00 +01:00
Sébastien Lorber 9c860ce419
fix(theme): refactor Tabs, make groupId + queryString work fine together (#8486) 2022-12-29 12:41:53 +01:00
Bei Chu 949158d35b
docs: `plugin-content-sitemap` -> `plugin-sitemap` (#8484) 2022-12-28 11:56:31 +01:00
Thomas.CA 0371d579d9
fix(core): explicitly define CopyWebpackPlugin toType: 'dir' (#8481)
closes undefined
2022-12-27 19:20:42 +01:00
Dongjoon Lee c0102bda68
fix(theme-classic): content container grow to take all the available space (#8463)
fix https://github.com/facebook/docusaurus/issues/8369
fix https://github.com/facebook/docusaurus/pull/8426
2022-12-22 19:20:54 +01:00
Anders Bech Mellson 19ba0ff49d
feat(theme-algolia): add option.replaceSearchResultPathname to process/replaceAll search result urls (#8428)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-12-22 18:24:28 +01:00
Marco Stroppel 024474a7b9
docs: fix link to docs only mode (#8453)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-12-22 15:33:55 +01:00
dawei-wang ba1afbf060
docs: fix front page video link label (#8466)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
closes undefined
2022-12-22 12:19:12 +01:00
Shashank Kumar b7efbd2cea
fix(docs): Update link for tooljet website(broken) (#8454) 2022-12-22 11:59:50 +01:00
Gabriel Csapo b064311ebc
docs: fix example plugin implementation (#8455)
chore: fix bug in the docs implementation
2022-12-21 13:25:29 -05:00
dependabot[bot] f22da5ac12
chore(deps): bump actions/dependency-review-action from 3.0.1 to 3.0.2 (#8464)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](11310527b4...0ff3da6f81)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-19 15:24:23 -05:00
Craigory Coppola b4fc9d3caa
chore: update lerna to v6.2.0 (#8447) 2022-12-16 15:29:54 +01:00
Nguyễn Thành Nam f54b6e77cd
fix(theme-translations): complete Vietnamese theme translations (#8450)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-12-16 13:24:06 +01:00
Abhinandan Wadhwa 45f3e87356
docs: fix website home testimonials broken image URLs (#8443)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
closes undefined
2022-12-15 12:49:38 +01:00
Dan Dascalescu 1c40d6c821
docs: add hyperlink to swizzling in Search page (#8438)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-12-14 18:35:15 +01:00
Viktor Malmedal 4a448773b6
feat: add eslint plugin no-html-links (#8156)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Viktor Malmedal <viktor.malmedal@eniro.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-12-14 18:28:29 +01:00
宋锦丰 81f30dd495
fix(translations): complete Chinese theme translations (#8423)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-12-14 15:32:44 +01:00
dependabot[bot] 258465e199
chore(deps): bump github/codeql-action from 2.1.36 to 2.1.37 (#8440)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 15:23:12 +01:00
dependabot[bot] 33dd55e925
chore(deps): bump github/codeql-action from 2.1.35 to 2.1.36 (#8435)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 15:17:48 +01:00
dependabot[bot] 9b226f692f
chore(deps): bump actions/checkout from 3.1.0 to 3.2.0 (#8434)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 15:17:24 +01:00
Mikey O'Toole 5ed43c08d3
docs: add diagrams page to 2.2.0 sidebar (#8431)
Adds the diagrams page to the sidebar for 2.2.0.
2022-12-12 12:31:04 -05:00
Martin Adamko f3563ca23c
fix(theme-classic): polish admonition details, render title-only admonitions (#8150)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-12-09 20:02:06 +01:00
Mikey O'Toole 32dc1eddba
docs: clarify additionalLanguages with custom language definitions. (#8307)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-12-09 18:47:22 +01:00
mturoci 5c09dbfc3d
feat(theme-classic): store selected tab in query string. (#8225)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Closes https://github.com/facebook/docusaurus/issues/7008
2022-12-09 17:46:09 +01:00
Sébastien Lorber eb710af1b8
fix(translations): typo in lastUpdatedAtBy Vietnamese translation (#8424) 2022-12-09 11:04:18 +01:00
Dongjoon Lee e553ce7e59
fix(docusaurus-utils-validation): baseUrl + routeBasePath: allow empty string, normalized as "/" (#8258)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
fix https://github.com/facebook/docusaurus/issues/8254
2022-12-08 16:54:32 +01:00
Lachlan Heywood 85d0b5674f
feat(eslint-plugin): add plugin to exported configs (#8281)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
closes undefined
Closes https://github.com/facebook/docusaurus/issues/8280
2022-12-07 19:05:34 +01:00
Ryosuke Igarashi aa74b38209
docs: changed actions/checkout version from 2 to 3 (#8390)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-12-07 18:12:46 +01:00
Sébastien Lorber 59fac0b1d1
docs: document siteConfig.markdown + better mdx-loader retrocompat (#8419) 2022-12-07 17:59:51 +01:00
Marco Kuper 681e6d3ea4
docs: fix links to external plugin description (#8262) 2022-12-07 17:58:01 +01:00
Maciek Palmowski ea40482410
docs: add Kinsta to deployment page (#8375)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-12-07 16:28:54 +01:00
Sadegh Karimi 8b6fc47cb2
fix(translations): complete farsi theme translations (#8406) 2022-12-07 15:47:54 +01:00
dependabot[bot] 05681d5135
chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 (#8404)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 15:22:14 +01:00
dependabot[bot] ca39f75680
chore(deps): bump github/codeql-action from 2.1.32 to 2.1.35 (#8412)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 15:09:37 +01:00
Mikey O'Toole b7cbc967ce
docs: document theme-mermaid in API sidebar (#8417) 2022-12-06 23:45:57 -05:00
Robert Lawrence eecfdebf08
fix(theme): add missing aria-labels to the main and sidebar navs (#8366)
Fix https://github.com/facebook/docusaurus/issues/8308
2022-11-30 13:57:32 +01:00
John Reilly 79214670a9
fix(content-blog): blog Atom feed id + RSS feed guid should be fully qualified urls (#8381)
Closes https://github.com/facebook/docusaurus/issues/8380
2022-11-30 13:56:21 +01:00
mcallisto 97ca090223
docs: add i18n guide doc should link to i18n core config doc (#8392) 2022-11-30 13:43:28 +01:00
Dan Dascalescu f4bad43552
docs: point to where commit types are listed (#8388) 2022-11-30 13:08:01 +01:00
Frieder Bluemle c9c1fac1ab
feat(core): deploy CLI - add support for git url "insteadOf": use 'remote get-url' to determine source repo url (#8397) 2022-11-30 12:33:35 +01:00
dependabot[bot] 1a9274db08
chore(deps): bump marocchino/sticky-pull-request-comment from 2.3.0 to 2.3.1 (#8385)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-30 12:13:58 +01:00
Danny Kim 1bf058979e
fix(theme): preserve sidebar height on collapse (#8328) 2022-11-24 14:49:28 +01:00
Waldir Pimenta 6be3beb8c9
docs: actually demo the zero-width space workaround in MDX (#8352) 2022-11-24 11:00:39 +01:00
Balthasar Hofer b016686c22
fix(mdx-loader): support nested admonitions (#8303)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
closes undefined
2022-11-23 21:19:29 +01:00
Denis Al-Khelali a4d935a6f1
fix(content-docs): add trailing slash to contentDirs, before passing it to isMDXPartial (#8275) 2022-11-23 18:37:59 +01:00
Alex 412d2db011
docs: fix unclosed admonition code block (#8363) 2022-11-23 18:21:04 +01:00
Anna 4b11c57f7e
docs: autogenerated page comment does not matching dirName in examples (#8364) 2022-11-23 17:37:22 +01:00
dependabot[bot] d45083f93a
chore(deps): bump actions/dependency-review-action from 3.0.0 to 3.0.1 (#8360)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-23 17:15:31 +01:00
Alex bc98cba3a7
docs: fix anchor link `#customFields` (#8359) 2022-11-23 17:15:00 +01:00
Dan Dascalescu ca3dba5e5e
docs: fix typo 'internalization' (#8323)
Co-authored-by: Dan Dascalescu <dan@semi.technology>
2022-11-17 12:08:21 +01:00
John Reilly 0309a6dab2
docs: remove blog.johnnyreilly.com Google Analytics tag from docs part 2 (#8320) 2022-11-17 11:45:53 +01:00
Josh Goldberg ac81765024
fix(utils): allow partially backticked markdown h1 contentTitles (#8314) 2022-11-17 11:38:10 +01:00
Muhammad Hammad 53aa9a2416
fix(core): normalize input for poll option (#8342)
Fixes https://github.com/facebook/docusaurus/issues/8306
2022-11-17 11:22:12 +01:00
Josh Goldberg e756d734e3
fix(theme): forward className prop in theme-classic's Heading (#8350)
Fixes https://github.com/facebook/docusaurus/issues/8327
2022-11-16 17:52:49 +01:00
Mysterious_Dev 57c632becb
docs: use Mermaid diagram for routing page (#8335) 2022-11-16 17:48:32 +01:00
dependabot[bot] 571f497df1
chore(deps): bump github/codeql-action from 2.1.31 to 2.1.32 (#8341)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 14:49:25 +01:00
dependabot[bot] b841da44e4
chore(deps): bump actions/dependency-review-action from 2.5.1 to 3.0.0 (#8340)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 14:48:50 +01:00
dependabot[bot] dd5d8dc9c2
chore(deps): bump treosh/lighthouse-ci-action from 9.3.0 to 9.3.1 (#8339)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 14:48:35 +01:00
dependabot[bot] 5c0ab64af7
chore(deps): bump loader-utils from 2.0.3 to 2.0.4 (#8345)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 13:13:19 +01:00
Sébastien Lorber d8c72fb32d
fix(docs,theme): auto-generated category index should not display unlisted content (#8319) 2022-11-10 18:31:01 +01:00
Sébastien Lorber 1d5afbaaa5
fix(mermaid): fix Mermaid integration for v9.2 release (#8282) 2022-11-10 16:07:18 +01:00
Stefan Norberg 04eb04cb49
fix(theme-translations): complete Swedish theme translations (#8312)
Co-authored-by: stnor <stefan@selessia.com>
2022-11-10 12:59:20 +01:00
John Reilly dce4a68e03
docs: link to migration guide from Blogger to Docusaurus / remove blog.johnnyreilly.com Google Analytics tag from docs (#8313) 2022-11-10 12:05:15 +01:00
Mikey O'Toole 7ffa9f7689
docs: document tag types for insertHtmlContent (#8292)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-11-09 18:29:53 +01:00
AHMET BAYHAN BAYRAMOGLU 8f6dde5544
fix(theme-translations): complete Turkish theme translations (#8289) 2022-11-09 18:27:29 +01:00
dependabot[bot] 401c76ee7c
chore(deps): bump loader-utils from 2.0.2 to 2.0.3 (#8305)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-09 15:24:45 +01:00
dependabot[bot] b4c04f28f7
chore(deps): bump github/codeql-action from 2.1.29 to 2.1.31 (#8295)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-09 15:18:09 +01:00
Sébastien Lorber 004ada7cf2
fix(website): fix website social card location (#8287) 2022-11-03 17:01:32 +01:00
Jody Heavener 683ba3d2a0
feat(docs,blog,pages): add support for "unlisted" front matter - hide md content in production (#8004)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-11-03 14:31:41 +01:00
Sébastien Lorber 7a023a2c41
fix(create-docusaurus): improve init template misleading doc + add Docuaurus social card (#8279) 2022-11-02 17:03:00 +01:00
Nathaniel Tucker 7387aabbdc
docs: fix mermaid theme options typo (#8272)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-11-02 14:31:53 +01:00
dependabot[bot] 96eab89c52
chore(deps): bump github/codeql-action from 2.1.28 to 2.1.29 (#8271)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-02 14:31:09 +01:00
dependabot[bot] 8bee1a61cf
chore(deps): bump marocchino/sticky-pull-request-comment from 2.2.1 to 2.3.0 (#8270)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-02 14:30:55 +01:00
Sébastien Lorber 3c15aaff49
chore: update examples to Docusaurus 2.2.0 (#8266) 2022-10-29 16:41:13 +02:00
Sébastien Lorber 41c981aa9f
docs: create Docusaurus v2.2.0 release docs + changelog + release blog post (#8265) 2022-10-29 12:59:20 +02:00
Sébastien Lorber 9f4d2e7136
chore: fix flaky tests (#8259) 2022-10-28 11:46:54 +02:00
Alexey Pyltsyn 5baa56b4bf
chore(theme-translations): complete ru translations (#8253) 2022-10-27 11:03:34 +02:00
Alexey Pyltsyn 258ecf71f1
fix(ideal-image): do not pass down `img` prop (#8250) 2022-10-26 13:59:35 -04:00
Joshua Chen e301523138
fix(mdx-loader): properly unwrap mdxAdmonitionTitle placeholder (#8246) 2022-10-26 12:52:29 -04:00
Alexey Pyltsyn 1077d8ad39
docs: fix anchor link (#8249) 2022-10-26 12:45:48 -04:00
Sébastien Lorber 368bfbb153
chore: fix tree-node-cli license (#8248) 2022-10-26 15:04:18 +02:00
Shanmughapriyan S 91b92fcd08
fix(plugin-content-docs): fix error message context (error cause) when doc processing fails (#8234)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-10-26 14:48:25 +02:00
Forresst 327158b085
chore(theme-translations): complete French translations (#8243) 2022-10-26 13:09:24 +02:00
David J. Felix 006d44094c
docs: fix incorrect grammar and improve clarity (#8237)
- The sentence lacked a subject
- Changed the description of the problem slightly for clarity
2022-10-25 15:03:17 -04:00
dependabot[bot] aa308a4c35
chore(deps): bump actions/dependency-review-action from 2.5.0 to 2.5.1 (#8240)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](fd675ced9c...0efb1d1d84)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 15:02:37 -04:00
dependabot[bot] ac6f698287
chore(deps): bump github/codeql-action from 2.1.27 to 2.1.28 (#8241)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.27 to 2.1.28.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](807578363a...cc7986c02b)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 15:02:19 -04:00
Lane Goolsby e41133245c
refactor(plugin-gtag): update gtag plugin to modern SPA recommendations (#8143)
Co-authored-by: Lane Goolsby <lanegoolsby@rocketmortgage.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-10-21 14:59:12 +02:00
Xabier Lahuerta Vazquez 5ddcbf47a8
feat(plugin-client-redirects): keep the query string + hash (#8227)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-10-20 18:01:18 +02:00
evan 7b3ebb7729
feat(core): add --config param to swizzle command (#8210) 2022-10-20 16:11:39 +02:00
Abinash Satapathy 308b5390b5
docs: fix invalid link references & style the doc (#8229)
* docs: fix invalid link references & styled the doc

Remove redundant links and fix grammar

* Update CONTRIBUTING.md

* Reverted blockquote content

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-10-19 18:53:13 -04:00
Jeferson S. Brito f668b3ba50
fix(theme-classic): hamburger menu control navigation by keyboard (#8207) 2022-10-19 19:56:04 +02:00
mturoci aa4fa66794
fix(theme-classic): fix SkipToContent without JS , refactor, make it public theming API (#8204)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-10-19 18:27:08 +02:00
dependabot[bot] 22c90cb7c7
chore(deps): bump marocchino/sticky-pull-request-comment from 2.2.0 to 2.2.1 (#8221)
chore(deps): bump marocchino/sticky-pull-request-comment

Bumps [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/marocchino/sticky-pull-request-comment/releases)
- [Commits](39c5b5dc77...97bddef64d)

---
updated-dependencies:
- dependency-name: marocchino/sticky-pull-request-comment
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 21:45:52 -04:00
dependabot[bot] 71b67a3ba4
chore(deps): bump actions/dependency-review-action from 2.4.0 to 2.5.0 (#8220)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](375c537008...fd675ced9c)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 21:45:37 -04:00
dependabot[bot] 5b6b173d9d
chore(deps): bump actions/github-script from 6.3.1 to 6.3.3 (#8219)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.1 to 6.3.3.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](7dff1a8764...d556feaca3)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 21:45:23 -04:00
dependabot[bot] daf0dd026f
chore(deps): bump actions/setup-node from 3.5.0 to 3.5.1 (#8222)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](969bd26639...8c91899e58)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 21:45:06 -04:00
Sam Wall 9c92a79d23
feat: support mermaid code blocks in Markdown (#7490)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-10-14 18:07:20 +02:00
Shahriar d2fdd981f7
docs: removing community resource docusaurus-plugin-relative-paths (#8209) 2022-10-14 14:21:32 +02:00
Rashid 79b3f65a17
fix(live-codeblock): add error boundary to live code preview (#8015)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-10-13 17:49:27 +02:00
Sanjaiyan Parthipan 80064b2eb9
perf(core): move scripts to document head + defer (#8081)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-10-13 16:00:44 +02:00
forgeRW 2372335532
fix(core): throw error for invalid URL in config file (#8192) 2022-10-13 11:39:57 +02:00
Silvestar Bistrović 84e6dd2473
fix(website): mobile scroll on homepage announcement (#8193) 2022-10-12 18:24:36 +02:00
Joshua Chen aa7d81d7bf
fix(theme): add more tag names to inline element set (#8190) 2022-10-12 18:03:35 +02:00
John Reilly 1ca4fb50fe
feat(core): siteConfig.headTags API to render extra tags in document head (#8151)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-10-12 17:45:56 +02:00
dependabot[bot] 3558a091c6
chore(deps): bump github/codeql-action from 2.1.26 to 2.1.27 (#8200)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.26 to 2.1.27.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e0e5ded33c...807578363a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-10 16:35:25 -04:00
dependabot[bot] 6cf103a8a9
chore(deps): bump actions/checkout from 3.0.2 to 3.1.0 (#8199)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](2541b1294d...93ea575cb5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-10 16:35:09 -04:00
Johan Fagerberg 6c8af03f51
fix(utils): remove non-ASCII limitation for path normalization (#8137) 2022-10-07 13:35:12 +02:00
Pranav Joglekar efbd0cbd40
fix(content-blog): make RSS feed generation work with slugs with .html extension (#8158)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-10-06 16:19:05 +02:00
Adnan Hashmi c325f87fd8
fix(theme): mobile navbar & skipToContent should cover announcementBar (#8163)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-10-06 15:20:18 +02:00
dependabot[bot] 66816c3dc1
chore(deps): bump github/codeql-action from 2.1.22 to 2.1.26 (#8169)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-05 19:55:55 +02:00
dependabot[bot] 35fe1553d6
chore(deps): bump actions/setup-node from 3.4.1 to 3.5.0 (#8170)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-05 19:54:28 +02:00
dependabot[bot] 53626aafd1
chore(deps): bump actions/github-script from 6.2.0 to 6.3.1 (#8167)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-05 19:43:49 +02:00
mturoci b0d431af3b
fix(theme): do not show tab content when tabbing over it; show after selection only (#8161) 2022-10-05 19:10:08 +02:00
mturoci 44af538153
fix(theme): announce theme switches when using screen reader. #7667 (#8174)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-10-05 18:49:01 +02:00
dependabot[bot] 982187977d
chore(deps): bump actions/dependency-review-action from 2.1.0 to 2.4.0 (#8168)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-05 18:33:41 +02:00
Tamal Chowdhury 10cddd47bc
docs(showcase): Adds tamalweb.com to showcase Pr/tamalweb.com (#8152) 2022-10-05 17:19:40 +02:00
forgeRW 53dbbe36f2
fix(core): throw error for invalid URL in config file (#8159)
* fix: throw error for invalid URL in Docusaurus config file

* Also add unit test to check error is thrown

* fix: perform error check for invalid URL to configValidation.ts

* Throw error for invalid URL in Docusaurus config file
* Perform error check in configValidation.ts
* Undo error check in createSitemap.ts

* Better message

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-10-02 11:31:14 -04:00
SADIK KUZU eabca78c38
docs: fix typo (#8162)
* fix(website): Fix typo

website/docs/api/misc/logger/logger.md:32:45

* Replace all

Signed-off-by: Joshua Chen <sidachen2003@gmail.com>

Signed-off-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-10-02 11:00:22 -04:00
Sébastien Lorber c6f5cf9ac7
docs(content-docs): add api doc for displayed_sidebar front matter (#8146) 2022-09-29 16:45:51 +02:00
Masahiko Hara 883e4684ab
fix(theme-translation): complete Japanese theme default translation (#8075) 2022-09-29 12:28:13 +02:00
Ramazan SANCAR 292d728c49
fix(theme-translations): complete turkish theme default translations (#8105) 2022-09-28 19:30:28 +02:00
sykp241095 d44c1d8cd7
docs: update showcase/ossinsight screenshot (#8100) 2022-09-28 18:31:01 +02:00
Billy Chan e34371ce2d
docs(showcase): add SeaQL sites to showcase (#8107) 2022-09-28 14:18:04 +02:00
Sanjaiyan Parthipan f7c3af9102
feat(core): prefetch on mobile touchstart (#8109) 2022-09-28 12:59:08 +02:00
Sunghyun Cho 029893fea2
docs: fix Sunghyun Cho showcase info (#8097)
Fix typo in my name
2022-09-22 15:27:17 -04:00
Joshua Chen 6514f0784b
docs: add caveat about using Translate in string contexts (#8115) 2022-09-19 10:59:15 -04:00
Joshua Chen 70b53c4ac7
docs: backport doc edits from future branch (#8114) 2022-09-19 10:40:37 -04:00
Nguyễn Thành Nam 2e66e1cbba
fix(theme-translations): remove extra vi translations (#8087)
chore(theme-translations): vi translations

chore(theme-translations): complete vi translations

Edit theme.blog.post.readingTime.plurals theme.blog.post.plurals theme.docs.tagDocListPageTitle.nDocsTagged
2022-09-12 16:00:02 -04:00
Sanjaiyan Parthipan 0a87116a1c
perf(create): run async tasks concurrently (#8080)
* Adding incremental support for React 18 🚀

* parallel

* revert react 18

* revert lint

* end line

* Update packages/create-docusaurus/src/index.ts

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-09-10 23:06:34 -04:00
Mikey O'Toole a0ab2b0065
refactor(theme): remove hard-coded tag border-radius (#8062) 2022-09-08 17:25:26 +02:00
Joshua Chen bcae7503ff
fix(core): normalize slashes for url/baseUrl instead of throwing (#8066) 2022-09-08 17:18:26 +02:00
Joshua Chen 73d0ede21a
fix(redirect): tolerate trailing slash difference if config is undefined (#8067) 2022-09-08 17:15:52 +02:00
LittleboyHarry 710c0c58f0
fix(theme): preserve line breaks when copying code with showLineNumbers in Firefox (#8068)
Fix CodeBlock no line breaks copied in Firefox bug
2022-09-08 09:42:05 -04:00
Joshua Chen 275f509d13
chore: upgrade dependencies (#7993)
* chore: upgrade dependencies

* Fix lint

* Bump more

* Fix lint
2022-09-08 01:31:53 -04:00
Joshua Chen 38dd7cfa04
chore: bump react-medium-image-zoom (#8064) 2022-09-08 00:36:00 -04:00
Sébastien Lorber a492025cbf
fix(theme): preserve url ?search#hash on navbar version/locale dropdowns navigations (#8059) 2022-09-07 19:36:04 +02:00
Sébastien Lorber 67c692326b
fix(website): add website admonitions extendDefaults: true (#8060) 2022-09-07 19:07:53 +02:00
Sébastien Lorber 6f63ffe0a3
refactor(theme): split admonitions, make swizzle easier, better retrocompatibility (#7945)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-09-07 17:49:44 +02:00
Debbie O'Brien f1415525c0
docs: fix broken image (#8054) 2022-09-07 13:36:37 +02:00
Alexander Nguyen bf080d172a
docs(content-docs): updates typo in lifecycle-apis.md (#8055) 2022-09-07 13:23:45 +02:00
Mikey O'Toole e507628f4a
docs: document usage of docs `frontMatter.custom_edit_url: null` (#8053) 2022-09-07 13:21:13 +02:00
dependabot[bot] d74f6e594a
chore(deps): bump github/codeql-action from 2.1.21 to 2.1.22 (#8051)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-07 13:17:34 +02:00
Joshua Chen 36db64ed1d
docs: improve alt messages (#8047) 2022-09-04 01:33:25 -04:00
Tom Mrazauskas 1f1f898d73
docs: delete extra semicolon in MDX and React page (#8046) 2022-09-03 14:39:06 -04:00
Joshua Chen 46d705a487
refactor(core): detect if codegen should quote property without using eval() (#8045)
refactor(core): detect if should quote property when codegen without using eval()
2022-09-02 19:52:29 -04:00
Sébastien Lorber 29703da188
fix(website): fix blog post social card (#8042) 2022-09-02 14:43:20 +02:00
Sébastien Lorber 54986a3b21
chore: Update examples after release of Docusaurus v2.1.0 (#8041) 2022-09-02 13:05:04 +02:00
Sébastien Lorber 56feb41445
docs: create Docusaurus v2.1.0 release docs + changelog + release blog post (#8036) 2022-09-02 12:39:32 +02:00
Sébastien Lorber 55de3ea04b
fix(create-docusaurus): tutorial and init template improvements (#8032) 2022-09-01 13:10:50 +02:00
Francesco Ciulla 294625a6b5
docs(showcase): fix daily.dev site name (#8031)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-08-31 19:46:44 +02:00
Morgane Dubus c4f808aba8
fix(preset-classic): broken link in "unrecognized keys" error message (#8029) 2022-08-31 16:45:45 +02:00
Alex 830153ddd4
chore(ci): GitHub Workflows security hardening (#8030) 2022-08-31 16:45:17 +02:00
Sébastien Lorber 97c9710ce3
docs(showcase): add 74 new showcase sites (#8010) 2022-08-31 14:28:02 +02:00
dependabot[bot] ab73d86cb4
chore(deps): bump actions/github-script from 6.1.1 to 6.2.0 (#8019)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-31 13:40:53 +02:00
dependabot[bot] ae989a60ce
chore(deps): bump github/codeql-action from 2.1.20 to 2.1.21 (#8020)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-31 13:40:33 +02:00
Ahmed Mustafa Malik fd0cf3f64c
docs: fix typo in swizzling.md (#8025) 2022-08-30 18:53:46 -04:00
Sébastien Lorber c811d6249e
feat(theme): ability to use <DocCardList> without items prop, on any doc page (#8008) 2022-08-26 17:42:59 +02:00
Naffy Dharni ff8ef774d6
fix(create): bad grammar in template docs (#7978) 2022-08-25 08:24:50 -04:00
adventure-yunfei 75dc4a47e2
fix(core): preload should support encoded page links (#7977)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-08-25 13:47:46 +02:00
Yoni Chechik c2ce8a02e7
fix(theme): add aria-label to skip to content link region (#7982)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-08-24 17:19:39 +02:00
Sébastien Lorber cee1b4b971
fix(core): CLI command write-translations should extract translations from @docu… (#7996) 2022-08-24 12:45:57 +02:00
dependabot[bot] bd9f29a469
chore(deps): bump actions/dependency-review-action from 2.0.4 to 2.1.0 (#7988)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 2.0.4 to 2.1.0.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](94145f3150...23d1ffffb6)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-22 16:22:42 -04:00
dependabot[bot] 0bcd31b6c5
chore(deps): bump github/codeql-action from 2.1.18 to 2.1.20 (#7987)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.18 to 2.1.20.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2ca79b6fa8...7fee4ca032)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-22 16:22:34 -04:00
Sébastien Lorber 94067ce930
fix(core): allow overriding ssr/dev template meta tags (#7952) 2022-08-19 16:47:28 +02:00
Jesper c706b23666
fix(core): make webpack HMR always listen to current location (#7951)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-08-18 19:45:33 +02:00
Juan Picado fd41f46176
test: improve e2e verdaccio configuration (#7967)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-08-18 19:08:23 +02:00
Sébastien Lorber 3b9b497d13
fix(plugin-docs,theme): refactor docs plugin routes and component tree (#7966) 2022-08-18 17:55:05 +02:00
Jan Peer Stöcklmair c29218ea1d
chore(plugin-docs): expose all lib files through exports (#7962)
chore(plugin-docs): expose lib in package.json (closes #7961)

Co-authored-by: Jan Peer Stoecklmair <jan.peer.stoecklmair@dynatrace.com>
2022-08-18 14:25:51 +08:00
Sébastien Lorber eac3239757
feat(docs): allow to configure noIndex per doc version (#7963) 2022-08-17 16:55:49 +02:00
Sébastien Lorber a335a69982
fix(sitemap): filter all routes with robots meta containing noindex (#7964) 2022-08-17 16:41:41 +02:00
Mu-Jing-Tsai 39883e70de
docs: add docusaurus-post-generator to community resource list (#7955) 2022-08-16 18:59:47 +02:00
Bagdasar Ovsepyan 2052482e20
feat(theme): adds Ukrainian default theme translations (#7953) 2022-08-16 18:57:14 +02:00
dependabot[bot] 27f1a40e53 chore(deps): bump actions/github-script from 6.1.0 to 6.1.1 (#7957)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](7a5c598405...d50f485531)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-16 10:15:36 +08:00
Sébastien Lorber de526e1ab2
feat(plugin-docs): docs sidebar item link: support "autoAddBaseUrl" attribute (#7949) 2022-08-12 12:50:12 +02:00
Sébastien Lorber 53bb0307dd
refactor(theme-classic): split AnnouncementBar, increase z-index, use shadow (#7940) 2022-08-12 12:34:54 +02:00
Sébastien Lorber ad15605545
feat(theme-classic): use lang attribute in navbar locale dropdown items (#7942) 2022-08-12 12:33:53 +02:00
Sébastien Lorber b4279dfee7
feat(core): add new Webpack file-loader extensions: avif, mov, mkv, mpg, avi... (#7941) 2022-08-11 19:42:13 +02:00
Sébastien Lorber 2a6f116a85
chore: bad remark-admonition readme link (#7939) 2022-08-11 10:38:35 +02:00
Kevin Østerkilde 221b114b2c
refactor(theme-classic): make tag text visually certered (#7876) 2022-08-09 20:00:43 +02:00
Joshua Chen 308d3e1f89
docs: remove mention of beta (#7905)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-08-09 19:26:23 +02:00
Ngô Quốc Đạt efcfa1dd35
chore(theme-translations): complete vi translations (#7928)
docs: update Vietnamese translations
2022-08-10 00:50:08 +08:00
Yangshun Tay 0bc4a7ddb1
fix: revert "update FB template headers (#7842)" (#7926)
Revert "chore: update FB template headers (#7842)"

This reverts commit 9150c7aefc.
2022-08-09 09:42:27 +08:00
dependabot[bot] 6d86be558d
chore(deps): bump github/codeql-action from 2.1.17 to 2.1.18 (#7925)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.17 to 2.1.18.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0c670bbf04...2ca79b6fa8)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-09 09:40:23 +08:00
Sébastien Lorber b7ea00a917
chore: bump main to 3.0.0-alpha.0 (#7923) 2022-08-08 19:13:49 +02:00
Sébastien Lorber 38d6c9061a
chore(website): rename 2.0.0 docs to 2.0.1 (#7922) 2022-08-08 18:47:27 +02:00
Sébastien Lorber 1aae05b606
chore: update changelog after 2.0.1 release (#7920) 2022-08-08 16:49:38 +02:00
yzhe819 d938ff7430
fix(theme-classic): code block line number display with line wrapping (#7910)
* fix: line numbers display issue of code block

* test: add dogfooding test page

* chore: lint

* test: move to code-block-tests
2022-08-07 23:01:31 +08:00
Joshua Chen e1a8db7d91
docs: add TOC heading level options to guide (#7906)
docs: add documentation for TOC heading level options in guide
2022-08-06 21:35:56 +08:00
Joshua Chen 8e5225addb
chore: fix changelog plugin import path (#7901) 2022-08-05 20:02:30 +08:00
Charles Killer 01ac2e0fca
docs: add baseUrl to example tsconfig (#7884)
tsconfig requires compiler options with base url 

Without base url, TS errors appear such as `Cannot find module '@site/src/components/...`
2022-08-03 18:25:53 +08:00
Joe Williams 7ab2bd3234
docs: improve crowdin guide (#7861) 2022-08-03 01:38:25 +08:00
Clément Vannicatte 5002f6cf9d
docs: update DocSearch showcase (#7877) 2022-08-03 01:32:35 +08:00
Joshua Chen 1bf5c0d36e
chore: upgrade dependencies (#7883) 2022-08-02 16:44:02 +08:00
dependabot[bot] d0282fae68
chore(deps): bump github/codeql-action from 2.1.16 to 2.1.17 (#7879)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.16 to 2.1.17.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3e7e3b32d0...0c670bbf04)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-02 16:31:25 +08:00
Sébastien Lorber e519858ea7
docs: update Hacker News + Product Hunt links (#7874)
update HN + ProductHunt links
2022-08-01 18:33:28 +08:00
Joshua Chen 1a62b41e31
chore: blog post publish cleanup (#7873) 2022-08-01 18:00:01 +08:00
Sébastien Lorber e8a11da805
chore: re-generate 2.0.1 examples (#7872) 2022-08-01 10:59:14 +02:00
Sébastien Lorber 111b4cdcd2
chore: publish v2.0.0 docs (#7862)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-08-01 10:24:49 +02:00
Joshua Chen 40827c6c72
fix(utils): always match exclusion root dirs as complete folder paths (#7864)
* fix(utils): always match exclusion root dirs as complete folder paths

* fix

* fix?

* fix for real
2022-08-01 15:23:01 +08:00
Joshua Chen 3a0e90eacd
chore: fix blog-only test failures (#7865) 2022-08-01 14:14:13 +08:00
Sébastien Lorber 79360c6ae6
docs: publish 2.0.0 release blog post + adapt website for the launch (#7863) 2022-08-01 07:51:03 +02:00
Hyunseung Lee 8da73a082f
docs: update workbox doc link (#7835)
* Update plugin-pwa.md

* Update plugin-pwa.md

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-08-01 13:34:57 +08:00
Billy Chan 72055d758b
docs: add SeaQL sites to showcase (#7841)
* docs: add SeaQL sites to showcase

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-08-01 13:23:20 +08:00
Bruce Song e0d75963ec
docs: update Bruce's Wiki website URL (#7856)
Update website URL.
2022-08-01 13:23:09 +08:00
Dr-Electron 3822185159
docs: update iota-wiki showcase image (#7859)
* Update iota-wiki showcase image

* resize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-08-01 13:23:00 +08:00
Markshawn f6835898bc
chore: fix CSS import order ESLint rule (#7852)
* enhance: added ESLint ruler for CSS import

* chore: added ruler for default import of css, and fixed all exsting files

* chore: reverted changes on css header rulers
2022-08-01 00:05:00 +08:00
Yangshun Tay 9150c7aefc
chore: update FB template headers (#7842) 2022-07-28 14:48:03 +08:00
Sébastien Lorber f21ee7c23b
misc: change showcase submission process, use GitHub discussion (#7828) 2022-07-25 18:48:09 +02:00
Antony Onipko 19dcee068e
docs: add sequence website to showcase (#7823)
* Add Sequence to docusaurus showcase

* Add sequence website image

* Fix sequence image

* Optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-25 16:39:53 +08:00
Joshua Chen 960637a090
chore: upgrade dependencies (#7822) 2022-07-23 22:26:48 +08:00
Andrew Lyons 7489f8729a
docs: fix anchor link (#7813)
* docs: Correct link to document section

The link to the public API surface had an erroneous extra # in the link
preventing it from linking correctly.

* fix prettier

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-20 20:25:30 +08:00
Joshua Chen 09326bd456
docs: formally document how admonitions can be customized (#7799) 2022-07-20 12:57:12 +02:00
Lorenzo Lewis e912e536c8
docs: add Tauri.app to showcase (#7790)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-20 12:32:58 +02:00
dependabot[bot] 6b05d4f035
chore(deps): bump github/codeql-action from 2.1.15 to 2.1.16 (#7804)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.15 to 2.1.16.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3f62b754e2...3e7e3b32d0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-19 08:38:21 +08:00
dependabot[bot] 6edfb0ce32
chore(deps): bump actions/dependency-review-action from 2.0.2 to 2.0.4 (#7805)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 2.0.2 to 2.0.4.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](1c59cdf2a9...94145f3150)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-19 08:38:05 +08:00
dependabot[bot] c6d561d528
chore(deps): bump actions/setup-node from 3.4.0 to 3.4.1 (#7806)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](5b949b50c3...2fddd8803e)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-19 08:37:49 +08:00
Michael Remediakis 52d72a167f
docs: fix typo in deployment (#7803)
Fixed a typo in the Powershell tab of the deployment docs
2022-07-19 08:37:09 +08:00
Joshua Chen 1dd65eee50
fix(utils): recognize ~~~ as code fences in link replacement (#7801) 2022-07-18 19:16:00 +08:00
Aolin fe3dfa720a
docs: modify the description of deploying to Netlify (#7796)
modify build directory to publish directory
2022-07-17 19:56:18 +08:00
Joshua Chen 17ec6bbde7
chore: upgrade dependencies (#7794) 2022-07-17 12:44:46 +08:00
Sébastien Lorber ba3a533d19
chore: port docusaurus-v2 Netlify config changes (#7789) 2022-07-15 15:39:55 +02:00
whiteand cf134a5308
fix: collapse siblings when first category is selected (#7786)
fix: not collapsing when first category is selected
2022-07-15 16:54:09 +08:00
Sébastien Lorber 7f40350d6e
chore: fix codesandbox playgrounds, use Node.js 16 version (#7784) 2022-07-14 19:51:32 +02:00
Joshua Chen 1065e558d2
refactor(core): log Docusaurus & Node version before exiting (#7781) 2022-07-14 19:50:57 +02:00
Sébastien Lorber 965a01e589
chore: port-2.0.0-rc.1 (#7782) 2022-07-14 19:30:17 +02:00
Bruce Song 443914a579
docs: add Bruce Wiki website to showcase (#7770)
* Update users.tsx

* Add preview image.

* Resize the image.

* Trigger the checks for CLA.

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-14 23:09:56 +08:00
Sébastien Lorber f913af0d69
docs: release process, versioning, breaking changes, public API surface (#7706)
Co-authored-by: Paul O’Shannessy <paul@oshannessy.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-07-14 17:07:34 +02:00
Sébastien Lorber 9788944df4
refactor(theme): fix duplicate page metadata usage (#7777) 2022-07-14 14:44:45 +02:00
Sébastien Lorber c48f33800c
fix(core): swizzle --eject js should not copy theme .d.ts files (#7776) 2022-07-14 12:23:06 +02:00
Joshua Chen c3d2e0d30b
fix(sitemap): complete gracefully when all pages have noIndex meta (#7774) 2022-07-14 08:59:01 +08:00
Sébastien Lorber 665c3117af
chore: bump Infima to 0.2.0-alpha.42, fix a:hover link bug (#7771) 2022-07-13 13:57:35 +02:00
The Nguyen 1899a2e9e8
docs: add EverShop website to showcase (#7765)
* docs: add EverShop website to showcase

* docs: add EverShop website to showcase

* fixes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-13 18:06:08 +08:00
Wes McNamee 542228ee1b
fix(deploy): revert "feat(deploy): copy local git config to tmp repo (#7702)" (#7750) 2022-07-12 14:06:18 +02:00
Joshua Chen a4b4a7f28d
fix(migrate): import siteConfig with file extension (#7766)
* fix(migrate): import siteConfig with file extension

* fix test

* Revert "fix test"

This reverts commit f5d00ab0e6.
2022-07-12 16:08:20 +08:00
Sunghyun Cho 337463ae1c
chore(theme-translations): complete ko translations (#7762)
* Improve Algolia Search Korean Translations

* Update theme-search-algolia.json

* Remove Duplicate Colon

* remove redundnacy

* Update theme-search-algolia.json

* Translate Search By

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-12 12:33:01 +08:00
dependabot[bot] 9467da6b1a
chore(deps): bump actions/setup-node from 3.3.0 to 3.4.0 (#7764)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](eeb10cff27...5b949b50c3)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-12 09:53:29 +08:00
Joshua Chen cba8be01a3
fix(theme-classic): validate options properly (#7755)
* fix(theme-classic): validate options properly

* improve normalization

* fix doc
2022-07-11 19:24:46 +08:00
Joshua Chen 636d47060e
refactor(core): use has instead of get to test for existence in ExecEnv (#7763)
refactor(core): use has instead of get to test for existence
2022-07-11 19:19:17 +08:00
Jeffrey Aven f21dadf621
docs: add StackQL Provider Registry to showcase (#7760)
* Added StackQL Provider Registry doc site

* added StackQL Provider Registry image

* fixes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-11 19:17:25 +08:00
Arthur Brugière 1ad97843ac
fix(algolia-search): test for canUseIntersectionObserver (#7761)
[FIX] Update observer condition

Replace condition canUseDOM to canUseIntersectionObserver as check is done for IntersectionObserver usage
2022-07-11 19:03:54 +08:00
凱恩Kane ee98512083
docs: move Yeecord repo to organization (#7758)
move repo to organization
2022-07-11 19:02:58 +08:00
Evan 5c724f2df6
docs: update evantay showcase image (#7757)
* docs: update evantay showcase image

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-11 19:02:33 +08:00
LichLord91 cd7da6113e
fix(theme-classic): fix Layout theme height CSS (#7752)
* fix(theme-classic):  fix Layout theme css height

This fixes html and body tags height from bug report

https://github.com/facebook/docusaurus/issues/7746

* Update styles.module.css

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-10 00:32:48 +08:00
Joshua Chen 07641ae53d
chore: upgrade dependencies (#7754) 2022-07-10 00:32:32 +08:00
Sébastien Lorber e62d5e3f48
chore: regenerate beta.22 examples (#7742) 2022-07-08 19:08:17 +02:00
Sébastien Lorber f0f97f29f9
chore: prepare v2.0.0-beta.22 release (#7741) 2022-07-08 18:34:05 +02:00
Sébastien Lorber d3d22d3a72
refactor(theme): nest theme icons under subfolder @theme/Icon/* (#7740) 2022-07-08 16:56:53 +02:00
Sébastien Lorber c3ff131110
refactor(theme): split BlogPostItem into smaller theme subcomponents (#7716) 2022-07-08 13:28:53 +02:00
Rein van Haaren c7f18801da
feat(theme-translations): Dutch translation (#7732)
Dutch translation
2022-07-08 13:47:47 +08:00
SheetJSDev ad1d2d2ab1
docs: swizzle react-live with eject (#7739)
docs: swizzle react-live with eject (#7735)
2022-07-08 12:55:39 +08:00
Huy Nguyen 2e83a1b522
docs: add Mixcore CMS to showcase (#7730)
* Update users.tsx

* add screenshot

* Update website/src/data/users.tsx

* Update website/src/data/users.tsx

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-07 15:58:11 +08:00
Forresst a9406e7cb9
fix(theme-translations): improve fr translation (#7731) 2022-07-07 15:48:47 +08:00
赤城结衣 bb110e5400
fix(theme-translations): improve grammar of zh translation (#7696)
* fix: a grammar mistake

* Update packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-07 11:52:00 +08:00
Sunghyun Cho a25e18ce32
fix(theme): show blog post edit link even when no tag & not truncated (#7727)
Show edit link even when no tag & not truncated.
2022-07-06 18:46:49 +02:00
pincman f224d3c669
docs: add pincman site to showcase (#7718)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-06 18:38:10 +02:00
Forresst ae2ba5e37a
feat(algolia-search): allow translating search modal (#7666)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-07-06 18:21:55 +02:00
Sébastien Lorber 713dcdf7a8
refactor(types): split into multiple files (#7710) 2022-07-06 18:00:57 +02:00
Sébastien Lorber bc0538f6fa
refactor(theme-common): move useDocsPreferredVersion() to public api (#7729) 2022-07-06 17:58:18 +02:00
Joshua Schmitt 8a72b769b1
chore: bump devcontainer to node 18 (#7726)
* fix: bump devcontainer to node 16

* fix: bump devcontainer directly to nodejs 18
2022-07-06 16:32:08 +08:00
dependabot[bot] 3a3ce254ce
chore(deps): bump github/codeql-action from 2.1.14 to 2.1.15 (#7724)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.14 to 2.1.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](41a4ada31b...3f62b754e2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-05 11:31:00 +08:00
Joshua Chen 426b023f11
docs: add GitHub pages deployment troubleshooting guide (#7723) 2022-07-04 22:45:04 +08:00
Joshua Chen fa22927250
chore: upgrade dependencies (#7684)
* chore: upgrade dependencies

* fix

* reupgrade

* downgrade
2022-07-04 19:36:43 +08:00
Johnie Hjelm 61f769ea52
feat(theme-translations): Swedish translation (#7715) 2022-07-03 13:32:43 +08:00
Wes McNamee ee376d19f6
feat(deploy): copy local git config to tmp repo (#7702) 2022-07-01 15:17:23 +02:00
Dima Grossman 07b6c200af
docs: add Novu to showcase (#7712) 2022-07-01 14:34:08 +02:00
Joshua Chen 1f47151363
docs: mention MDXContent (#7705) 2022-07-01 10:43:06 +02:00
Redcamel ffe8a22ea5
docs: add RedGradient to showcase (#7704)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-07-01 10:05:15 +02:00
Redcamel 2424183b3e
docs: add RedGradient to showcase (#7704)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-07-01 10:04:46 +02:00
Joe Harrison 825211f41d
fix(content-docs): format last update date as "Jun 19, 2020" (#7673)
* consistent date formatting betweeen docs and blog

* update error message

* use short month names

Co-authored-by: Joe Harrison <jharrison@drwuk.com>
2022-06-29 18:19:29 +02:00
7Wate 2910f99bbc
docs: add 7Wate's Wiki to showcase (#7688)
* docs: add 7Wate`s Wiki to showcase

* docs: add 7Wate`s Wiki to showcase screen

* fixes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-28 22:50:00 +08:00
dependabot[bot] 5e89f10916
chore(deps): bump github/codeql-action from 2.1.12 to 2.1.14 (#7692)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.12 to 2.1.14.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](27ea8f8fe5...41a4ada31b)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-28 16:01:49 +08:00
Dzung Do e801d915bf
fix(theme-translations): typo in vi locale (#7694)
Update plugin-ideal-image.json
2022-06-28 10:19:54 +08:00
Ngô Quốc Đạt b88a915a64
chore(theme-translations): complete vi translations (#7691)
* chore(theme-translations): complete vi translations

* Edit `theme.SearchBar.seeAll`
2022-06-27 23:31:40 +08:00
Ahmed Altomy 8e4f209df9
chore(theme-translations): complete ar translations (#7683)
* Edit Locale "Arabic ar" texts

* chore(theme-translations): complete ar translations #7683
2022-06-27 23:30:30 +08:00
Tom Mrazauskas bb558ffcb9
test(logger): use `jest-serializer-ansi-escapes` (#7685)
* chore(logger): use jest-serializer-ansi-escapes

* move serialiser to jest.config
2022-06-27 15:03:51 +08:00
alewolf 7720a1cfd8
docs: add SweetCode to showcase (#7682)
* Update users.tsx

* Add files via upload

* fixes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-25 16:40:12 +08:00
Sébastien Lorber cebe4840aa
misc: add IDE language annotation comments (#7678)
add IDE language annotations
2022-06-25 09:55:28 +08:00
Steven Serrata 9ce7d11309
docs: add docusaurus-openapi-docs to resources (#7675)
* Add docusaurus-openapi-docs to resources

* Add 'OpenAPI' to words list

* Edit description

* Add 'openapi' to project-words.txt
2022-06-25 00:57:18 +08:00
Benjamin Cabanes 18b40d4024
docs: add more info on github cross repo deployment (#7677)
docs(core): add more info on github cross repo deployment
2022-06-25 00:56:53 +08:00
Sébastien Lorber afc08eef4f
refactor(theme): move LayoutProviders to Layout/Provider; composeProviders util (#7676)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-24 18:36:27 +02:00
Sébastien Lorber 90a8ca387e
chore: prevent importing theme components with relative paths (#7674) 2022-06-24 17:22:44 +02:00
Sébastien Lorber 2c7012f706
refactor(theme-common): rename useDynamicCallback to useEvent (#7671) 2022-06-24 12:10:03 +02:00
Sébastien Lorber 9473508c33
refactor(theme-common): split package into public/internal API entrypoints (#7660)
* add theme-common/internal export

* Split @docusaurus/theme-common into public/internal apis

* fixes

* public <-> private

* public <-> private

* public <-> private

* fix

* add "removeThemeInternalReexport" CI script

* :s windows CI check not working: not that useful

* remove bad import

* refactors

* reorder

* make useBackToTopButton internal

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-24 11:21:27 +02:00
Webber Takken 35d320fa2c
docs: add awesome-docusaurus resource (#7563)
Add awesome-docusaurus resource
2022-06-24 12:12:44 +08:00
Joshua Chen 8e3e89d9ff
docs: add link from every category index page to the guide page (#7665) 2022-06-23 13:46:59 +02:00
Sébastien Lorber 42ab07f62f
feat(theme-classic): themeConfig navbar/footer logos accept className/style + update Meta Open-Source Logo (#7643) 2022-06-23 11:22:27 +02:00
Sébastien Lorber a989a1d17e
chore: upgrade Infima to alpha.40 (#7664) 2022-06-23 16:50:19 +08:00
Joshua Chen 80585e7d7e
misc: share .vscode/extensions.json (#7663) 2022-06-23 11:50:47 +08:00
Ben Myers 3990404419
fix(theme-classic): expose empty string alt text in navbar logos (#7659)
* fix: Expose empty string alt text in brand logos via nullish coalescing

* fix: Update boolean logic for fallbacks

* fix: Dogfood fix on Docusaurus brand logo

* refactor: Un-inline alt logic, and reduce chance of duplication in fallback
2022-06-23 11:42:52 +08:00
Sébastien Lorber fd87afd249
refactor(docs,theme): split DocItem comp, useDoc hook (#7644)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-22 14:27:23 +02:00
Rudra Sen 2316900174
docs: add Comp Labs website to showcase (#7652)
* docs(v2): Add Comp Labs website to showcase page

* Add Image

* fix image

* Update users.tsx

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-22 19:40:11 +08:00
Joshua Chen 4b5a47ba37
feat(client-redirects): make plugin respect onDuplicateRoutes config (#7649) 2022-06-22 13:32:02 +02:00
Joshua Chen 51d7899b0d
fix(theme-common): add a missing generic constraint (#7648) 2022-06-22 13:29:31 +02:00
Joshua Chen 7b239e2ec5
refactor(website): minor showcase data refactor (#7654) 2022-06-21 21:35:36 +08:00
dependabot[bot] 3bb76b2b19
chore(deps): bump actions/dependency-review-action from 1.0.2 to 2.0.2 (#7650)
* chore(deps): bump actions/dependency-review-action from 1.0.2 to 2.0.2

Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 1.0.2 to 2.0.2.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](a9c83d3af6...1c59cdf2a9)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Update dependency-review.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-21 21:06:28 +08:00
Joshua Chen 5137543914
chore: upgrade dependencies (#7646) 2022-06-18 17:03:41 +08:00
凱恩Kane 009361addc
docs: mark Yeecord as opensource in showcase (#7645) 2022-06-18 15:38:19 +08:00
Benjamin Cabanes 25080baf37
docs: add lerna to showcase (#7622)
* chore(website): add lerna to showcase database

* fixes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-17 21:58:44 +08:00
Joshua Chen bfba6a8b02
refactor: remove "error" reporting level, move reportMessage to logger (#7642) 2022-06-17 14:51:00 +02:00
Joshua Chen 1b9bec1042
feat: allow customizing localization path of each locale (#7624) 2022-06-17 11:07:35 +02:00
Paul O’Shannessy 39e3e3715e
chore(create): update the facebook template with current assets (#7639) 2022-06-17 12:26:22 +08:00
Hyunseung Lee 331b83ca40
chore(theme-translations): complete ko translations (#7633)
* Update KO i18n translations

* Update ko i18n

* Update algolia i18n

Co-authored-by: 이정환 <king199777@gmail.com>
Co-authored-by: Yongmin Hong <revi@pobox.com>
2022-06-17 10:29:59 +08:00
Sébastien Lorber 6df379ca6f
fix(docs): forward doc frontMatter.sidebar_custom_props to linking sidebar category (#7638) 2022-06-16 19:20:07 +02:00
Joshua Chen 20e8e90762
fix(content-docs): allow translating doc labels in sidebars.js (#7634) 2022-06-16 16:11:21 +02:00
Matthias Koch 5fe33bef06
fix(content-pages): add article wrapper around MDXContent (#7595) 2022-06-16 14:00:22 +02:00
emattia 7e9a38ca36
docs: add outerbounds to showcase (#7564)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-06-16 12:38:04 +02:00
Joshua Chen 89e146f596
fix(utils): allow any non-boundary characters in Markdown heading ID (#7604) 2022-06-16 12:32:42 +02:00
Joshua Chen 0114f00069
refactor(cli): make the CLI an even thinner wrapper around command functions (#7583) 2022-06-15 19:28:07 +02:00
Joshua Chen b4d93b9bd0
chore: upgrade to TS 4.7, compile with NodeNext (#7586)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-06-15 19:15:11 +02:00
Alexander Nestorov b503523f66
feat(core): allow opting out of HTML minification (#7581) 2022-06-15 18:41:03 +02:00
dpang314 1f0440074a
fix(cssnano-preset): disable z-index minification (#7593)
* fix(cssnano-preset): disable z-index minification

* add z-index tests link to pages tests

* revert change to docs
2022-06-15 12:13:25 +02:00
Szilárd Dóró 7e9db564d1
docs: add Nhost to showcase (#7620)
* add Nhost to showcase

* Update website/src/data/users.tsx

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-15 17:28:35 +08:00
Kürşat Şimşek 8c422a9660
docs: add react-chat-elements to showcase (#7616)
* react-chat-elements docs website added.

* preview image size edited.

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-15 14:26:45 +08:00
Joshua Chen e12a2efaeb
docs: normalize capitalization (#7619) 2022-06-15 13:04:33 +08:00
Joshua Chen aeb6c971c0
docs: normalize capitalization (#7613) 2022-06-14 14:01:06 +08:00
Joshua Chen 56e7c3102e
docs: advise using Node 18 in deployment (#7611) 2022-06-14 11:46:13 +08:00
Joshua Chen fb3138d722
refactor(client-redirects): elaborate documentation, minor refactor (#7607) 2022-06-13 22:04:39 +08:00
小雨青年 27834dc23a
docs: add Metalyoung to showcase (#7597)
* Add "metalyoung" to users.tsx and preview image

* update Metalyoung preview image

* fixes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-11 23:00:40 +08:00
Yangshun Tay feb9cf01ed
fix: force refresh on chunk preload error (#7600)
* fix: force refresh on preload error

* misc: add comment

* Update PendingNavigation.tsx
2022-06-11 17:03:11 +08:00
Joshua Chen ec8230b7ba
chore: upgrade dependencies (#7596) 2022-06-11 11:51:09 +08:00
Diego França 334c95cdf6
docs: add Tech-Notes to showcase (#7591)
* Add "difranca | Tech-Notes" to users.tsx

* Add "difranca | Tech-Notes" preview image

* fixes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-10 11:53:05 +08:00
dpang314 adad253d24
docs: add missing import (#7590) 2022-06-10 00:45:50 +08:00
sado 79db7bcdcb
docs: add sado0823.github.io to showcase (#7584)
* docs: add sado0823.github.io to showcase

* optimize image

* optimize image

Co-authored-by: sado <liaoyonglin@shangbanzu.gift>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-09 14:39:00 +08:00
Clemie McCartney 0fe33fd490
docs: add peradaban to showcase (#7580)
* add peradaban to docusaurus showcase

* add peradaban showcase assets

* fixes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-09 14:38:48 +08:00
dht 5c9e4a2dcd
docs: make localhost links clickable (#7582)
* docs: clickable localhost links

* revert changes in auto-generated examples folder

Co-authored-by: dht <dht@users.noreply.github.com>
2022-06-08 14:33:50 +08:00
Joshua Chen 7869e74fd7
refactor(pwa): simplify registerSW code, fix ESLint errors (#7579) 2022-06-07 21:42:17 +08:00
dependabot[bot] bada5c11cc
chore(deps): bump github/codeql-action from 2.1.11 to 2.1.12 (#7577)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.11 to 2.1.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](a3a6c128d7...27ea8f8fe5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-07 09:14:19 +08:00
dependabot[bot] 7bf535d7c7
chore(deps): bump actions/setup-node from 3.2.0 to 3.3.0 (#7578)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](17f8bd9264...eeb10cff27)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-07 09:14:01 +08:00
Joshua Chen 75f0f92023
fix(website): make KaTeX fonts available on alternative locales (#7574) 2022-06-06 19:32:57 +08:00
Joshua Chen bf9b69cfbf
docs: make config tabs translatable, fix APITable crowdin issue (#7572)
* docs: make config tabs translatable, fix APITable crowdin issue

* fix
2022-06-06 10:52:19 +08:00
Joshua Chen f8163ff2ee
fix(theme-translations): improve zh translation (#7570) 2022-06-05 22:42:22 +08:00
Joshua Chen 6a5efd068c
docs: mark some more fields as translatable (#7569) 2022-06-05 21:32:43 +08:00
Joshua Chen c03def7d5f
docs: wrap more JSX in mdx-code-block (#7568) 2022-06-05 15:41:06 +08:00
Joshua Chen 6d481f6a29
docs: fix multiple typos (#7561) 2022-06-04 21:22:06 +08:00
Joshua Chen 90d2de6baf
chore: upgrade dependencies (#7560)
* chore: upgrade dependencies

* fix
2022-06-04 21:05:53 +08:00
Boulet 2b006d77f3
docs: add brainboard to showcase (#7554)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-03 17:44:15 +02:00
Le Thi Van 5444a230cf
feat: allow specifying custom target for FooterLogo (#7557)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-03 17:28:27 +02:00
Sébastien Lorber 9d0bf2e090
feat: add admonition type title translations (#7556)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-03 16:40:02 +02:00
Alexey Pyltsyn 5746c58f41
refactor: handle all admonitions via JSX component (#7152)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-06-03 14:26:33 +02:00
Sébastien Lorber 17fe43ecc8
fix(theme-classic): code block wrap mode should allow wrapping in the middle of a word (#7551) 2022-06-02 17:40:42 +02:00
Joshua Chen abe5450526
feat(core): allow customizing the i18n directory path (#7386)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-06-02 17:37:14 +02:00
Sébastien Lorber c07a514730
chore: update CI trigger paths (#7550) 2022-06-02 17:26:18 +02:00
dpang314 b215ad0e1b
fix(theme-classic): inconsistent code block wrapping (#7485)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-06-02 15:56:54 +02:00
Sébastien Lorber 7dd822becb
chore: use npx --yes (#7549) 2022-06-02 15:07:28 +02:00
Lane Goolsby 1efcfc4671
feat(analytics): allow query/hash changes to be sent to GA (#7545)
Co-authored-by: Lane Goolsby <lanegoolsby@rocketmortgage.com>
2022-06-02 12:47:52 +02:00
JP f25ee0cbf5
feat(live-codeblock): add support for noInline to interactive code blocks (#7514)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-06-02 10:34:20 +02:00
Sébastien Lorber 6afc902672
chore: update static-site-generator-webpack-plugin (#7547) 2022-06-02 10:09:00 +02:00
dpang314 4f26a1911a
feat(content-docs): last_update front matter (#7461)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-06-01 16:27:58 +02:00
Charles Ancheta a469ae3d63
docs: add CharlesAncheta.com to showcase (#7533)
* docs: add CharlesAncheta.com to showcase

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-01 15:20:23 +02:00
Flávio Silva 0afb218369
docs: remove extraneous bracket (#7541) 2022-06-01 20:56:44 +08:00
John Reilly 338b819abc
feat: add engines field to templates' package.json (#7520) 2022-06-01 13:34:34 +02:00
Joshua Chen 5cf6432e4e
docs: avoid using nested mdx-code-block (#7543)
* docs: avoid using nested mdx-code-block

* fix
2022-06-01 19:32:25 +08:00
DOLLE b81f80d06a
docs: update react native boilerplate preview (#7542)
* update design preview

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-06-01 17:12:12 +08:00
Joshua Chen 9023b7740c
refactor: remove sub-eslintrc, fix more lint errors (#7530) 2022-05-30 14:49:51 +08:00
Joshua Chen f443e992b9
refactor: mark toc in loaded MDX as non-optional (#7524) 2022-05-29 22:36:41 +08:00
Joshua Chen 8b1acb50d1
fix: make type-checking pass in Yarn PnP (#7521)
* fix: make type-checking pass in Yarn PnP

* fix

* fix?

* fix...

* almost there

* try again

* little fix

* disable
2022-05-28 23:52:05 +08:00
Joshua Chen f40dc31381
docs: multiple documentation elaborations (#7519) 2022-05-28 21:24:01 +08:00
Joshua Chen ab566ecce3
docs: remove useless front matter (#7518) 2022-05-28 19:07:45 +08:00
Dharsan B 432a8bd3e9
docs: update Kent C. Dodds Twitter avatar (#7512) 2022-05-27 19:19:43 +02:00
Sébastien Lorber 613d938cfc
chore: prepare v2.0.0-beta.21 release (#7513)
* add beta 21 version

* v2.0.0-beta.21

* typo
2022-05-27 18:29:11 +02:00
Charles Korn 1e18f8fd4e
fix: always emit SEO title + og:title meta (#7362)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-05-27 17:55:35 +02:00
Ori Shalom 49ecd8f472
fix(gtag): send the newly rendered page's title instead of the old one's (#7424)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-05-27 16:48:29 +02:00
Joshua Chen 7ab97d4726
feat(sitemap): allow customizing the output name (#7469)
* feat(sitemap): allow customizing the output name

* add docs
2022-05-27 22:30:59 +08:00
Joshua Chen 9398bb2487
chore: upgrade dependencies (#7463)
* chore: upgrade a few loaders, require Node 14.15

* upgrade

* upgrade BPDIN
2022-05-27 20:50:54 +08:00
Joshua Chen 1a5e33c717
refactor(pwa): remove reloadPopup option in favor of swizzling (#7422)
* refactor(pwa): remove reloadPopup option in favor of swizzling

* restore code splitting

* add deprecation
2022-05-27 20:32:22 +08:00
Joshua Chen be912c698a
feat(core): support docusaurus.config.cjs as default file name (#7371) 2022-05-27 11:11:58 +02:00
James 35e63515e6
feat: make docusaurus serve automatically open in browser (#7500)
* feat: add automatic url open to npm run serve

* fix

* adding ci check

* add docs

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-27 10:45:53 +02:00
Sébastien Lorber dbd161d67c
fix(create-docusaurus): potential security issue with command injection (#7507) 2022-05-27 10:41:15 +02:00
Junjie cd7cf781cd
docs: add Junjie to showcase (#7484)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-26 15:52:15 +02:00
Joshua Chen bac292d84b
docs: document MDXComponents scope (#7503)
* docs: document MDXComponents scope

* address reviews

* add info
2022-05-26 21:50:50 +08:00
Forresst 06a37112bb
chore(theme-translations): complete French translations (#7493) 2022-05-26 15:50:36 +02:00
Joshua Chen 9cf2bf1199
fix(core): always treat error boundary fallback as a callback (#7492)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-05-26 13:05:03 +02:00
Joshua Chen e955ae472d
fix(theme-classic): allow nested task lists to preserve the indent (#7438)
* fix(theme-classic): allow nested task lists to preserve the indent

* add Ul back
2022-05-26 12:41:23 +02:00
Massoud Maboudi 309a7e8bd4
docs: add Massoud Maboudi's portfolio to showcase (#7412)
* docs: add Massoud Maboudi's portfolio to showcase

* optimize image

* Update website/src/data/users.tsx

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-05-26 12:38:14 +02:00
Joshua Chen 47a2cca17d
chore: require Node 16.14 (#7501) 2022-05-26 11:44:18 +02:00
James 4f97c7b52c
docs: link every reference of types in API table to the type definition (#7497)
* dogfood fix

* feat: links for plugin types

* better syntax

* little refactor

* use code title

* complete the rest

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-26 15:06:36 +08:00
James f94701569b
fix: avoid printing period after localhost URL (#7499)
* fix: output of URL

* fix: adding formatting to start.ts
2022-05-26 15:06:22 +08:00
James 89ddc6d258
misc: avoid using fs.realpathSync in website (#7496)
* dogfood fix

* remove other mentions

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-26 13:02:32 +08:00
Joshua Chen f609acab4f
fix(theme-classic): consistently apply the right active class name for all navbar items (#7430) 2022-05-25 19:01:29 +02:00
Jan Peer Stöcklmair 5fcb742aa1
feat(theme-classic): allow className as option for type: "search" (#7357)
* feat(theme-classic): allow className as option for type: "search"

* fixup! feat(theme-classic): allow className as option for type: "search"

* refactor

Co-authored-by: Jan Peer Stoecklmair <jan.peer.stoecklmair@dynatrace.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-25 18:41:05 +08:00
Joshua Chen cd21a31005
test: strengthen internal types (#7488) 2022-05-25 15:38:44 +08:00
Joshua Chen d50fe3b670
test: fix ALL type errors in tests (#7487) 2022-05-25 14:01:10 +08:00
Joshua Chen e2e40b8f5f
test: fix some type errors in test files (#7486) 2022-05-25 11:46:10 +08:00
Joshua Chen 624735bd92
refactor: fix more type-aware linting errors (#7479) 2022-05-24 19:19:24 +08:00
Joshua Chen bf1513a3e3
refactor: fix a lot of errors in type-aware linting (#7477) 2022-05-24 15:40:26 +08:00
dependabot[bot] 222bf3c091
chore(deps): bump github/codeql-action from 2.1.10 to 2.1.11 (#7475)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.10 to 2.1.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2f58583a1b...a3a6c128d7)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-24 10:41:17 +08:00
dependabot[bot] 1db7871446
chore(deps): bump actions/dependency-review-action from 1.0.1 to 1.0.2 (#7476)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](39e692fa32...a9c83d3af6)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-24 10:41:00 +08:00
Joshua Chen 1d3ed21df8
chore(theme-translations): complete zh translations (#7474) 2022-05-23 20:06:11 +08:00
Joshua Chen 3666a2ede5
refactor: remove a lot of implicit anys (#7468) 2022-05-23 15:40:53 +08:00
Joshua Chen 0c8e57de67
refactor(pwa): migrate sw.js to TS (#7467)
* refactor(pwa): migrate sw.js to TS

* add gitattributes
2022-05-23 14:22:56 +08:00
Joshua Chen 2d94d575a1
refactor: make entire project typecheck with root tsconfig (#7466) 2022-05-23 12:54:25 +08:00
Joshua Chen 89b0fff128
refactor: reduce number of leaked anys (#7465) 2022-05-23 00:30:32 +08:00
Joshua Chen 6e62bba30f
fix(utils): fix Markdown link replacement when link text is same as href (#7464) 2022-05-22 19:13:28 +08:00
Jeremy 5207e25291
docs: add Avana Wallet to showcase (#7460)
* Added Avana Wallet

https://docs.avanawallet.com implements Docusaurus 2.0

* Update users.tsx

* Added Avana Wallet showcase png

* Update users.tsx

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-22 12:14:18 +08:00
Joshua Chen 9d1a91774a
chore: upgrade dependencies (#7462) 2022-05-22 10:40:50 +08:00
凱恩Kane a34b2a2c1c
docs: add Yeecord to showcase (#7459)
* add yeecord to users.tsx

* use English for title, description

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-21 16:41:17 +08:00
Joshua Chen ad888b7fae
fix(utils): avoid replacing Markdown links missing the directly next link (#7458) 2022-05-21 13:07:31 +08:00
Joshua Chen 0f8f918f2c
fix(core): avoid using logger and fs.readJSON in SSR (#7453)
* fix(core): avoid using logger and fs.readJSON in SSR

* ignore prettier
2022-05-20 14:31:53 +08:00
Lane Goolsby 5aaa33fc61
feat: add --no-minify flag to docusaurus start (#7452)
* feat: Adding --no-minify flag to start

* Undoing the changes to old docs

Co-authored-by: Lane Goolsby <lanegoolsby@rocketmortgage.com>
2022-05-20 12:50:17 +08:00
Joshua Chen ba0d94d02b
chore: normalize naming of admin scripts (#7448) 2022-05-18 21:34:34 +08:00
Joshua Chen b31220032b
refactor(theme-classic): migrate to tsc for build (#7447)
* refactor(theme-classic): migrate to tsc for build

* fix
2022-05-18 20:08:09 +08:00
Joshua Chen 6b53d4263d
misc: make copyUntypedFiles work for watch mode (#7445) 2022-05-18 19:18:32 +08:00
Joshua Chen 5c3d3cfef1
chore: replace concurrently with npm-run-all (#7444) 2022-05-18 18:24:14 +08:00
Joshua Chen a555fd1dcb
refactor: make each tsconfig explicitly declare module and include/exclude (#7443) 2022-05-18 12:48:28 +08:00
Joshua Chen a0b0477dee
refactor(stylelint-copyright): migrate to TS (#7441) 2022-05-17 22:13:47 +08:00
Joshua Chen 71b5901bcd
refactor(cssnano-preset): migrate to TS (#7440)
* refactor(cssnano-preset): migrate to TS

* fix
2022-05-17 21:41:30 +08:00
Joshua Chen c8b5f230ab
misc: add templates to github-linguist ignore list (#7439) 2022-05-17 20:19:39 +08:00
Joshua Chen 7613ecb9ea
refactor: use TS project references instead of running tsc multiple times (#7437)
* refactor: use TS project references instead of running tsc multiple times

* deduplicate

* dedup

* eliminate --project

* add swc config

* add target
2022-05-17 15:21:44 +08:00
Joshua Chen 1bec5f673a
chore: upgrade dependencies (#7436) 2022-05-17 13:11:20 +08:00
dependabot[bot] 4419beb86f
chore(deps): bump actions/dependency-review-action (#7435)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 3f943b86c9a289f4e632c632695e2e0898d9d67d to 1. This release includes the previously tagged commit.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](3f943b86c9...39e692fa32)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 10:02:40 +08:00
dependabot[bot] 3390e2378e
chore(deps): bump actions/github-script from 6.0.0 to 6.1.0 (#7434)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](9ac08808f9...7a5c598405)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 10:02:24 +08:00
dependabot[bot] 6ac745dde4
chore(deps): bump actions/setup-node from 3.1.1 to 3.2.0 (#7433)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](56337c4255...17f8bd9264)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 10:02:11 +08:00
dependabot[bot] 22b0504b4a
chore(deps): bump github/codeql-action (#7432)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 75b4f1c4669133dc294b06c2794e969efa2e5316 to 2.1.10. This release includes the previously tagged commit.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](75b4f1c466...2f58583a1b)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 10:01:40 +08:00
Joshua Chen c16a08cba5
fix(website): restore expand button style on changelog (#7431) 2022-05-16 19:14:47 +08:00
Ggicci b7448865fe
docs: add httpin to showcase (#7428)
* Add httpin project for showcase

* Add files via upload

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-16 15:19:50 +08:00
Nitya Narasimhan c39406e6d8
docs: add '30 Days of SWA' to showcase (#7427)
* Adding '30 Days of SWA` app to Showcase

* Added file for showcase

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-16 12:44:45 +08:00
Oluwatobi Sofela 90eee091ac
docs: add CodeSweetly to showcase (#7425)
* Add CodeSweetly to Showcase

* Add CodeSweetly to showcase

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-16 12:44:21 +08:00
Joshua Chen 7ea59b4e55
refactor(pwa): migrate client modules to TS (#7421) 2022-05-15 12:47:33 +08:00
Joshua Chen 8277b0bec7
docs: add FAST to showcase (#7384)
* add fast to showcase

* add fast png to showcase

* update tags, update website link, and upload new screenshot

* optimize image

Co-authored-by: Steph Huynh <steph@huynhicode.dev>
2022-05-14 23:47:40 +08:00
Joshua Chen 0838884f67
chore: enable import/order rule (#7418) 2022-05-14 23:39:50 +08:00
Nitya Narasimhan a4c54aba45
docs: add Azure SWA as deployment option (#7407)
I've linked to the dev.to article (which is a timestamped stable version) - to be consistent with other deployment snippets.

The dev.to article references [this GitHub repo](https://github.com/fearlessly-dev/swa-demo-docusaurus) and  this[#30DaysOfSWA](https://www.azurestaticwebapps.dev/blog/build-with-docusaurus) site which was the inspiration for writing this article. The repo contains the code for the demo, and its README is the canonical source for the article, in case relevant.
2022-05-14 19:57:43 +08:00
Joshua Chen c17d745533
refactor(theme-classic): always collocate stylesheets with components in one folder (#7415) 2022-05-14 14:08:10 +08:00
Pranab Das 3f110a36bd
fix(theme-classic): autocollapse sidebar categories when navigating with paginator (#7411)
* fix: autocollapse sidebar categories

Auto collapse sidebar categories when navigating via paginator.

* Add autoCollapseCategories in dependency array

* restore collapse button behavior

* simplify

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

* hopefully a better fix

* refactor

* try this

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-14 13:37:59 +08:00
Joshua Chen d2ca4a171c
refactor(core): properly code-split NotFound page (#7405) 2022-05-12 16:21:28 +08:00
Rui Peres 2bc3ea363f
docs: add Vital to showcase (#7403)
* Added vital to showcase

* missing tag

* make things work

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-12 16:21:19 +08:00
Akara 92a3ac4857
docs: add akara's blog to showcase (#7401)
* docs: add akara's blog to showcase

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-12 16:20:59 +08:00
Massoud Maboudi bcf3813dca
chore(theme-translations): complete Farsi translations (#7400) 2022-05-12 10:38:49 +08:00
Matthias Koch fa10d1b1a4
fix(website): use react-lite-youtube-embed for lazy YouTube video (#7390)
* fix(website): use react-lite-youtube-embed for lazy YouTube video

* fix(website): use react-lite-youtube-embed for lazy YouTube video

* fix(website): use react-lite-youtube-embed for lazy YouTube video

* Update multiple-sidebars.md

* Update installation.md

* refactor intro

* rename file back

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-12 10:30:59 +08:00
Benjamin Diolez cd0aff443b
docs: add Piano Analytics to showcase (#7381)
* docs: add Piano Analytics to showcase

* optimize image; add to favorite

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-11 20:29:56 +08:00
Massoud Maboudi a0b060759d
docs: fix translation config example (#7396) 2022-05-11 14:35:19 +08:00
dependabot[bot] 52e466e5de
chore(deps): bump github/codeql-action from 2.1.9 to 2.1.10 (#7395)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.9 to 2.1.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](7502d6e991...75b4f1c466)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-11 13:14:28 +08:00
Joshua Chen 8973727de8
chore: use "pr:" prefix for changelog labels; elaborate on labeling process (#7394) 2022-05-11 13:02:59 +08:00
Joshua Chen d3788bd126
fix(mdx-loader): use React.Fragment as fragment factory (#7392) 2022-05-11 11:02:41 +08:00
Joshua Chen 60960b471d
chore: upgrade dependencies, fix lint-staged not outputting formatted log (#7388)
* chore: upgrade dependencies, fix lint-staged not outputting formatted log

* fix

* fix lock...
2022-05-10 22:42:45 +08:00
Joshua Chen 6e10a48059
fix(content-docs): restore functionality when a category only has index page (#7385)
* fix(content-docs): restore functionality when a category only has index page

* use this internally
2022-05-10 14:50:43 +08:00
Joshua Chen c3880cc342
refactor(create): clean up logic when prompting for unspecified arguments (#7374) 2022-05-08 22:00:28 +08:00
Designatory cfdd1f7e6d
docs: update GeekyWeb's showcase description (#7372)
* Docs: Description Edited

* minor edit

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-08 16:09:03 +08:00
Joshua Chen 7c9892888d
refactor: normalize error logging (#7370) 2022-05-08 13:40:34 +08:00
Joshua Chen 87c7639a52
fix(cli): output correct path when swizzling bare-file component in subfolder (#7369)
* fix(cli): output correct path when swizzling bare-file component in subfolder

* fix snapshot
2022-05-08 13:23:40 +08:00
Joshua Chen f29bb73300
fix(core): make error boundary fallback a component instead of a callback (#7368) 2022-05-07 22:35:57 +08:00
Joshua Chen 77fa3d1470
docs: display last canary publish date in human-readable format (#7367) 2022-05-07 20:17:58 +08:00
Joshua Chen 5bc50ff71f
chore: upgrade dependencies (#7366) 2022-05-07 19:46:21 +08:00
Joshua Chen c0bd145a29
fix(theme-classic): resolve customCss from site dir (#7363) 2022-05-07 18:57:35 +08:00
Designatory 29b015de18
docs: add GeekyWeb to showcase (#7356)
* Update users.tsx

* geekyweb.png added

* changes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-07 18:47:20 +08:00
Michael Hughes 204b9a386f
fix(core): allow githubPort in config validation (#7360)
* Update configValidation.ts

Proposed fix for #7359

* add test case

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-07 13:41:45 +08:00
Romain Dejoux e32ff04d93
fix(types): declare missing peerDependencies 2022-05-06 17:12:04 +08:00
Joshua Chen 1a3488344b
chore: clean up showcase data, re-order and format (#7353)
* chore: clean up showcase data, re-order and format

* change image
2022-05-06 13:01:32 +08:00
Ngô Quốc Đạt 2372701463
docs: add Flarum to showcase (#7352)
* Update users.tsx

* Add image
2022-05-06 12:12:27 +08:00
Sébastien Lorber 386c5901eb
chore: update examples for beta 20 (#7350) 2022-05-05 21:38:47 +02:00
Sébastien Lorber 26df8c83ce
chore: prepare v2.0.0-beta.20 release (#7347) 2022-05-05 20:26:48 +02:00
Joshua Chen 9207cafec7
feat(website): make canary release page display actual canary version name (#7334) 2022-05-05 16:03:53 +02:00
Sébastien Lorber c892492a12
docs(website): fix code block Crowdin issue (#7345) 2022-05-05 15:35:43 +02:00
Sébastien Lorber dfe743c660
fix: avoid flash of page scrolling to top on refresh (#7342) 2022-05-05 19:39:10 +08:00
Joshua Chen 0cc4fa82c1
docs: add page for create-docusaurus API documentation (#7343)
* docs: add page for create-docusaurus API documentation

* update
2022-05-05 19:36:51 +08:00
Sergey Gromkov dd4b7c84dd
docs: add Yandex Metrika plugin to community plugins (#7340)
* Adding Yandex Metrika plugin

* add words

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-05 18:16:22 +08:00
Joshua Chen 49a9f0345c
fix(theme-classic): properly highlight code block line numbers (#7341) 2022-05-05 18:07:46 +08:00
Joshua Chen 8f80f6c0b2
fix(website): fix multiple accessibility issues around color contrast (#7336)
* fix(website): darken breadcrumbs color to ensure contrast

* fix lighthouse

* fix more a11y

* more fix
2022-05-05 15:29:27 +08:00
Joshua Chen eea27aad68
misc: move lighthouse message formatter to admin folder, refactor (#7338) 2022-05-05 14:51:16 +08:00
Alexey Pyltsyn 9cf8d75de8
fix(website): restore showcase (#7337) 2022-05-05 09:22:58 +03:00
Reece Dunham d3f526fd8a
fix(core): inject docusaurus version into SSR as local (#7329)
* Revert "fix(core): handle case where package.json is not available at CWD (#7187)"

This reverts commit 3b32a41f22.

* properly fix

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-05 09:10:47 +08:00
Sébastien Lorber 78400541cb
chore: fix site deployment (#7328) 2022-05-04 19:28:06 +02:00
Steven Hicks 9ead309809
docs: add clarity to versioning behavior (#7327) 2022-05-05 00:15:50 +08:00
Sébastien Lorber c31d076aed
chore: fix site deployment Crowdin issue (#7326) 2022-05-04 17:48:29 +02:00
Alexey Pyltsyn 6fa51890f0
chore: prepare v2.0.0-beta.19 release (#7325)
* chore: prepare v2.0.0-beta.19 release

* v2.0.0-beta.19
2022-05-04 18:38:45 +03:00
Alexey Pyltsyn 7944fdd9a2
refactor: minor improvements for breadcrumbs (#7299)
* refactor: minor improvements for breadcrumbs

* Apply suggestions from code review

* Update packages/docusaurus-theme-translations/locales/fr/theme-common.json

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-05-04 17:54:47 +03:00
Joshua Chen b3feb01009
fix(theme-classic): remove breadcrumb items without href from microdata (#7304) 2022-05-04 16:54:24 +02:00
Alexey Pyltsyn 3a7e6665ad
misc: adjust Lighthouse CI (#7324)
* misc: adjust Lighthouse CI

* Use MD link

* Format code
2022-05-04 22:48:41 +08:00
Joshua Chen 39f5cf3e29
chore: remove dependabot from upgrading npm dependencies (#7322) 2022-05-04 22:21:58 +08:00
Joshua Chen 35b0f0d0aa
refactor(create): add i18n config in init template (#7290) 2022-05-04 16:09:08 +02:00
Alexey Pyltsyn be0dc6b0c9
chore: upgrade Infima to alpha.39 (#7306) 2022-05-04 16:06:54 +02:00
Joshua Chen 470e242eef
chore: make dependabot use tag: dependencies tag (#7310) 2022-05-04 21:52:51 +08:00
Joshua Chen 987c33508f
chore: use "Maintenance" instead of "Internal" in changelog (#7309) 2022-05-04 21:16:46 +08:00
Alexey Pyltsyn 344f7957c7
misc: run Lighthouse CI without assertions (#7308) 2022-05-04 15:57:33 +03:00
Alexey Pyltsyn ee203870be
misc: add doc page for checking by Lighthouse CI (#7300)
* misc: check doc page by Lighthouse CI

* Update lighthouse-report.yml

* Add script to render Lighthouse results

* Use script
2022-05-04 15:36:51 +03:00
Joshua Chen 977ef7121b
docs: add mdx-code-block around tabs; use JS example for magic comments (#7307) 2022-05-04 20:29:09 +08:00
surendran82 0466dbcf3f
docs: add Hasura Docs site to showcase (#7301)
* docs(v2): Add Hasura Docs site to showcase page

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-04 18:56:01 +08:00
Joshua Chen b1cafe73df
refactor: remove long-deprecated routesLoaded lifecycle (#7257) 2022-05-04 12:32:49 +02:00
Joshua Chen 51815c12c9
feat(theme-classic): extensible code block magic comment system (#7178) 2022-05-04 12:31:13 +02:00
Joshua Chen 785fed723f
refactor(theme-classic): move all sidebar-related config under themeConfig.docs.sidebar (#7277) 2022-05-04 12:08:19 +02:00
Joshua Chen 881430078e
refactor(create): update screenshots in quick start tutorial (#7286) 2022-05-04 12:00:12 +02:00
Joshua Chen 7a3894e664
docs: update docs for logger, add API docs to website (#7305)
* docs: update docs for logger, add API docs to website

* fix broken image
2022-05-04 17:59:47 +08:00
Fusang❀ efdd070ead
docs: add meoo.space to showcase (#7302)
* Update users.tsx

* Add files via upload

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-04 16:10:58 +08:00
Aaron Nwabuoku 18d81a1065
docs: add ChatKitty to showcase (#7297)
* docs: add ChatKitty to showcase

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-04 16:00:43 +08:00
Joshua Chen e73cda87d6
docs: remove extraneous line break tags (#7298) 2022-05-04 11:45:20 +08:00
Joshua Chen 1a9bdd1a4e
refactor: use export = syntax for utility packages (#7295) 2022-05-03 20:22:22 +08:00
Joshua Chen a2c993bf9a
fix(*): make TypeScript realize that each plugin package has a default export (#7294) 2022-05-03 18:23:34 +08:00
Joshua Chen b49ae67521
refactor(types): move non-core, non-public types out of the types package (#7293) 2022-05-03 17:15:48 +08:00
Joshua Chen c7a5af7c4d
refactor(core): collocate CLI commands and their option types (#7292)
* refactor(core): collocate CLI commands and their option types

* fixes
2022-05-03 15:32:12 +08:00
Joshua Chen 5bed55aeda
refactor(types): JSDoc for docusaurus config fields (#7291) 2022-05-03 13:57:19 +08:00
Chinazaekpere Ngubo fc8b7674e3
docs: add AvN Gateway to showcase (#7287)
* Update users.tsx

* Add files via upload

* Update users.tsx

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-05-03 11:41:24 +08:00
dependabot[bot] a1182b374c
chore(deps): bump github/codeql-action from 2.1.8 to 2.1.9 (#7288)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.8 to 2.1.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](1ed1437484...7502d6e991)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-03 09:01:58 +08:00
Joshua Chen e1b7171bb1
fix(core): allow empty static directories (#7285)
* fix(core): allow empty static directories

* improve comment

* add empty directory
2022-05-02 16:34:30 +08:00
Joshua Chen 594d8f357c
docs: add a paragraph about SSR as an optimization technique (#7284) 2022-05-02 14:23:42 +08:00
Joshua Chen a6c007849e
chore: fix pnpm E2E test to work on pnpm v7 (#7283)
* chore: fix pnpm E2E test

* fix?
2022-05-02 13:38:08 +08:00
Joshua Chen 53564f33ab
refactor(core): prefetch/preload refactor (#7282) 2022-05-02 12:56:58 +08:00
Joshua Chen 3c24cbc2c0
misc: tighten CI trigger conditions (#7279) 2022-04-30 22:17:37 +08:00
Joshua Chen 9fd5d62340
docs: enhance docs about Markdown TOC and metadata (#7278)
* docs: multiple documentation improvements

* fix

* fix
2022-04-30 21:30:14 +08:00
Joshua Chen afc72480ab
refactor(eslint-plugin): migrate to TS-ESLint infrastructure (#7276)
* refactor(eslint-plugin): migrate to TS-ESLint infrastructure

* fix lock
2022-04-30 17:57:57 +08:00
Joshua Chen f063e9add5
chore: upgrade dependencies (#7274)
* chore: upgrade dependencies

* remove nodemon
2022-04-30 14:32:37 +08:00
Joshua Chen 710f898703
refactor(theme-classic): multiple re-arrangements (#7273)
* refactor(theme-classic): enforce collocated JSX and module CSS

* refactor
2022-04-30 12:29:54 +08:00
Dan Roscigno 355a22907d
docs: specify Node version requirement to a minor (#7271)
* Update installation.md

I believe the current version of Docusaurus requires node 16.  With 14 I get:
```
import {program} from 'commander';
        ^^^^^^^
SyntaxError: The requested module 'commander' does not provide an export named 'program'
    at ModuleJob._instantiate (internal/modules/esm/module_job.js:92:21)
    at async ModuleJob.run (internal/modules/esm/module_job.js:107:20)
    at async Loader.import (internal/modules/esm/loader.js:179:24)
```

* Update installation.md

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-30 09:12:37 +08:00
Sébastien Lorber 2a0f105434
refactor(theme-classic): DocPage theme refactors polish (#7268) 2022-04-29 19:34:40 +02:00
Joshua Chen 41f53718c1
fix(theme-common): allow details to not provide a summary (#7267) 2022-04-29 19:33:28 +02:00
Sébastien Lorber e053f39cf0
refactor(theme-classic): refactor TOC-related theme components (#7270)
* extract TOCItemTree component

* refactor TOCCollapsible
2022-04-29 19:32:35 +02:00
Sébastien Lorber 3bef88232f
refactor: extract useSkipToContent() (#7269) 2022-04-29 19:16:02 +02:00
Sébastien Lorber fe286f1833
misc: add links section to PR template (#7266)
* add links section to PR template

* wording

* wording

* update template

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-29 18:49:05 +02:00
Elias Papavasileiou 3b1170eb44
feat: Docusaurus ESLint plugin to enforce best Docusaurus practices (#7206)
* feat: add eslint plugin

* refactor

* add tests

* fixups!

* fix(no-dynamic-i18n-messages): make translate() recognize template literals

* refactor: rename rule no-dynamic-i18n-messages --> string-literal-i18n-messages

* feat: add ignoreStrings option and refactor

* docs: migrate docs to /docs/api/plugins

* docs: fix anchor links in README.md

* fix: add some ignored strings

* docs: update eslint-plugin docs

* fix: update README link

* docs: various updates

- Reorder sidebar entries
- Fix title size
- Use Markdown file paths
- Simplify relative links

* address reviews

* wording polish

* add npmignore

* fix all internal warnings

* doc improvements

* fix test

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-30 00:04:25 +08:00
Joshua Chen ae788c536f
feat(core): rework client modules lifecycles, officially make API public (#6732) 2022-04-29 15:11:20 +02:00
Joshua Chen 2429bfbd59
refactor(cli): normalize the application of default option values (#7220)
* refactor(cli): normalize default value application

* improve help text
2022-04-29 12:09:03 +02:00
Sébastien Lorber 6265f6dabb
feat: custom navbarItem types (workaround) (#7231)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-29 11:23:46 +02:00
kgolubic 0ffdfe9c22
docs: Add Memgraph site to showcase page (#7260)
* Add Memgraph to showcase page

* Add Memgraph preview image for Showcase
2022-04-29 11:13:50 +02:00
Joshua Chen 0102c2e2ae
docs: wrap code block demos in mdx-code-block (#7262) 2022-04-29 17:09:54 +08:00
JMW 7073cc3462
fix: pass pollOptions to webpack (#7180)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-29 10:48:18 +02:00
loic 47d89ae0fe
docs: add raspisuite website to showcase (#7259)
* add raspisuite website

* add preview image for raspisuite

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-29 12:28:11 +08:00
Joshua Chen d2562a4434
refactor: normalize Markdown linkification behavior, elaborate in documentation (#7248)
* refactor: normalize Markdown linkification behavior, elaborate in documentation

* fix broken links

* allow links to be relative to site root

* fix test

* minor doc update

* Update website/docs/guides/markdown-features/markdown-features-links.md

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

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-04-29 11:36:39 +08:00
Joshua Chen a30daa1530
chore: remove baseUrl from tsconfig (#7258)
* chore: remove baseUrl from tsconfig

* ?
2022-04-28 22:03:25 +08:00
svix-ken ba1d3f45e7
docs: add Svix to showcase (#7254)
* docs: add Svix to showcase

Motivation
Svix uses Docusaurus for our documentation. It could be cool to add it in the showcase page.

Have you read the Contributing Guidelines on pull requests?
Yes

Test Plan
Run yarn run start:v2 and check that the page http://localhost:3000/showcase is rendered properly.

Related PRs
No

* Add svix doc preview image

* Delete Svix.png

* re-upload preview image

needed to make file name lower case.

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-28 15:33:00 +08:00
John Reilly b747143982
docs: update gtag docs to reflect what a GA4 tag looks like (#7252) 2022-04-28 09:05:25 +08:00
Joshua Chen 9a1b7217ba
chore: upgrade Jest to 28; add GitHub-actions reporter (#7243) 2022-04-27 23:47:59 +08:00
Joshua Chen 10a5ebecec
fix(content-docs): make category index text translatable (#7233) 2022-04-27 23:40:15 +08:00
Joshua Chen 996901b53b
docs: change changelog paginator label (#7251) 2022-04-27 21:54:53 +08:00
Joshua Chen 67faa686e8
refactor: semantic markup improvement, fix validation warnings (#7244)
* refactor: semantic markup improvement, fix validation warnings

* change section/article a bit
2022-04-26 20:15:45 +08:00
curatorcat.pcc.eth f9fa2127ae
docs: add PCC Archive site to showcase (#7240)
* docs: add PCC Archive site to showcase

* fixes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-26 18:05:10 +08:00
dependabot[bot] 95eaa98ed9
chore(deps): bump actions/checkout from 3.0.1 to 3.0.2 (#7242)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](dcd71f6466...2541b1294d)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-26 17:48:35 +08:00
Cwen Yin da6588404e
docs: add Chaos mesh site to showcase (#7239)
* docs: Add Chaos mesh site to showcase page

Signed-off-by: Cwen Yin <cwenyin0@gmail.com>

* update tags

Signed-off-by: Cwen Yin <cwenyin0@gmail.com>

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-25 16:40:33 +08:00
czhen 2204efd8ea
docs: add TiDB community books to showcase (#7235)
* docs(showcase): add TiDB community books

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-24 11:30:22 +08:00
Joshua Chen 743738d8c6
docs: add documentation about pluralization (#7236) 2022-04-24 11:23:28 +08:00
Joshua Chen 242f2e780e
chore: upgrade dependencies (#7232) 2022-04-23 11:55:01 +08:00
sykp241095 58f393d768
docs: add OSS Insight to showcase (#7230)
* Add OSS Insight

* Add ossinsight.png

* Update users.tsx

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-23 00:16:34 +08:00
Joshua Chen c4e92c89e8
fix(core): prevent 404 when accessing /page.html (#7184) 2022-04-22 17:44:11 +02:00
Alexey Pyltsyn 4e4aa6add7
feat(theme-classic): toggle code wrap button (#7036)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-04-22 14:50:27 +02:00
Sébastien Lorber c3add31ebf
fix: allow swizzling a component's parent folder (#7225) 2022-04-22 14:23:33 +02:00
Sébastien Lorber f7c995b15a
chore: GitHub Actions cancel-in-progress (#7224) 2022-04-22 11:28:25 +02:00
Sébastien Lorber 5c29809163
refactor: use generated-index in init templates (#7223) 2022-04-22 11:27:14 +02:00
Pablo Cordon ee1dea0b19
fix(website): invert Twitter handle and name (#7226)
* Fixed several pairs of 'handle' and 'name', as their values were inverted.

* Apply suggestions from code review

* oops

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-22 10:31:31 +08:00
Joshua Chen 1412441987
fix(theme-common): do not persist color mode for OS-triggered changes (#7200)
* fix(theme-common): do not persist color mode if switch is disabled

* New setColorMode(null) API

* reset to default without RPCS
2022-04-21 23:29:08 +08:00
AkiraVoid 71ba449a28
fix(content-blog): make footnote reference DOM ID unique on post listing page (#7212)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-21 16:51:24 +02:00
Joshua Chen 3b32a41f22
fix(core): handle case where package.json is not available at CWD (#7187) 2022-04-21 16:07:02 +02:00
rev e12947e818
chore(theme-translations): complete Polish translations (#7214)
* Update theme-common.json

* Update plugin-ideal-image.json

* Update theme-search-algolia.json

* Update theme-common.json

* Update packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/theme-common.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/plugin-ideal-image.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/plugin-ideal-image.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

* Update packages/docusaurus-theme-translations/locales/pl/plugin-ideal-image.json

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>
2022-04-21 19:29:32 +08:00
Joshua Chen b8fc34dd95
fix(theme-translations): fix invalid pluralization in cs (#7222) 2022-04-21 18:43:59 +08:00
Alexey Pyltsyn 9af35c5b47
refactor: customize code block line highlight color via CSS var (#7176) 2022-04-21 11:19:33 +02:00
Joshua Chen 97f7b45f1a
fix(cli): always show error stack to unhandled rejection (#7218) 2022-04-21 12:54:27 +08:00
Joshua Chen 42ca13fadf
chore: remove netlify-cli from dependencies (#7216) 2022-04-20 22:14:03 +08:00
Alexey Pyltsyn 1ba5bf66b2
refactor: improve IconHome icon (#7215)
* refactor: optimize IconHome icon

* Increase icon size

* Fix lint
2022-04-20 21:34:13 +08:00
Dr-Electron 44ebe73e50
refactor: use SVG icon for home breadcrumb (#7183)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-20 14:42:57 +02:00
Joshua Chen 7f98cc6a78
chore: replace node 17 with 18 in CI matrix (#7211) 2022-04-20 11:27:39 +02:00
Joshua Chen 20f333bb50
docs: remove mention of "template" from README installation (#7208) 2022-04-19 22:22:06 +08:00
dependabot[bot] c8d6c7e386
chore(deps): bump actions/setup-node from 3.0.0 to 3.1.1 (#7204)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.0.0 to 3.1.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](9ced9a43a2...56337c4255)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-19 10:55:58 +08:00
dependabot[bot] 64e1045b32
chore(deps): bump jakepartusch/wait-for-netlify-action from 1.1 to 1.3 (#7203)
Bumps [jakepartusch/wait-for-netlify-action](https://github.com/jakepartusch/wait-for-netlify-action) from 1.1 to 1.3.
- [Release notes](https://github.com/jakepartusch/wait-for-netlify-action/releases)
- [Commits](7dcdeb40c6...7ccf91c9ba)

---
updated-dependencies:
- dependency-name: jakepartusch/wait-for-netlify-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-19 10:55:36 +08:00
dependabot[bot] d33063dd0f
chore(deps): bump github/codeql-action from 1.1.5 to 2.1.8 (#7202)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.1.5 to 2.1.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](8834766498...1ed1437484)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-19 10:55:14 +08:00
dependabot[bot] ce936f2c76
chore(deps): bump actions/checkout from 3.0.0 to 3.0.1 (#7205)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](a12a3943b4...dcd71f6466)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-19 07:42:23 +08:00
Jeffrey Aven c3f21cd547
docs: update showcase data for Full Stack Chronicles (#7196)
* Changed blog name

Changed the name and domain for my Docusaurus based blog to fullstackchronicles.io

* added new screenshot

* updates

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-18 16:05:17 +08:00
Joshua Chen 7f06857e46
fix: fix a lot of declaration semantic errors (#7194) 2022-04-17 23:44:20 +08:00
Joshua Chen b154318c28
chore: upgrade dependencies (#7193) 2022-04-17 17:32:41 +08:00
Joshua Chen 9df4874cff
misc: add a name to each GH action step (#7189) 2022-04-17 16:54:01 +08:00
Joshua Chen fa1ce230ea
refactor: capitalize comments (#7188)
* refactor: capitalize comments

* revert...
2022-04-17 16:39:11 +08:00
Joshua Chen 200009008b
refactor: prefer fs.readJSON over readFile.then(JSON.parse) (#7186)
* refactor: prefer fs.readJSON over readFile.then(JSON.parse)

* refactor: use promises
2022-04-17 12:50:09 +08:00
Zac A 674a77f02d
docs: add easy-dates to showcase (#7185)
* docs: add easy-dates to showcase

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-17 11:38:53 +08:00
Joshua Chen f219a2ac90
test: improve test coverage (#7181) 2022-04-16 16:35:40 +08:00
Joshua Chen 44966e19e9
fix(theme-classic): do not add microdata item prop to trailing breadcrumb (#7179) 2022-04-15 22:09:00 +08:00
Alexey Pyltsyn 84d04ed6ed
feat(theme-classic): new 'html' type navbar item (#7058)
* feat(theme-classic): allow using html in dropdown items

* Fix tests

* Introduce HTML type for navbar item

* Update packages/docusaurus-theme-classic/src/theme/NavbarItem/HtmlNavbarItem.tsx

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

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-15 18:58:15 +08:00
Sébastien Lorber 5273a534d3
refactor(theme-classic): split CodeBlock (#7175)
* extract CodeBlockLine

* stable refactor

* stable refactor

* stable refactor

* add CodeBlockContainer

* refactor

* refactor

* do the actual split

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-15 17:58:12 +08:00
Qi Zhang 0f5f6f31e0
docs: add Rainbond site to showcase (#7177)
* add Rainbond site to showcase

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-15 17:49:38 +08:00
Sébastien Lorber 6238ee0851
chore: fix CI typo (#7174) 2022-04-14 18:37:56 +02:00
chelproc f6a14db8de
fix(theme-classic): admonition title: disable text-transform on inline code blocks (#7173) 2022-04-14 18:20:13 +02:00
Alexey Pyltsyn ad1526aade
refactor: control base styling of code blocks via CSS vars (#7172)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-04-14 18:16:39 +02:00
Alexey Pyltsyn fe064a87a6
fix: adjust spacing for custom search properly (#7164) 2022-04-14 11:53:47 +02:00
Joshua Chen 03516dc3a7
fix(sitemap): exclude pages with robots noindex from sitemap (#7143) 2022-04-14 11:31:09 +02:00
Sébastien Lorber 6306cbc266
misc: add CI actions/dependency-review-action for security (#7168) 2022-04-13 19:22:00 +02:00
Naveen ce08891af3
misc: pin actions to a full-length commit SHA (#6984)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-04-13 18:45:19 +02:00
Jody Heavener 5fb0a2e274
feat(content-docs): draft docs excluded from build & sidebars (#6457)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-13 18:02:05 +02:00
Alexey Pyltsyn ee4c984bc7
feat(theme-classic): code block showLineNumbers (#7007) 2022-04-13 14:42:35 +02:00
Joshua Chen 4d9a0edf21
fix(theme-translations): always try all possible locale resolutions (#7166) 2022-04-13 16:32:46 +08:00
Andrew Lyons ec109737e9
docs: explain more clearly the purpose of a ref sidebar type (#7159) 2022-04-12 15:59:41 +08:00
Leedom d2082ba49b
docs: add leedom to showcase (#7151)
* add new showcase leedom

* optimize image

Co-authored-by: leedom <leedom@jinlanzuan.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-12 15:45:14 +08:00
redhat123456 0abf4d706c
docs: add Seven-innovation-base to showcase (#7144)
* Update users.tsx

* Add files via upload

* Update users.tsx

* Update users.tsx

* Delete 1.png

* Add files via upload

* optimize image

* fix tags

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-11 10:59:19 +08:00
Joshua Chen f4ab7c65ac
feat(preset-classic, content-docs/client): JSDoc (#7148)
* refactor: add JSDoc for preset-classic, content-docs/client

* fix
2022-04-11 09:36:30 +08:00
Joshua Chen 25ba91fd4d
fix(website): remove skipLibCheck (#7147) 2022-04-11 07:43:30 +08:00
Joshua Chen 7a61eed3dd
refactor: unify how MDX content types are represented (#7145)
* refactor: unify how MDX content types are represented

* fix

* fix again
2022-04-10 19:19:44 +08:00
Joshua Chen b50def3ac0
refactor(core): lower timeout before rendering progress bar to 200ms (#7142) 2022-04-09 20:19:17 +08:00
Joshua Chen 0dc7f0ff14
refactor(core): minor PendingNavigation refactor (#7141)
* refactor(core): minor PendingNavigation refactor

* lol
2022-04-09 19:30:21 +08:00
Joshua Chen 96fbcb3f51
refactor(content-docs): split version handling into several files (#7140)
* refactor(content-docs): split version handling into several files

* fix test

* increase timeout
2022-04-09 17:08:57 +08:00
Alexey Pyltsyn 7d44961d8b
fix: proper spacing between generated card items on mobiles (#7139) 2022-04-09 09:43:46 +03:00
Joshua Chen 2a7820582c
chore: upgrade dependencies (#7138)
* chore: upgrade dependencies

* reorg

* update comment
2022-04-09 12:36:10 +08:00
Joshua Chen e5bf59fd9b
refactor: mark a few client-side packages as side-effect-free (#7085)
* refactor: mark a few client-side packages as side-effect-free

* fix

* fix again

* fix...

* revert sideeffect

* revert

* fix again...

* properly fix

* fix

* properly fix
2022-04-09 09:08:18 +08:00
apq 53f531edbf
docs: add Virtual Photography Kit to showcase (#7136)
* Added Virtual Photography Kit

* Added Virtual Photography Kit image

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-09 09:05:01 +08:00
Alexey Pyltsyn d5cfa5b7cf
refactor(theme-classic): fix a few margin inconsistencies (#7129)
* refactor(theme-classic): minor fixes and improvements

* Fixes after review

* Reset spacing for all children inside browser window
2022-04-09 08:27:22 +08:00
Joshua Chen 7941a46be3
feat: allow setting calendar for i18n date formatting (#6430)
* feat: allow setting calendar for i18n date formatting

* fix TS

* add test
2022-04-08 22:34:34 +08:00
Sébastien Lorber 3e110054d7
fix(theme-classic): fix docs sidebar layout shifts when expanding categories (#7134) 2022-04-08 12:41:00 +02:00
Joshua Chen 171927342f
feat(core): fail-safe global data fetching (#7083) 2022-04-08 11:08:22 +02:00
Joshua Chen 9145ae88cc
chore: disable string escaping in snapshots (#7131) 2022-04-08 11:23:19 +08:00
Joshua Chen 4134ebb3fb
feat(content-docs): make docs:version command work on localized docs (#7106)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-04-07 19:43:24 +02:00
Joshua Chen 0a3aad618e
feat(core): allow plugins to declare custom route context (#7082) 2022-04-07 18:38:33 +02:00
Joshua Chen 1156be3f20
refactor(content-{blog,docs}): unify handling of tags (#7117) 2022-04-07 15:58:21 +02:00
Joshua Chen ca718ccac0
refactor(theme-classic): blog mobile secondary menu use consistent styles (#7068) 2022-04-07 15:56:50 +02:00
Joshua Chen f9c0a5a6d5
feat(core): allow plugin/preset config to contain false/null (#7124) 2022-04-07 15:27:20 +02:00
Alexey Pyltsyn 0963bff5e7
feat(preset-classic): exclude debug plugin routes from sitemap (#7122) 2022-04-07 12:59:47 +02:00
Alexey Pyltsyn bfbc78e52a
feat: allow using pure HTML as label in navbar links (#7079)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-04-07 12:33:52 +02:00
Lukas Bach 529d853ab8
docs: add Synergies to showcase (#7127)
* docs(showcase): add synergies

* docs(showcase): add synergies preview file

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-07 18:18:17 +08:00
Karl Ward b230e8a545
docs: add Files Gallery website to showcase (#7125)
* Update users.tsx

Product website built with Docusaurus! Thanks.
www.files.gallery

* Added preview image for Files Gallery

PNG / 2560 x 1280

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-07 18:16:05 +08:00
Pierre-Gilles Leymarie 90ee1447ba
fix(theme-classic): shrink title size on mobile (#7004) 2022-04-07 11:53:24 +02:00
Joshua Chen 3cdd038d28
docs: multiple documentation improvements (#7126) 2022-04-07 16:27:28 +08:00
Joshua Chen 2c61bf2568
refactor(showcase): enforce descriptions with maximum length of 120 characters (#7123)
* refactor(showcase): enforce descriptions to have maximum 120 characters

* update
2022-04-07 13:26:21 +08:00
Alexey Pyltsyn c669c103f9
refactor(website): minor fixes and improvements (#7119)
* refactor(website): minor fixes and improvements

* Some fixes

* Round all the corners in browser window

* Add rounded bottom corners to browser window
2022-04-07 08:33:52 +08:00
mehdim 49424f5057
docs: correct plugin example filename (#7026)
* Correect Wrong file name

The file name inside the my-plugin folder is index.js .

* Update plugins.md

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-07 08:17:06 +08:00
ApsarasX 103ea04661
feat(sitemap): add ignorePatterns option (#6979)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-06 15:44:07 +02:00
Joshua Chen bd70cfc1d7
refactor(create): mention that the edit links can be removed (#7118) 2022-04-06 17:20:41 +08:00
Joshua Chen e610a4ac00
test: improve test coverage (#7113) 2022-04-05 14:09:19 +08:00
Joshua Chen 4194925da9
docs: add a note about additional languages needing to be Prism component names (#7110) 2022-04-04 10:02:16 +08:00
Joshua Chen 85f47fd8f7
fix(core): preserve Interpolate children semantics (#7103)
* fix(core): preserve Interpolate children semantics

* fix

* fix again
2022-04-03 15:16:30 +08:00
Joshua Chen c7c0ee4e7c
chore: upgrade dependencies (#7101) 2022-04-02 08:32:26 +08:00
Joshua Chen 898611d4ad
refactor(core): code cleanup (#7084) 2022-04-01 13:41:39 +08:00
Joshua Chen ff96606865
docs: fix some casing inconsistencies (#7081) 2022-03-31 20:23:44 +08:00
Joshua Chen 24c205a835
refactor: replace non-prop interface with type; allow plugin lifecycles to have sync type (#7080)
* refactor: replace non-prop interface with type; allow plugin lifecycles to have sync type

* fix
2022-03-31 19:16:07 +08:00
Joshua Chen ce2b631455
fix(create): install types for JS template as well (#7078) 2022-03-31 15:49:07 +08:00
Lenz Weber-Tronic 949a72e6a5
perf(mdx-loader): cache mdx/remark compiler instances (#4997)
* (mdx-loader) only create mdx compiler once per webpack config

* type fixes

* fix path

* remove assertion

* docs: add missing Tab/TabItem imports

* fixup

Co-authored-by: slorber <lorber.sebastien@gmail.com>
Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
2022-03-31 15:42:57 +08:00
Joshua Chen bb55586c20
fix(website): lazy-load YT iframe (#6746) 2022-03-30 22:50:16 +08:00
Joshua Chen 04affa60b6
refactor(core): add comments for react-loadable logic (#7075)
* refactor(core): add comments for react-loadable logic

* fix test
2022-03-30 22:01:16 +08:00
Joshua Chen 13e7de853e
refactor(theme-classic): extract doc-related navbar items' logic to theme-common (#7067) 2022-03-30 14:50:04 +08:00
Joshua Chen fd24bd180d
fix(core): all plugin lifecycles should receive translated content (#7066) 2022-03-30 11:57:13 +08:00
Joshua Chen 3f33e90704
chore: upgrade dependencies (#7065)
* chore: upgrade dependencies

* fix project words
2022-03-30 11:05:50 +08:00
Joshua Chen 2e79597f83
feat(theme-classic): show blog sidebar on mobile (#7012)
* feat(theme-classic): show blog sidebar on mobile

* fix

* oops

* docs

* add a little margin

* Update display.tsx

* Update content.tsx

* reformat
2022-03-30 09:15:54 +08:00
Chau Tran 1f77fc93bb
docs: add docusaurus-plugin-typedoc to resources (#7061) 2022-03-29 22:52:25 +08:00
Joshua Chen 177e8d7c02
docs: add firelordjs to showcase (#7059)
* docs: add firelordjs to showcase

 docs: add firelordjs to showcase

fixes

kick CI

Delete firelordjs.png

Add files via upload

* kick CI

Co-authored-by: Acid Coder <5227509+tylim88@users.noreply.github.com>
2022-03-29 19:09:01 +08:00
Joshua Chen 4e45e14fdd
fix(theme-common): use native scrolling when smooth behavior set in CSS (#7057)
* fix(theme-common): use native scrolling when smooth behavior set in CSS

* fix

* fix again

* fix again
2022-03-29 18:02:09 +08:00
Joshua Chen 77662260f8
refactor(core): refactor routes generation logic (#7054)
* refactor(core): refactor routes generation logic

* fixes
2022-03-29 16:37:29 +08:00
Kayce Basques e31e91ef47
docs: add import React statement in JSX file example (#7050) 2022-03-29 09:30:35 +08:00
duanwilliam b5fc9a6b6d
fix(theme): add bash style to Markdown comment styles (#7049)
* docs: fix code block line highlighting in md syntax highlighting

* properly fix

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-29 09:23:03 +08:00
Alexey Pyltsyn 37a5dfaccc
fix(theme-classic): add caret for dropdown on mobile (#7048) 2022-03-29 01:40:41 +03:00
deployn 118ca63c72
chore(theme-translations): complete German translations (#7031)
* Update German locales

* Update German locales

* Update German locales

* update locales
2022-03-28 22:12:34 +08:00
Joshua Chen 4f4f503633
fix(utils): parse Markdown headings with CRLF line break (#7043) 2022-03-28 21:59:29 +08:00
Joshua Chen 5fb09a2946
refactor(core): reorganize files (#7042)
* refactor(core): reorganize files

* fix types
2022-03-28 21:49:37 +08:00
Joshua Chen 85a79fd9b9
refactor(core): reorganize functions (#7037) 2022-03-28 17:12:36 +08:00
Joshua Chen c81d21a641
refactor: minor type improvements (#7035) 2022-03-28 11:15:37 +08:00
Joshua Chen 755b03861c
fix(theme): only parse HTML- and JSX-style comments in MD code (#7033) 2022-03-28 09:57:04 +08:00
Alexey Pyltsyn 57f7881a3d
fix: expand doc main container to full width on mobiles (#7030) 2022-03-27 18:44:38 +03:00
Alexey Pyltsyn 2b58485c83
refactor: console output improvements (#7029) 2022-03-27 19:04:59 +08:00
Alexey Pyltsyn 39486682ba
fix: make docs page wrapper take full height (#7025)
* fix: make page wrapper take full height

* Better solution
2022-03-27 16:20:49 +08:00
Andrei Canta 0b3b642cfb
docs: add Easypanel to showcase (#7022)
* Add Easypanel site to showcase page

* Upload easypanel.png

* fixes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-27 15:01:48 +08:00
Alexey Pyltsyn a307da0b9f
feat(logger): new "url" format, add double quotes around paths (#7019)
* refactor(logger): add double quotes around paths

* Introduce url formatter

* Fix
2022-03-27 14:59:20 +08:00
Joshua Chen 2bcac29cd4
refactor(content-docs): deduplicate types, JSDoc for some APIs (#7027)
* refactor(content-docs): deduplicate types, JSDoc for some APIs

* little refactor
2022-03-27 12:57:15 +08:00
Leedom b842197ac6
docs: consistently use sidebars.js filename (#7016)
* modify sidebar.js to sidebars.js in installation.md

* modify sidebar.js to sidebars.js

Co-authored-by: leedom <leedom@jinlanzuan.com>
2022-03-27 09:55:12 +08:00
Viktor Chernodub 50e38ec4c9
fix(theme-classic): adjust shadow on code block (#7013)
* fix(theme-classic): adjust shadow on code block

* More refactoring

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2022-03-27 01:38:34 +03:00
Joshua Chen 4957ec947b
refactor: fix a few places of path handling (#7023) 2022-03-26 22:49:50 +08:00
Martin Blom e6838dd7a6
docs: add Divine WSF and Ghostly to showcase (#7020)
* Added Divine WSF and Ghostly showcases.

* optimize images

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-26 22:11:41 +08:00
Joshua Chen cb03764ce5
refactor(theme): extract plumbing code of BTT button into theme-common (#7021)
* refactor(theme): extract plumbing code of BTT button into theme-common

* oops
2022-03-26 21:05:48 +08:00
Alexey Pyltsyn 45b7a1b7c8
refactor: remove copyright comment from swizzled components (#7017)
* refactor: remove copyright comment from swizzled components

* Update packages/docusaurus/src/commands/swizzle/actions.ts

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-26 17:51:54 +08:00
Joshua Chen 3683f25637
fix(theme-classic): do not add caret for non-collapsible categories (#7015) 2022-03-26 16:45:19 +08:00
sulu5890 72f005e852
fix(types): declare history and react-loadable as dependencies (#7014)
* fix(types): declare history and react-loadable as dependencies

* fix(types): downgrade history to 4.9.0 to match react-router

* add @docusaurus/react-loadable such that it can be correctly resolved
2022-03-26 14:28:49 +08:00
Sébastien Lorber 1b974e8b1b
refactor: split and cleanup theme/DocPage (#7006) 2022-03-25 19:58:28 +01:00
Sébastien Lorber 2964e6f65d
refactor: split DocSidebarItem by item type (#7005) 2022-03-25 18:59:31 +01:00
Indermohan Singh 2dea99b5c8
docs: remove unnecessary semicolon (#7000)
* docs: remove unnecessary semicolon

The semicolon after the TOCInline component is unnecessary and actually gets rendered on screen.

* ignore prettier

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-25 23:59:13 +08:00
Sébastien Lorber e97f2529d6
chore: regen examples for 2.0 beta.18 (#7002) 2022-03-25 16:45:55 +01:00
Sébastien Lorber 73deaa8bf6
chore: prepare v2.0.0-beta.18 release (#7001) 2022-03-25 16:16:38 +01:00
Joshua Chen b5ceead3b2
feat(content-docs): autogenerate category with linked doc metadata as fallback (#6859) 2022-03-25 15:23:11 +01:00
Joshua Chen f1bcdbff63
fix(validation): improve error messages for a few schemas (#6997)
* fix(validation): improve error messages for a few schemas

* kick CI

* fix test
2022-03-25 21:50:37 +08:00
Alexey Pyltsyn d879cdca96
refactor: improve a11y of dropdown menu (#6971)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-03-25 13:02:24 +01:00
Alexey Pyltsyn c2ac22ec15
refactor(theme-classic): cleanup of code blocks (#6987) 2022-03-25 12:56:00 +01:00
Alexey Pyltsyn 78ecff907a
refactor(theme-classic): clean up CSS of doc cards (#6950)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-25 12:17:42 +01:00
Alexey Pyltsyn e606e62a6a
refactor: better external link icon positioning (#6994) 2022-03-25 11:06:47 +01:00
Joshua Chen 87592bca03
refactor: ensure all types are using index signature instead of Record (#6995)
* refactor: ensure all types are using index signature instead of Record

* kick CI
2022-03-25 18:06:30 +08:00
Joshua Chen e8800b9d49
fix(core): prevent useBaseUrl returning /base/base when on /base (#6993) 2022-03-25 09:40:56 +01:00
Sébastien Lorber dc95cb86ca
feat: lazy-load external images + ability to customize image display (#6990) 2022-03-25 09:12:17 +01:00
Joshua Chen fa50d09d3b
chore: upgrade dependencies (#6991)
* chore: upgrade dependencies

* fix
2022-03-25 10:47:08 +08:00
Joshua Chen d3065b8ad2
refactor(lqip-loader): remove unused palette option (#6992) 2022-03-25 10:23:42 +08:00
Kayce Basques 395136a731
docs: fix example admonition syntax (#6988)
* Fix example admonition syntax

There was a space between `::: info` should be `:::info` or else Docusaurus does not render it as an admonition.

* kick CI

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-25 08:54:27 +08:00
Sébastien Lorber c42f22b9bd
refactor: extract MDX components (#6989) 2022-03-24 19:23:44 +01:00
Alexey Pyltsyn 4c0914c035
refactor(theme-classic): remove span wrappers from layout links (#6985) 2022-03-24 17:03:59 +01:00
Joshua Chen 21ff25eebb
fix(theme-classic): minor code copy button improvements (#6986) 2022-03-24 16:52:45 +01:00
Sébastien Lorber c3e7ecca17
chore: update static-site-generator-webpack-plugin (#6975) 2022-03-24 16:09:28 +01:00
Sébastien Lorber 22c031c071
fix(search): bump Infima, fix Docusaurus search issue due to broken CSS selector (#6983) 2022-03-24 15:33:21 +01:00
Joshua Chen 2eeb0e46a2
feat(utils): JSDoc for all APIs (#6980)
* feat(utils): JSDoc for all APIs

* fix tests
2022-03-24 21:34:31 +08:00
Alexey Pyltsyn b8d2a4e84d
refactor: replace text-based copy code button with icons (#6964) 2022-03-24 10:47:56 +01:00
Jadon N 19d2a18817
docs: npm run tsc -> npx tsc (#6978)
* Correct npm run tsc to npm run typecheck

According to this page, you should run `npm run tsc` to run `tsc` and do a type check. However, in the package.json file for Docusaurus version 2.0.0-beta.17 the command is actually `npm run typecheck`, which runs `tsc`.

This update only replaces `tsc` with `typecheck` so the npm script will run correctly.

* Recommend npx tsc for type-checking

Based on feedback for the original change to replace `npm run tsc` with `npm run typecheck`, a better solution that was suggested was to use npx to run tsc instead of an npm script. `npx tsc` should work regardless of the template/presets you installed when you installed Docusaurus.
2022-03-24 11:14:09 +08:00
Alois Klink 4d2ab826b8
fix(validation): allow non-object params to remark/rehype plugins (#6977)
Remark and Rehype plugins allow having options as a non-object type,
such as a string.

For instance, the official MDX docs even have an example of this:
See https://mdxjs.com/docs/extending-mdx/#using-plugins

The official plugin `remarkjs/remark-frontmatter` allows passing
a string, e.g. `"toml"` as the options arg, instead of an object.
2022-03-24 09:19:06 +08:00
Felipe Santos 4b3f568b78
fix(content-docs): suppress git error on multiple occurrences (#6973) 2022-03-23 16:35:26 +01:00
Joshua Chen b456a64f61
feat(theme-common): JSDoc for all APIs (#6974)
* feat(theme-common): JSDoc for all APIs

* fix tests
2022-03-23 21:39:19 +08:00
Sébastien Lorber 4103fef11e
chore: publish stylelint-copyright again (#6967) 2022-03-23 11:57:02 +01:00
Joshua Chen 6e2eb44964
refactor: unify how validateOptions is handled (#6961)
* refactor: unify how validateOptions is handled

* fix types

* fix again
2022-03-22 19:40:56 +08:00
Joshua Chen 44107fb879
chore(types): remove querystring from dependencies (#6957)
* chore(types): remove querystring from dependencies

* fix lock
2022-03-22 16:00:05 +08:00
Joshua Chen 948271a0ff
test: improve test coverage; reorder theme-common files (#6956)
* test: improve test coverage; reorder theme-common files

* no need for this
2022-03-22 15:33:55 +08:00
Joshua Chen 0a5354dc32
refactor(core): move browserContext and docusaurusContext out of client exports (#6955) 2022-03-22 14:30:14 +08:00
Yorkie Liu 6b3d94a155
feat(core): allow configureWebpack to return undefined (#6784)
* plugin: not acquire configureWebpack to return

* type fix

* add test

* remove type

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-22 11:53:11 +08:00
Alessandro Festa 1777fc4d76
docs: add K3ai to showcase (#6952)
* Add files via upload

* Update users.tsx

* Delete logo.jpg

* Add files via upload

* Update users.tsx

* Delete k3ai.jpg

* Add files via upload

* Update users.tsx

* k3ai website PR

* lots of changes (!)

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-21 23:47:37 +08:00
Joshua Chen c696dc2cd6
test: fix Windows test for gitUtils (#6951)
* test: fix Windows test for gitUtils

* change this

* fix
2022-03-21 20:13:40 +08:00
Joshua Chen 5ee7e8c48e
test: add tests for gitUtils (#6949)
* test: add tests for gitUtils

* debug test

* try fix
2022-03-21 18:40:20 +08:00
Kyohei Fukuda 3c7b39b739
docs: add pdfme docs to showcase (#6948)
* Add pdfme docs to showcase

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-21 17:25:14 +08:00
Joshua Chen 4536c20455
fix(content-blog): only create archive route if there are blog posts (#6947) 2022-03-21 12:27:56 +08:00
Felipe Santos e19a4e23e7
fix(content-docs): warn when files are not tracked (#6937)
* fix(docs): warn when files are not tracked

* chore(devcontainer): use non-root user

* test: fix jest in vscode

* test(docs): improve existing test

* chore(devcontainer): fix jest error on startup

* chore: fix comments

* chore: remove "probably" from error message
2022-03-21 08:42:36 +08:00
Joshua Chen e8a2f66a0f
chore: upgrade dependencies (#6946)
* chore: upgrade dependencies

* reformat
2022-03-21 07:45:29 +08:00
Billy Chan 92fcc0ddc5
docs: add SeaORM docs to showcase (#6943)
* Add SeaORM docs to showcase

* minor tweak

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-19 21:21:11 +08:00
Joshua Chen 19942f990a
chore: migrate Jest and website to SWC (#6944)
* chore: migrate Jest and website to SWC

* ignore template
2022-03-19 20:56:30 +08:00
Joshua Chen 53f152c42d
refactor(core): improve error message when a page has no default-export (#6941) 2022-03-19 09:30:31 +08:00
Sébastien Lorber 74f653dd82
refactor(theme-{classic,common}): change how site/page/search metadata is handled (#6925) 2022-03-18 18:53:00 +01:00
Alexey Pyltsyn 74e37e86ba
fix: remove semicolon from HTML output (#6936) 2022-03-18 19:16:32 +03:00
Sébastien Lorber a1d333e96b
refactor(theme-{classic,common}): split navbar into smaller components + cleanup + swizzle config (#6895) 2022-03-18 16:21:53 +01:00
Alexey Pyltsyn ecbe0b26c5
refactor(theme-{classic,common}): refactor ColorModeToggle + useColorMode() hook (#6930)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-03-18 15:28:35 +01:00
Sébastien Lorber 8a1421a938
feat(core,theme): useRouteContext + HtmlClassNameProvider (#6933)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-18 10:57:32 +01:00
Alexey Pyltsyn 9b4ba78f45
refactor(theme-classic): little breadcrumbs improvements (#6932) 2022-03-17 19:48:04 +01:00
Joshua Chen cc0bceab9c
chore: tighten ESLint config (#6931)
* chore: tighten ESLint config

* more refactor

* refactor push

* fix
2022-03-17 17:59:41 +08:00
Joshua Chen f70ddf7e69
refactor(core): minor routes type improvement (#6929) 2022-03-17 13:38:28 +08:00
Joshua Chen bfe7ca6237
chore(pwa, sitemap, client-redirects, ideal-image): JSDoc for types (#6928)
* chore(pwa, sitemap, client-redirects, ideal-image): JSDoc for types

* fix
2022-03-17 12:05:23 +08:00
Kayce Basques 284649c7c8
docs: clarify the usage of slug (#6926)
* Clarify the usage of slug

As a new user it was unclear whether setting `slug` would change the URL relative to the root directory or relative to the docs directory. The example I added should make that clear without needing to test out the functionality in a Docusaurus instance (which is what I had to do).

* editorial changes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-17 07:54:18 +08:00
Joshua Chen da9f38b748
refactor(client-redirects): migrate validation to validateOptions lifecycle (#6924) 2022-03-16 17:24:01 +01:00
Joshua Chen 68aaf9201f
feat(core): allow plugin lifecycles to return relative paths (#6921)
* feat(core): resolve plugin lifecycles returning relative paths

* fix typo

* fix tests

* revert

* rename path -> entryPath
2022-03-16 20:47:15 +08:00
Joshua Chen 8d1c1954c1
refactor(content-blog): clean up type definitions; in-code documentation (#6922)
* refactor(content-blog): clean up type definitions; in-code documentation

* add doc
2022-03-16 19:36:57 +08:00
WonChul Heo 46b1027c4a
fix(content-blog): remove double leading slash in blog-only paginated view (#6918)
* fix(content-blog): Fix permalink function of paginateBlogPosts

* add test

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-15 16:45:05 +08:00
Pawel Kowaluk f4f4c1dfd8
feat(theme-classic): set aria-expanded on expandable sidebar categories (#6914) 2022-03-15 16:31:55 +08:00
Joshua Chen ff1b7168ba
chore: upgrade dependencies (#6916) 2022-03-15 13:16:21 +08:00
Joshua Chen ad88f5cc87
test: improve test coverage; multiple internal refactors (#6912) 2022-03-14 21:53:57 +08:00
Joshua Chen 12a7305238
feat: add SEO microdata for doc breadcrumbs (#6697)
* feat: add SEO microdata for doc breadcrumbs

* refactor

* refactor
2022-03-14 08:45:47 +08:00
Bugo 4e4cc0cc17
feat(theme-translations): complete Russian translations (#6781) 2022-03-14 08:44:50 +08:00
Joshua Chen dc975fecbf
refactor: convert Jest infrastructure to TS (#6910) 2022-03-14 08:43:51 +08:00
Ariful Alam 1305977098
docs: add Reactive Button site to showcase (#6911)
* Add reactive-button.png to showcase

* Add `Reactive Button` to users.tsx

* optimizt image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-14 08:43:39 +08:00
Joshua Chen 009d87cbd9
refactor(content-blog): improve error message of authors map validation (#6909) 2022-03-14 08:16:12 +08:00
Joshua Chen 8c1e518ba2
chore: do not print prototype in jest snapshot (#6908) 2022-03-13 19:34:50 +08:00
Joshua Chen 3a4b9b4c30
refactor: install eslint-plugin-regexp (#6906)
* refactor: install eslint-plugin-regexp

* simplify

* simplify

* fix
2022-03-13 18:32:17 +08:00
Nayan Patel 127183e70e
docs: update image for digital support services (#6904)
* Delete digitalsupportservices.png

* add new image

* Delete digitalsupportservices.png

* Compressed version

* Delete digitalsupportservices.png

* add image correct res

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-13 11:50:56 +08:00
Joshua Chen d85cee576d
test: improve test coverage; properly test core client APIs (#6905)
* test: improve test coverage

* fix
2022-03-12 23:15:45 +08:00
Joshua Chen 76cb012209
chore: spell-check test files (#6903) 2022-03-12 15:24:56 +08:00
Joshua Chen f6baaa6b75
test(theme-common): improve test coverage (#6902)
* test(theme-common): improve test coverage

* revert
2022-03-12 13:17:21 +08:00
Joshua Chen aa5a2d4c04
test: enable a few jest eslint rules (#6900)
* test: enable a few jest eslint rules

* more
2022-03-12 08:43:09 +08:00
Sébastien Lorber 1efc6c6091
refactor(theme-classic): split theme footer into smaller components + swizzle config (#6894)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-11 14:55:53 +01:00
Joshua Chen c9ee6e467c
refactor: import jest as global; unify import style of some modules (#6898)
* refactor: import jest as global

* fix react
2022-03-11 19:04:27 +08:00
Sébastien Lorber e97dc0d37e
refactor(theme-classic): split sidebar into smaller parts (#6844)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-10 16:55:30 +01:00
Odarpi e412d367a0
docs: add EduLinks site to showcase (#6892)
* Add EduLinks to users.tsx and edulinks.png to showcase

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-10 21:16:19 +08:00
Joshua Chen e08777c9c5
refactor(theme-classic): avoid using clsx class dict with CSS modules (#6891) 2022-03-10 20:49:52 +08:00
Joshua Chen 2648ec090e
docs: editorial fixes (#6889) 2022-03-10 13:43:22 +08:00
Begula 63caeb6073
docs(cli): add info about development on github codespaces (#6883)
* docs: add info about development on github codespaces

* docs: move from installation to cli

* docs: fix grammar

* Update cli.md

* add word

* Update cli.md

* Update cli.md

* format

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-10 11:22:21 +08:00
Joshua Chen ff0d981853
fix(content-docs): give context about sidebar loading failure (#6887) 2022-03-10 11:21:10 +08:00
Joshua Chen e842b40a54
fix(theme-algolia): declare content-docs as dependency (#6888) 2022-03-10 11:20:59 +08:00
Sébastien Lorber e203001758
feat(theme-classic): MDXContent wrapper component (#6842) 2022-03-09 19:38:31 +01:00
Joshua Chen 86861ea0f3
refactor(theme-classic): consistently add span wrapper for layout links (#6846) 2022-03-09 16:41:12 +01:00
Joshua Chen 2a7120cc02
docs: mention configureWebpack devServer return value (#6881) 2022-03-09 20:23:38 +08:00
Joshua Chen 23a34c1a07
refactor: prefer fs.outputFile to ensureDir + writeFile (#6880)
* refactor: prefer fs.outputFile to ensureDir + writeFile

* fix test

* fix
2022-03-09 17:50:33 +08:00
Roberto Vidal 73df485aec
fix(core): ensure stable webpack theme aliases sorting (#6878) 2022-03-09 09:40:47 +08:00
Joshua Chen 99b1fb90d5
chore: upgrade dependencies (#6879) 2022-03-09 07:34:35 +08:00
Ngô Quốc Đạt d34c8ae694
chore(theme-translations): complete Vietnamese translations (#6877) 2022-03-09 07:18:05 +08:00
Joshua Chen 61290c4374
test(core): improve test coverage (#6876) 2022-03-08 22:10:07 +08:00
Ariful Alam 567b03d63d
docs: add Reddit Image Fetcher site to showcase (#6856)
* Add reddit-image-fetcher.png to showcase

* Add Reddit Image Fetcher to users.tsx

* Update reddit-image-fetcher.png with correct dimension

* optimize image

* Set Reddit Image Fetcher's source as `null` and remove open source tag

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-08 13:42:28 +08:00
moonrailgun 2059e53e5d
docs: update TRPG Engine showcase (#6875) 2022-03-08 12:34:04 +08:00
dependabot[bot] 5869f230b3
chore(deps): bump actions/checkout from 2 to 3 (#6870)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-08 08:57:15 +08:00
Joshua Chen 5ea76f2376
docs: mark clutch and gulp as opensource (#6871) 2022-03-08 07:34:35 +08:00
Joshua Chen a4e37c4054
refactor: improve types (#6866) 2022-03-07 22:14:50 +08:00
Joshua Chen 8e934450d8
refactor: remove unnecessary default values normalized during validation (#6864)
* refactor: remove unnecessary default values normalized during validation

* more
2022-03-07 19:23:30 +08:00
Joshua Chen 7fc134ba0e
docs: update showcase data (#6862) 2022-03-07 13:11:30 +08:00
Joshua Chen 44d73f7230
refactor: make JS executables included in the tsconfig for editor hints (#6861)
* refactor: make JS executables included in the tsconfig for editor hints

* oops
2022-03-06 23:07:23 +08:00
tae a6e72192fa
fix(create): load entry file after node version checking (#6860)
* refactor(create): add exception handling if external command is fails

refers #4870

85e87b560e

* fix(create): load entry file after node version checking
2022-03-06 22:18:38 +08:00
Joshua Chen 5e2168ea22
refactor(lqip-loader): split test files (#6858) 2022-03-06 18:34:04 +08:00
Joshua Chen f763ac13a9
test: improve test coverage (#6857) 2022-03-06 17:55:21 +08:00
Evan edb4d00096
docs: update Evan Tay personal site showcase (#6855)
* docs: update evantay showcase image

* docs: update evnatay showcase title

* fix test

* retake photo

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-06 13:59:42 +08:00
Joshua Chen 4db0c620de
refactor: enable a few TS flags (#6852)
* refactor: enable a few TS flags

* refactor

* revert to working version

* fix

* better

* change
2022-03-06 13:09:10 +08:00
Evan 9f925a42bf
fix(core): fix swizzle legend typo (#6854)
* fix(core): fix swizzle legend typo

* Update packages/docusaurus/src/commands/swizzle/tables.ts

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-06 11:05:17 +08:00
tae 2e163a9ec4
feat(content-docs): allow custom props through _category_.json (#6780)
* feat(content-docs): allow custom props through _category_.json

* refactor

* documentation

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-05 18:52:36 +08:00
Joshua Chen b2d6e453e3
fix(core): make plugin lifecycles consistently bound to the plugin instance (#6850) 2022-03-05 17:57:10 +08:00
Joshua Chen a756ddb7e1
fix(cli): write-heading-id should not generate colliding slugs when not overwriting (#6849) 2022-03-05 17:25:47 +08:00
Tsz W. TAM 027e8f506b
fix: minor Chinese translation fixes (#6847)
Before: {count} 篇文件帶有標籤 篇帶有標籤「{tagName}」
After: {count} 篇文件帶有標籤「{tagName}」
2022-03-05 15:51:59 +08:00
Joshua Chen 4e6166f326
misc(test): make E2E test use stable Yarn berry (#6848) 2022-03-05 15:00:06 +08:00
Sébastien Lorber 3e38380b69
fix(website): changelog plugin leads to CI bugs on release (#6838) 2022-03-04 10:58:54 +01:00
seladb 52fa4514f7
docs: add PcapPlusPlus to showcase (#6837)
* Add PcapPlusPlus to users.tsx

* Add PcapPlusPlus preview

* optimize image

* retake picture

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-04 17:24:56 +08:00
Sam Gutentag aa5c9f5064
docs: make tutorial code block directly copyable (#6833)
* code block included diff +,- 

Sample code block could not be copy/pasted as the tutorial mentions with the lines that appear to be from a diff tool.

* add highlight

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-04 09:04:02 +08:00
Afonso Jorge Ramos 31fcc293e2
docs: add Spicetify site to showcase (#6832)
* fix: website sorting

* add `spicetify.png`

* add spicetify entry to showcase

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-04 09:03:49 +08:00
nate contino 5f1edd5ac8
docs: simplify imported code blocks syntax (#6830)
* refactor: simplify imported code blocks

- Use `language=<lang>` prop instead of "className="language-<lang>" for imported code blocks

I've been using this in my personal projects ([example](https://raw.githubusercontent.com/nathan-contino-mongo/docusaurus-realm/9a2ebb6a43bbbd7b38899fcc86c903dcc1f61283/docs/sdk/kotlin/migrate-from-java-sdk.mdx)) since it is less verbose.
If this interface is somehow less stable than the `className` prop, feel free to close this. But if both will work going forward
we should probably recommend the simpler of the two.

* Update markdown-features-react.mdx
2022-03-04 07:09:16 +08:00
Sébastien Lorber 65842ba3f4
chore: update examples to beta.17 (#6831) 2022-03-03 19:22:13 +01:00
Sébastien Lorber 8dbd656340
chore: prepare v2.0.0-beta.17 release (#6829) 2022-03-03 18:44:41 +01:00
Sébastien Lorber 7eaec081e8
fix(theme-classic): restore docusaurus search meta (#6827) 2022-03-03 15:56:44 +01:00
Joshua Chen c387a177e8
refactor(theme-common): unify missing context errors (#6826)
* refactor(theme-common): unify missing context errors

* update test

* more robust
2022-03-03 22:26:56 +08:00
Nayan Patel 5c60f41e1b
docs: Adds Netlify one click deploy to README (#6825) 2022-03-03 14:16:17 +01:00
Sébastien Lorber 2144db0f58
fix(theme-common): breadcrumbs home bug in docs-only (#6824) 2022-03-03 20:20:02 +08:00
Nayan Patel df6b184270
docs: add deploy with vercel button to README (#6818) 2022-03-03 12:46:22 +01:00
Joshua Chen c90d25ca2f
fix(content-docs): always sort autogenerated sidebar items by file/folder name by default (#6700) 2022-03-03 12:39:54 +01:00
Joshua Chen f04cb7abb9
test(content-docs): refactor navigation test snapshot (#6821)
* test(content-docs): refactor navigation test snapshot

* format
2022-03-03 14:00:42 +08:00
Nayan Patel 1c91d2f20e
docs: fix broken links (#6817)
* Fix a broken showcase GitHub URL

* Seems like this site is no longer Open Source?

* Seems like this site is no longer open source?

* Fix as previous link leaded to a 404

* Replaces the 404 error of previous page.

Not sure if this is the correct link to be placed there.

* Fixes 404 error ;)
2022-03-03 07:02:57 +08:00
Sébastien Lorber fb201313b9
fix(theme-common): docs breadcrumbs not working with baseUrl (#6816) 2022-03-02 18:09:05 +01:00
Joshua Chen 6cbc58943e
feat: allow blog authors email (#6783) 2022-03-02 16:28:17 +01:00
Joshua Chen 7ec44bb32c
refactor(theme-classic): replace color mode toggle with button; remove switchConfig (#6771)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-03-02 15:57:17 +01:00
Joshua Chen b1492135c2
refactor(theme-classic): use Material icon for language dropdown (#6769) 2022-03-02 13:04:40 +01:00
Joshua Chen c1fb3deace
fix(theme-classic): allow code tags containing inline elements to stay inline (#6767) 2022-03-02 13:01:58 +01:00
David Stotijn 2e3eec2d08
fix: consistently use `max-width: 996px` in media queries (#6815)
* fix: consistently use `max-width: 996px` in media queries

Follow `docusaurus-theme-classic` and use `996px` as the cutoff
between desktop and mobile screen width.

* revert example changes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-02 19:43:44 +08:00
Joshua Chen 8a24d56783
fix(mdx-loader): allow image paths to be URL encoded (#6792) 2022-03-02 12:14:53 +01:00
Dmitry Vinnik 1ac41132e3
docs: add homepage banner in support of Ukraine (#6811)
* Adding social banner in support of Ukraine

* Adding flag to the banner

* Updating donation URL

* Updating URL for the fundraiser
2022-03-01 22:50:24 -08:00
Vaibhav Shinde cfdd120dc4
docs: mark dyte as opensource in showcase (#6813) 2022-03-02 14:11:23 +08:00
Joshua Chen 954e4d42fc
fix(core): remove hash/query when filtering existing files for broken link check (#6812)
* fix(core): remove hash/query when filtering existing files for broken link check

* fix tests
2022-03-02 12:46:38 +08:00
dependabot[bot] ea8590f80b
chore(deps): bump cssnano from 5.0.17 to 5.1.0 (#6793)
Bumps [cssnano](https://github.com/cssnano/cssnano) from 5.0.17 to 5.1.0.
- [Release notes](https://github.com/cssnano/cssnano/releases)
- [Commits](https://github.com/cssnano/cssnano/compare/cssnano@5.0.17...cssnano@5.1.0)

---
updated-dependencies:
- dependency-name: cssnano
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 10:10:25 +08:00
dependabot[bot] 863097561d
chore(deps-dev): bump netlify-cli from 9.8.4 to 9.10.0 (#6795)
Bumps [netlify-cli](https://github.com/netlify/cli) from 9.8.4 to 9.10.0.
- [Release notes](https://github.com/netlify/cli/releases)
- [Changelog](https://github.com/netlify/cli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/netlify/cli/compare/v9.8.4...v9.10.0)

---
updated-dependencies:
- dependency-name: netlify-cli
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 09:04:57 +08:00
dependabot[bot] e5ede151a2
chore(deps): bump cssnano-preset-advanced from 5.1.12 to 5.2.0 (#6806)
Bumps [cssnano-preset-advanced](https://github.com/cssnano/cssnano) from 5.1.12 to 5.2.0.
- [Release notes](https://github.com/cssnano/cssnano/releases)
- [Commits](https://github.com/cssnano/cssnano/compare/cssnano-preset-advanced@5.1.12...cssnano-preset-advanced@5.2.0)

---
updated-dependencies:
- dependency-name: cssnano-preset-advanced
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 09:02:05 +08:00
Joshua Chen a4dc03edee
chore: upgrade dependencies (#6789)
* chore: upgrade dependencies

* upgrade setup-node
2022-03-01 10:40:34 +08:00
Joshua Chen 9d7ed31661
fix(mdx-loader): suppress image reading warning in Yarn PnP; log warning instead of error (#6779) 2022-02-28 10:49:53 +08:00
Joshua Chen 3e5da386ce
refactor: move test utils into test folder (#6777) 2022-02-27 19:05:44 +08:00
Ariful Alam 95ab08285b
docs: make GitHub actions explanation aligned with the code (#6776)
* fix(website): update github actions files

* revert some changes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-27 16:27:23 +08:00
Joshua Chen bafa4711b1
test: add TypeScript template to E2E test matrix (#6768)
* test: add TypeScript template to E2E test

* fix

* fix

* fix...

* exclude this

* refactor
2022-02-27 09:20:59 +08:00
Alex Nicholls 68a55f0d11
fix(create): update broken SVG paths in templates (#6762)
* fix: Update broken URL in typescript template example

* fix SVG images; improve a11y

* format

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-27 07:44:50 +08:00
Joshua Chen 670f2e5268
refactor(utils): categorize functions into separate files (#6773) 2022-02-26 21:17:21 +08:00
Joshua Chen 908ad52025
docs: add basic documentation about client modules (#6772) 2022-02-26 18:25:19 +08:00
Joshua Chen e101acd132
chore: various internal fixes (#6761) 2022-02-25 23:18:08 +08:00
Sébastien Lorber 124511f445
chore: prepare v2.0.0-beta.16 release (#6760) 2022-02-25 16:00:11 +01:00
Sébastien Lorber 17b8eded79
refactor(theme-classic): merge CSS files for Heading (#6759) 2022-02-25 15:08:45 +01:00
Sébastien Lorber 44a65f3337
fix(theme-common): isSamePath should be case-insensitive (#6758) 2022-02-25 14:58:54 +01:00
Joshua Chen 39b66d82ef
feat(core): rework swizzle CLI (#6243)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-02-25 14:13:15 +01:00
Joshua Chen d43066f6f1
test: sort migration test FS mock calls (#6756)
* test: sort migration test FS mock calls

* this works?
2022-02-25 20:43:18 +08:00
Joshua Chen f903422617
refactor: unify error handling behavior (#6755)
* refactor: unify error handling behavior

* revert

* normalize paths

* test...

* change

* does this work...

* fix...

* maybe fix

* maybe fix

* fix

* fix...
2022-02-25 15:07:13 +08:00
Joshua Chen dcbf9f644e
chore: upgrade docsearch-react to v3 stable, bump dependencies (#6752)
* chore: upgrade dependencies

* revert

* validation

* fix blog

* reformat
2022-02-24 19:39:32 +08:00
Joshua Chen a70514205d
feat(create): new --package-manager option; interactive package manager selection (#6750) 2022-02-24 11:50:37 +01:00
Sébastien Lorber 89560226f0
fix(theme-classic): temporarily disable toc heading autoscrolling (#6748) 2022-02-24 11:28:17 +01:00
Sébastien Lorber ece7399d2e
fix(theme-classic): fix breadcrumb home link bug with new useHomePageRoute() hook (#6749) 2022-02-24 11:27:16 +01:00
Joshua Chen 0d14470d54
refactor: unify export directive style (#6751) 2022-02-24 17:25:17 +08:00
Alexey Pyltsyn 0c807b3501
feat: sync color mode between browser tabs (#6723)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-02-23 16:55:57 +01:00
Alexey Pyltsyn 26d223dbeb
feat(create): better detection of package manager preference (#6679)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-02-23 16:22:40 +01:00
Joshua Chen c3370be64d
refactor: make MDX export a flat TOC list instead of tree (#6729) 2022-02-23 15:12:04 +01:00
Joshua Chen 2d93750caf
fix(content-docs): improve sidebar shorthand normalization error message (#6745) 2022-02-23 13:03:58 +01:00
Joshua Chen 9562a5d203
refactor: remove deprecated Webpack utils & validation escape hatch (#6740) 2022-02-23 11:40:58 +01:00
Joshua Chen 051380aa4b
fix(content-docs): properly display collocated social card image (#6744)
* fix(content-docs): properly display collocated social card image

* oops
2022-02-23 18:21:22 +08:00
Joshua Chen ddad9713e6
refactor: improve client modules types (#6742) 2022-02-23 15:45:23 +08:00
Joshua Chen cfcc8b31f4
chore(module-type-aliases): add react as peer dependency (#6741) 2022-02-23 15:00:14 +08:00
Matheus Ricardo Brunelli 8f658f1e23
docs: add Blog Matheus Brunelli site to showcase (#6727)
* add Blog Matheus Brunelli to users.tsx

* add blogmatheusbrunelli.png to showcase

* minor tweaks

* add tag

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-22 18:37:00 +08:00
dependabot[bot] 26b7d9afc3
chore(deps): bump treosh/lighthouse-ci-action from 8.2.0 to 9.3.0 (#6736)
Bumps [treosh/lighthouse-ci-action](https://github.com/treosh/lighthouse-ci-action) from 8.2.0 to 9.3.0.
- [Release notes](https://github.com/treosh/lighthouse-ci-action/releases)
- [Commits](https://github.com/treosh/lighthouse-ci-action/compare/8.2.0...9.3.0)

---
updated-dependencies:
- dependency-name: treosh/lighthouse-ci-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 07:11:15 +08:00
Joshua Chen 671873a681
refactor(core): reduce code verbosity (#6734)
* refactor(core): reduce code verbosity

* fix

* fix
2022-02-21 19:31:22 +08:00
Joshua Chen c38200ba5b
refactor: declare all props as interfaces (#6730)
* refactor: declare all props as interfaces

* fix

* fix...
2022-02-21 11:52:11 +08:00
Joshua Chen 5555290edc
misc: improve bug report template (#6726) 2022-02-20 22:53:55 +08:00
CodeDoctor 1bd1160ddc
docs: add Butterfly Documentation to showcase (#6721)
* Add Butterfly Documentation

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-20 10:30:25 +08:00
Joshua Chen c6d0d812eb
refactor: convert all fs methods to async (#6725)
* refactor: convert all fs methods to async

* fix snap
2022-02-20 10:21:33 +08:00
Balthasar Hofer c0b3c9af65
fix(content-docs): create assets for frontmatter images (#6720)
* create assets for docs front matter images aswell

fixes: #6718

* retrigger fb cla-check
2022-02-20 10:20:33 +08:00
Joshua Chen ea6ceaa371
refactor: ensure lodash is default-imported (#6716) 2022-02-19 18:15:02 +08:00
Joshua Chen 47c9a37c5f
chore: upgrade dependencies (#6715)
* chore: upgrade dependencies

* upgrade Node
2022-02-19 11:47:44 +08:00
Joshua Chen 692680d1d1
fix(mdx-loader): make headings containing links properly formatted in ToC (#6712) 2022-02-18 10:57:08 +08:00
Hong Yongmin bbc0562d67
chore(theme-translations): complete Korean translations (#6711)
Requested at #6686.

Signed-off-by: Yongmin Hong <revi@pobox.com>
2022-02-18 08:47:22 +08:00
이정환 d9bb77923e
fix(theme-translations): improve Korean translations (#6686)
* "Ko.json" Partial modification.

* format

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-18 07:24:04 +08:00
Naseel Niyas 397915fc71
docs(website): Add techharvesting to showcase (#6710) 2022-02-17 15:58:23 +01:00
Joshua Chen 405d5d1a3e
fix(cli): disable directory listing in serve (#6701) 2022-02-17 14:53:40 +01:00
Sébastien Lorber a6f53aa9d2
refactor(theme-classic): bias again search metadata toward Algolia DocSearch (#6707) 2022-02-17 14:24:31 +01:00
Sébastien Lorber 12aae9a086
docs: add doc for generated-index keyword/image metadata (#6708) 2022-02-17 14:24:13 +01:00
Alexey Pyltsyn 0f1f35b678
docs(website): fix video responsiveness (#6709) 2022-02-17 14:22:36 +01:00
Dmitry Vinnik 1551407a9b
docs: add deep dive video for Docusaurus (#6687) 2022-02-17 12:03:26 +01:00
Sébastien Lorber 49361e2ae9
docs(website): search doc typo searchParameters (#6704) 2022-02-17 11:57:30 +01:00
Alexey Pyltsyn 089ef14c9a
fix(theme-common): do not run useLocationChange when hot reloading (#6696) 2022-02-17 08:41:15 +08:00
Alexey Pyltsyn 53c2c118c4
feat(search-algolia): allow disabling search page and configuring path (#6692) 2022-02-16 19:07:01 +01:00
Jody Heavener 3629b5ab39
feat(docs,theme-classic): docs breadcrumbs (#6517)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-02-16 19:02:58 +01:00
Joshua Chen 67918e35e2
refactor: convert CLI entry points to ESM; migrate create-docusaurus to ESM (#6661)
* refactor: convert CLI entry points to ESM

* fix

* fix

* fix

* fix!

* create-docusaurus ESM

* fix lock

* final touchups

* fix lodash

* fix

* use lodash

* fix hasYarn
2022-02-16 23:00:35 +08:00
Joshua Chen eacc695542
fix(pwa): declare babel core as direct dependency (#6691) 2022-02-16 18:47:40 +08:00
Joshua Chen 80a9806775
fix(theme-classic): improve aria label of color mode toggle (#6674)
* fix(theme-classic): improve aria label of color mode toggle

* oops
2022-02-16 10:38:09 +08:00
Erick Zhao 0c6165b161
fix(utils): make SVGO not remove title (#6684)
* chore(utils): add `removeTitle: false` to svg loader

By default, SVGR removes the `<title>` tag from SVG inputs.
This hinders a11y since "the `<title>` element provides an
accessible, short-text description of any SVG container
element or graphics element".

Modern browsers also show tooltips on hover for inline
SVG with the `<title>` tag.

See https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title

* fix test
2022-02-15 17:14:54 +08:00
Joshua Chen 94532dfd26
docs: fix bad anchor link syntax (#6683) 2022-02-15 11:24:50 +08:00
Ruben Arushanyan 344e199ee8
docs: add redux-cool site to showcase (#6682)
* redux-cool site adding

* redux-cool site showcase adding

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-15 11:01:44 +08:00
Daniel Kalevski 5cd2c085f6
docs: add Rivalis to showcase (#6677)
* added Rivalis entry and screenshot to showcase dir

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-15 11:01:31 +08:00
CookieJarApps 7a7d5d047c
docs: add SmartCookieWeb site to showcase (#6676)
* Added SmartCookieWeb to showcase

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-15 11:01:19 +08:00
dependabot[bot] 224ec08931
chore(deps): bump actions/github-script from 5 to 6 (#6678)
Bumps [actions/github-script](https://github.com/actions/github-script) from 5 to 6.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-15 10:20:05 +08:00
Joshua Chen d460d48dfc
docs: mention that all official themes are TypeScript-covered (#6675)
* docs: mention that all official themes are TypeScript-covered

* revert...

* kick
2022-02-14 23:33:37 +08:00
Joshua Chen c27695ab5c
docs: mention about blog date in front matter (#6673)
* docs: mention about blog date in front matter

* fix
2022-02-14 15:42:37 +08:00
Joshua Chen 56b81d1a55
refactor(website): extract homepage data from UI; feature text updates (#6672)
* refactor(website): extract homepage data from UI; feature text updates

* minor edit
2022-02-14 14:13:23 +08:00
Mikey O'Toole d8caf3f896
docs: add CyberDrain Improved Partner Portal (CIPP) to showcase (#6670)
* Add CyberDrain Improved Partner Portal (CIPP)

* Add CIPP showcase preview

* Fix image naming for CIPP - move Discord Resources to alphabetical order.

* optimize image
2022-02-14 13:49:18 +08:00
Joshua Chen b89d93fab5
refactor: recommend using data-theme without html element selector (#6668)
* refactor: recommend using data-theme without html element selector

* simplify site CSS

* refactor
2022-02-14 10:23:42 +08:00
Alexey Pyltsyn 4b7bea950f
fix(website): make YT iframe responsive (#6667)
* fix(website): make YT iframe responsive

* Redesign
2022-02-13 21:13:45 +08:00
Dmitry Vinnik | Meta e42f57ebd6
Merge branch 'main' into main 2022-02-12 12:36:57 -08:00
Joshua Chen 0c7e592d34
chore: upgrade dependencies (#6660)
* chore: upgrade dependencies

* fix types
2022-02-12 15:29:40 +08:00
Dmitry Vinnik | Meta 472840dbd8
docs: add eli5 video to home page (#6659)
* Adding eli5 video the home page

* Update index.tsx

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-12 08:11:37 +08:00
Joshua Chen acf4ae8f96
refactor: reduce exported members of docusaurus router (#6651) 2022-02-11 12:16:13 +01:00
Dmitry Vinnik c02269769f Adding ELI5 video to the home page 2022-02-10 21:33:04 -08:00
Alexey Pyltsyn cfef4755da
refactor(theme-classic): clean up CSS of doc sidebar item (#6622)
* refactor(theme-classic): clean up doc sidebar item CSS

* Use link placeholder for Introduction category

* Use test pages for dogfooding

* Update sidebars.js

* Add another test case
2022-02-11 13:11:47 +08:00
Joshua Chen da9075105a
refactor(module-aliases): remove react-helmet dependency (#6658) 2022-02-11 13:08:08 +08:00
Konstantin Tarkus 916e4f1a26
fix(core): forward ref to Link's anchor element (#6644)
* feat(core): allow to pass ref into the Link component

* refactor

* add dogfood

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-11 12:34:13 +08:00
Clement Demonchy 1cd4757828
feat: allow numbers in plugin ID (#6656)
* fix example for id that didn't respect regex

example for id don't work with version 2.0.0-beta.15:
ValidationError: "id" with value "docs1" fails to match the required pattern: /^[a-zA-Z_-]+$/
Error: Process completed with exit code 1.

* properly fix

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-11 11:57:58 +08:00
Alexey Pyltsyn 10a5f71154
fix(theme-classic): minor BTT button fixes (#6652) 2022-02-10 15:35:34 +01:00
Joshua Chen bae9827d92
refactor(utils): replace hash with contenthash for file loader (#6650) 2022-02-10 17:43:55 +08:00
Joshua Chen fbbec7fef8
fix(cli): make docusaurus clear also remove .yarn/.cache folder (#6646)
* fix(cli): make clear also remove .yarn/.cache folder

* refactor
2022-02-10 12:54:32 +08:00
Joshua Chen b16b394eb6
feat(create): allow specifying a git clone strategy (#6610)
* feat(create): allow specifying a git clone strategy

* Update index.ts
2022-02-10 11:15:06 +08:00
Felipe Santos 6996ed2f2f
feat(content-blog): infer blog post date from git history (#6593) 2022-02-09 17:18:32 +01:00
TheCatLady 665d164351
feat(content-docs): add custom props front matter (#6619)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-09 17:04:07 +01:00
toto6038 59289ed4d5
refactor(theme-translation): Improve Traditional Chinese translation quality (#6635) 2022-02-08 16:29:59 +08:00
BigDataWriter bd05b74808
docs: improve wording of using Markdown file paths (#6633)
* Update docs-markdown-features.mdx

* Author meant to recommend the use of full paths rather than relative paths: Technical edit
* Revised intro to naturally introduce the benefits of this recommendation: Style edit

* Update website/docs/guides/docs/docs-markdown-features.mdx

* Update website/docs/guides/docs/docs-markdown-features.mdx

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-08 11:12:38 +08:00
Joshua Chen 5db848f0e7
refactor: move module declarations for non-route components to theme-classic (#6629) 2022-02-07 20:17:41 +08:00
Daniel Hanke 5e2196441e
docs: fix presets documentation link (#6627) 2022-02-07 16:30:39 +08:00
TheCatLady 032a1f0f95
docs: add Resoto & Some Engineering Inc. to showcase (#6624)
* docs: add Resoto & Some Engineering Inc. to showcase

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-07 11:54:44 +08:00
Joshua Chen 74a645e612
fix(utils): convert Markdown links in reference-style links (#6617) 2022-02-05 19:37:20 +08:00
Joshua Chen d2574b287f
fix: remove more peer dependency warnings (#6615)
* fix: remove more peer dependency warnings

* fixes

* fixes

* fix

* remove more
2022-02-05 17:46:01 +08:00
Joshua Chen 919f1600c2
refactor: remove Babel plugins that are included in preset-env (#6614) 2022-02-05 16:55:40 +08:00
Joshua Chen 93c5ad8742
fix(theme-classic): make Prism additional languages properly server-side rendered (#6612) 2022-02-05 16:03:29 +08:00
Joshua Chen a350a8a130
docs: fix bad anchor link syntax (#6611) 2022-02-05 14:52:19 +08:00
Joshua Chen 10c292cb05
refactor(migrate): change internal methods' parameter style (#6609) 2022-02-05 13:14:53 +08:00
Joshua Chen ed34a92957
fix(cli): log error itself on unhandled rejection (#6607) 2022-02-04 23:33:34 +08:00
John Reilly a9eb005333
feat: make Markdown images lazy loaded (#6598)
* feat: lazy loading images

* feat: use real images
2022-02-04 22:04:53 +08:00
Joshua Chen 45f6f8b869
chore: fix ESLint warnings, restrict export all syntax (#6605)
* chore: fix ESLint warnings, forbid export all syntax

* fix...

* reorder
2022-02-04 21:57:10 +08:00
Joshua Chen 3fd99ad8d4
feat(content-blog): allow customizing blog archive component through option (#6603)
* feat(content-blog): allow customizing blog archive component through option

* fix
2022-02-04 18:56:09 +08:00
Joshua Chen 0c4dc00443
feat(content-docs): allow omitting enclosing array consistently for category shorthand (#6602)
* feat(content-docs): allow omitting enclosing array consistently for category shorthand

* update snapshot

* fix doc
2022-02-04 11:16:08 +08:00
Joshua Chen e3fd3e74ce
refactor(content-docs): clean up sidebars logic; validate generator returns (#6596)
* refactor(content-docs): clean up sidebars logic; validate generator returns

* remove another TODO

* fix types

* refactors

* refactor...
2022-02-04 09:46:25 +08:00
Mikey O'Toole d6bdf7e804
fix(theme-classic): add docSidebar as allowed item in dropdown (#6599)
* Add ThemeClassName to Docs Sidebar container.

* Fix issue #6597 - Missing docSidebar in theme config validation.

* revert comment change

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-04 09:38:09 +08:00
Muhammad Redho Ayassa 48f080ebca
feat(content-blog): Allow pagination for BlogTagsPostsPage (#6221)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-02-03 18:33:13 +01:00
Joshua Chen 01c6f15b15
fix(theme-classic): make focused link outlined with JS disabled (#6505) 2022-02-03 18:28:10 +01:00
Everardo J. Barojas M caa9d281c3
docs: improve Github Actions example jobs (#6591)
* docs: Improve docs on deploy.yml gh action

* docs: Improve docs on test-deploy.yml gh action

* docs: improve docs on delpoy.yml and test-deploy.yml gh action on next version docs

* docs: rm unneeded lines

* edits

Co-authored-by: Everardo J Barojas M <everardo@prescrypto.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-03 20:42:19 +08:00
Joshua Chen 1ca07f8466
refactor(content-docs): read category metadata files before autogenerating (#6586)
* refactor(content-docs): read category metadata files before autogenerating

* fix tests

* fix Windows...

* warn user when behavior is undetermined

* oops

* fix typo
2022-02-03 16:16:19 +08:00
Felipe Santos b03431f139
fix: read last update from inner git repositories (#6592) 2022-02-03 16:02:28 +08:00
Yangshun Tay 85351549fe
feat(website): add Tweets section (#6426)
* feat(website): add tweets

* feat(website): add tweets to homepage

* Update tweet meta color for better contrast

* change tweets

* ignore tweets in cspell
2022-02-03 05:40:00 +08:00
Jody Heavener 6ec0db4722
feat(content-docs): sidebar item type "html" for rendering pure markup (#6519)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-02-02 18:38:35 +01:00
Miles Johnson 65ba551f5b
fix(content-docs): export versioning utils (#6477) 2022-02-02 17:21:54 +01:00
Joshua Chen 3573b5e4a9
fix(content-docs): render category with no subitems as a normal link (#6495) 2022-02-02 14:45:00 +01:00
Joshua Chen 049b2c84c6
misc: fix git attributes syntax (#6585) 2022-02-02 20:16:42 +08:00
Joshua Chen 759952cefd
misc: enable jsx-key eslint rule (#6584) 2022-02-02 19:22:26 +08:00
Joshua Chen 250d9c8cf5
refactor(live-codeblock): migrate theme to TS (#6583)
* refactor(live-codeblock): migrate theme to TS

* Don't make it visible
2022-02-02 17:48:06 +08:00
Joshua Chen 58de17b51e
misc: fix gitattributes for linguist configuration (#6582) 2022-02-02 17:08:10 +08:00
seyoon20087 a615ab3999
feat(core): use react-helmet-async (#6306)
* Use React Strict Mode

Even though Strict Mode is not required a WARNING icon now displays
on all components that do not use React.StrictMode on React DevTools extension.

Signed-off-by: Shinwon Elizabeth Yoon <24852454+seyoon20087@users.noreply.github.com>

* Utilize react-helmet-async instead of react-helmet

react-helmet is NOT thread safe, as explained in https://open.nytimes.com/the-future-of-meta-tag-management-for-modern-react-development-ec26a7dc9183#fdc2

Therefore, it's better if react-helmet-async is utilized instead of react-helmet.

Even though react-helmet-async is being utilized, most users will not require any code changes to @docusaurus/Head since it uses the same API as react-helmet.

Signed-off-by: Shinwon Elizabeth Yoon <24852454+seyoon20087@users.noreply.github.com>

* Include HelmetProvider inside client entry

I forgot to do this before.

Signed-off-by: Shinwon Elizabeth Yoon <24852454+seyoon20087@users.noreply.github.com>

* format

* fix TS

* address reviews

* Remove forked react-loadable package in favor of @react-loadable/revised

Both unforked react-loadable and @docusaurus/react-loadable uses legacy React APIs.

However, @react-loadable/revised (https://github.com/react-loadable/revised) is actively maintained and widely used in production, thus replaced with this package.

Signed-off-by: Shinwon Elizabeth Yoon <24852454+seyoon20087@users.noreply.github.com>

* remove unused comma

* Address reviews from https://github.com/facebook/docusaurus/pull/6306#pullrequestreview-864745191

Signed-off-by: Shinwon Elizabeth Yoon <24852454+seyoon20087@users.noreply.github.com>

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-02 14:52:44 +08:00
Artem Kovalov 94135ac71a
docs: add SAP Cloud SDK to showcase (#6532)
* Add SAP Cloud SDK docs portal

* SAP Cloud SDK screenshot

* edits

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-02-02 14:25:58 +08:00
Joshua Chen 661bc32402
chore(deps): bump all dependencies; regenerate lockfile (#6580) 2022-02-02 13:00:31 +08:00
dependabot[bot] d8eac86775
chore(deps-dev): bump lint-staged from 12.1.7 to 12.3.3 (#6535)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.1.7 to 12.3.3.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.1.7...v12.3.3)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-02 11:53:10 +08:00
dependabot[bot] 83a4724e15
chore(deps): bump sitemap from 7.1.0 to 7.1.1 (#6534)
Bumps [sitemap](https://github.com/ekalinin/sitemap.js) from 7.1.0 to 7.1.1.
- [Release notes](https://github.com/ekalinin/sitemap.js/releases)
- [Changelog](https://github.com/ekalinin/sitemap.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ekalinin/sitemap.js/compare/7.1.0...7.1.1)

---
updated-dependencies:
- dependency-name: sitemap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-02 11:52:10 +08:00
dependabot[bot] 1c8005d99f
chore(deps): bump terser-webpack-plugin from 5.3.0 to 5.3.1 (#6577)
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.3.0...v5.3.1)

---
updated-dependencies:
- dependency-name: terser-webpack-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-02 11:48:56 +08:00
Alexey Pyltsyn 72bad11e97
fix(theme-classic): highlight active collapsible doc category properly (#6531) 2022-02-01 21:18:21 +08:00
Joshua Chen 1cefb643dd
refactor: enforce named capture groups; clean up regexes (#6524)
* refactor: enforce named capture groups; clean up regexes

* fixes

* fix
2022-02-01 17:43:15 +08:00
Joshua Chen c56e6194b4
refactor: mark all functions that import external modules as async (#6521) 2022-01-31 13:04:45 +08:00
Joshua Chen aa446b7a9c
chore: clean up ESLint config, enable a few rules (#6514)
* chore: clean up ESLint config, enable a few rules

* enable max-len for comments

* fix build
2022-01-31 10:31:24 +08:00
Kishan Gajera b8ccb869f1
fix(theme-classic): add key prop for SimpleLinks map (#6515) 2022-01-31 10:07:16 +08:00
Joshua Chen 196c8ea434
docs: clean up CONTRIBUTING (#6513)
* docs: clean up CONTRIBUTING

* Update PR template
2022-01-30 20:29:47 +08:00
Joshua Chen 8f69f633e6
refactor(core): convert theme-fallback to TS (#6511)
* refactor(core): convert theme-fallback to TS

* add missing type

* fix snapshot
2022-01-30 18:41:13 +08:00
Joshua Chen e77dda07c0
misc: configure linguist behavior to show better language stats (#6512) 2022-01-30 18:26:35 +08:00
Kishan Gajera dda92eb2b6
fix(theme-classic): apply width/height for footer logos without href (#6508) 2022-01-29 23:16:40 +08:00
Joshua Chen 2553f1fb5a
refactor: improve internal typing (#6507)
* refactor: improve internal typing

* fix

* fix test
2022-01-29 22:58:40 +08:00
Joshua Chen 58e07a6796
test: add test for readOutputHTMLFile (#6506) 2022-01-29 18:10:46 +08:00
Gaurish 8bdecf107c
docs: add Cloudflare pages deployment guide (#6501)
* Docs: Add Cloudflare pages deployment guide

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-29 13:27:34 +08:00
Joshua Chen 4f2b09fe32
refactor: fix all eslint warnings (#6502) 2022-01-29 13:21:40 +08:00
Joshua Chen c1e3801ee7
fix(cli): allow passing a list of file names to write-heading-ids (#6500) 2022-01-29 12:21:15 +08:00
dependabot[bot] 9af7aae9e2
chore(deps): bump simple-get from 4.0.0 to 4.0.1 (#6497)
Bumps [simple-get](https://github.com/feross/simple-get) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/feross/simple-get/releases)
- [Commits](https://github.com/feross/simple-get/compare/v4.0.0...v4.0.1)

---
updated-dependencies:
- dependency-name: simple-get
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-29 11:35:10 +08:00
Joshua Chen f2b1c8e80e
docs: mention how env vars can be read (#6499) 2022-01-29 11:34:30 +08:00
Matthew Ailes d45f96fc83
fix: updating peerDependency fields for yarn berry (#6498) 2022-01-29 10:29:03 +08:00
Sébastien Lorber f5f598a921
fix(core): configValidation should allow inline theme functions (#6496) 2022-01-28 17:49:25 +01:00
Joshua Chen c99026c524
fix(theme-classic): do not switch color modes when printing (#6490)
* fix(theme-classic): coerce to light theme when printing

* revert this...

* fix
2022-01-28 20:19:23 +08:00
Tamal Web ade486d079
docs: mention where to find the sitemap (#6492)
* Added the sitemap url

So that users know where to locate their sitemaps

* Update plugin-sitemap.md

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-28 17:11:09 +08:00
nick-verida 45c3a5fe05
docs: add developers.verida to showcase (#6491)
* Update users.tsx

* Add verida-developers.png

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-28 16:38:11 +08:00
Nick Schonning bcb15336bf
chore: fix Stylelint globs for editor support (#6476)
* chore: expand Stylelint globs

* uninstall plugins

* revert stylelint bump

* fix lock

* better ignore

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-28 12:02:16 +08:00
Joshua Chen 556f59b193
fix(utils): do not resolve Markdown paths with @site prefix (#6489) 2022-01-28 10:10:39 +08:00
Sébastien Lorber 8a912c708e
chore: fix codesandbox example link + mention npm publish recovery (#6487) 2022-01-27 23:18:04 +08:00
Joshua Chen f6ff6474bc
feat(website): new plugin to load CHANGELOG and render as blog (#6414)
* feat(website): new plugin to load CHANGELOG and render as blog

* use CJS

* move footer links

* better design

* fixes

* correctly order posts

* add authors

* Add axios

* Update styles

* oops

* oops

* add expand button

* back to index page link

* fix styles

* add feed options

* fix

* fix

* Add fallback

* fix

* fixes
2022-01-27 23:17:31 +08:00
Joshua Chen 5c447b1ca3
docs: elaborate on Markdown asset linking; document pathname:// (#6404) 2022-01-27 23:16:55 +08:00
Joshua Chen 3c58d7f027
feat(content-docs): allow explicitly disabling index page for generated category (#6452)
* feat(content-docs): allow explicitly disabling index page for generated category

* docs

* add test
2022-01-27 23:14:07 +08:00
Sébastien Lorber ffa108b58b
chore: update examples for beta.15 (#6486) 2022-01-27 15:06:10 +01:00
Sébastien Lorber d791384986
fix(website): bad translate tags without default translation (#6485)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-27 14:39:02 +01:00
Joshua Chen 0e13356e1b
feat: mark some text labels as translatable (#6482)
* feat: mark some text labels as translatable

* tweak
2022-01-27 19:36:37 +08:00
Joshua Chen b8fbf7c530
docs: remove mention that CDN resources are caches cross-domain (#6484) 2022-01-27 19:21:07 +08:00
Joshua Chen 4c22316438
refactor(init): promote good practices; use site alias (#6481) 2022-01-27 12:08:52 +01:00
Pranab Das f415da1c95
refactor: self-host KaTeX assets (#6429)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-27 11:39:45 +01:00
Joshua Chen f377097f0b
docs: mark a lot of website texts as translatable (#6483) 2022-01-27 18:04:23 +08:00
Nick Schonning 37be796aa8
test: rename 'fixtures' to '__fixtures__' (#6474)
* test: rename 'fixutes' to '__fixtures__'

* test: rename '__test' to '__tests__'

* test: update snapshot
2022-01-27 09:30:09 +08:00
Joshua Chen 02186a2b20
fix(utils): Markdown linkification match local paths beginning with http (#6478) 2022-01-27 09:26:31 +08:00
Sébastien Lorber d6cff8c754
chore(v2): prepare v2.0.0-beta.15 release (#6473) 2022-01-26 19:28:16 +01:00
Joshua Chen 24a895fbc5
feat(content-docs): expose isCategoryIndex matcher to customize conventions (#6451)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-01-26 17:58:52 +01:00
Joshua Chen 76a8d5f38a
fix(content-blog): generate feed by reading build output (#6454) 2022-01-26 16:54:15 +01:00
Joshua Chen ebd5340205
chore: various improvements to repo setup (#6471)
* chore: various improvements to repo setup

* fix again

* fix
2022-01-26 14:24:15 +08:00
Joshua Chen 83fb3a825f
refactor: clean up dependencies (#6470) 2022-01-26 13:12:03 +08:00
Joshua Chen f0b08f493d
fix(module-type-aliases): fix type def for translate params (#6469) 2022-01-26 11:49:29 +08:00
Mikey O'Toole d0fc31c8ae
feat(theme-classic): add stable class for DocSidebarContainer (#6466) 2022-01-26 10:47:54 +08:00
Gabriel Csapo d73b4f8674
fix(init): cd to correct path when installing (#6468)
* [bug] ensure we use the correct cd path

* Update index.ts

* refactor

* add ignore

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-26 10:01:11 +08:00
Sébastien Lorber dd539dd23f
feat(search): enable contextual search by default (#6407) 2022-01-25 11:45:41 +08:00
Joshua Chen 59022c5eea
docs: add advanced guides (#6296)
* docs: add advanced guides

* complete

* fix link

* Create architecture

* use png

* explanations

* more text

* process.env.NODE_ENV

* typo

* Add image zoom

* nit

* nit

* reorganize

* fix links

* fix links

* reorganize

* elaborate on presets

* fix

* routing docs

* ssr section

* more content

* complete SSR guide

* pathname://

* improvements

* document executionenvironment

* reformat

* final tweaks!

* avoid slug

* oops
2022-01-25 11:29:18 +08:00
Nick Schonning e3be77081c
chore: typo colocation -> collocation (#6464) 2022-01-25 11:06:01 +08:00
sgenoud eaa3c59299
docs: add replicad to showcase (#6459)
* Added replicad in the showcase

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-25 09:52:03 +08:00
Nick Schonning 521eb119a7
chore: add cSpell for spell checking (#6456)
* chore: Add cSpell for spell checking

* chore: exclude map files and remove dups

* chore: exclude more binary files

* chore: remove MD headings

* Update .cspell.json

* fix a few spellings

* fix more

* fix

Signed-off-by: Joshua Chen <sidachen2003@gmail.com>

* fix a few

* oops

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-25 09:40:02 +08:00
Joshua Chen a41a5c328c
docs: 2021 recap blog post (#6334)
* docs: 2021 recap blog post

* minor wordings

* Misc copy changes

* Add thumbnail

* nit

* use en dash

* Update screenshots

* polish

* Add image to summary

* Tweak introduction

* oops...

* nits

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2022-01-24 22:05:59 +08:00
kuizuo 86ea0395ca
docs: add Kuizuo's Personal Website to showcase (#6458)
* docs: Add Kuizuo's Personal Website to showcase page

* minor tweaks
2022-01-24 20:59:04 +08:00
Edouard Bonlieu 0f8bb3bbe6
docs: add Koyeb as a deployment option (#6431) 2022-01-24 18:57:02 +08:00
trent 80b6c01b74
docs: add Sass Fairy to showcase (#6455)
* Add Sass Fairy to showcase

* minor tweaks

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-24 09:21:16 +08:00
Joshua Chen 711a6fe3d0
docs: document embedding generated index in doc page (#6453)
* docs: document embedding generated index in doc page

* fix
2022-01-23 20:04:34 +08:00
Joshua Chen 01676329e1
docs: split sidebar documentation into sections (#6450)
* docs: split sidebar documentation into sections

* set slugs

* fix links
2022-01-23 17:50:48 +08:00
Joshua Chen 8140560332
docs: multiple doc improvements (#6449) 2022-01-23 15:49:28 +08:00
Joshua Chen d0b4aaffed
fix(website): update colors correctly when palette is only customized in one color mode (#6448) 2022-01-23 14:29:32 +08:00
Anthony McCaigue ab1dada1aa
fix: allow links to JSON in .md files to be transformed as asset links (#4827)
* fix: fix links to JSON from .md files
closes #3561
It seems to be a common problem that many people are having see:
https://stackoverflow.com/questions/65307533/link-to-static-json-file

Co-authored-by: Anthony McCaigue <anthony@nquiringminds.com>
Co-authored-by: Alois Klink <alois@nquiringminds.com>

* Add dogfooding examples

* actually fix

* oops

Co-authored-by: Alois Klink <alois@nquiringminds.com>
Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
2022-01-23 11:46:27 +08:00
Nick Schonning 2528226eeb
chore: add height/width for front page images (#6385)
* chore: add height/width for Lighthouse performance

* use auto width

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-23 09:57:31 +08:00
Jeffrey Aven efd211dba4
docs: update showcase data of InfraQL (#6445)
* Update users.tsx

Hi, we have changed our product name from InfraQL to StackQL and we have gone all in with Docusaurus - including the marketing site, docs and blog (previously it was just the docs and blog), authored a few plugins on npmjs as well if you are interested, love your work!

* added new homepage image

* fixes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-23 09:12:59 +08:00
Jody Heavener 120b46e467
misc: update nvmrc to 14.17.0 to meet dependency requirements (#6444) 2022-01-23 09:12:03 +08:00
Joshua Chen 3d7ba337c2
refactor(mdx-loader): use vfile.path to access Markdown file path (#6443) 2022-01-22 22:28:50 +08:00
Joshua Chen e40cafccd5
chore: enable stylelint standard config (#6442)
* chore: enable stylelint standard config

* remove empty line

* fix
2022-01-22 21:26:35 +08:00
Joshua Chen 2f4b2e1790
misc: fix stylelint erroring when lint-staged passed ignored file (#6441) 2022-01-22 20:33:06 +08:00
Joshua Chen 456ffbd330
chore: remove some unused dependencies from package.json (#6440) 2022-01-22 19:47:35 +08:00
Davide Bianchi a4a386a45b
docs: add kube-green to showcase (#6433) 2022-01-22 16:23:53 +08:00
Joshua Chen c2e2938d1b
refactor(theme-classic): render BlogPostItem as one JSX element (#6436) 2022-01-22 14:56:43 +08:00
Joshua Chen 64909e7f14
fix(content-docs): make getActivePlugin match plugin paths more exactly (#6435)
* fix(content-docs): make getActivePlugin match plugin IDs more exactly

* refactor...
2022-01-22 13:36:56 +08:00
Joshua Chen cbcbdaa9d3
docs: elaborate on i18n tutorial (#6428) 2022-01-21 21:25:03 +08:00
Joshua Chen 807b4c2ced
feat(theme-classic): add aria-current to sidebar category link (#6427) 2022-01-21 11:40:27 +08:00
Sébastien Lorber 8a092f508d
fix(core): fix css url("image.png"), use css-loader v6 with esModules: false (#6424) 2022-01-20 18:30:54 +01:00
Joseph 8ce3cee400
feat(theme-classic): auto-collapse sibling categories in doc sidebar (#3811)
Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
2022-01-20 16:38:16 +01:00
Chen c9a6c7b6fb
docs: add 404Lab wiki to showcase (#6422)
* docs: add "404Lab.Wiki" website  to showcase

* docs: add "404Lab.Wiki" website screen to showcase

* updates

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-20 23:19:35 +08:00
Sébastien Lorber aaf748c1ee
chore: fix yarn build:website:fast (#6421) 2022-01-20 15:51:59 +01:00
Joshua Chen 4e69c052d6
feat(content-blog): allow authors list to contain images only (#6416)
* feat(content-blog): allow authors list to contain images only

* adjust styles

* fix

* fix

* mention in docs

* fix wording
2022-01-20 22:08:18 +08:00
Joshua Chen d506bca12d
feat(content-blog): allow disabling generating archive (#6415) 2022-01-20 14:52:19 +01:00
Joshua Chen 2a5407f6bd
fix(website): restore some site CSS in light mode (#6420) 2022-01-20 21:50:49 +08:00
Joshua Chen 65c2fc200a
feat(core): warn users about hand-modifying generated files (#6419)
* feat(core): warn users about hand-modifying generated files

* Better folder name
2022-01-20 21:41:59 +08:00
Joshua Chen d133910cb2
feat(content-blog): parse date from middle of file path (#6245) 2022-01-20 16:43:00 +08:00
Sanjay Soundarajan 29ecf22409
docs: add SODA for SPARC to showcase (#6410)
* Added docs site for SODA for SPARC

* Added SODA for SPARC snapshot

* Update spelling error for path

* optimize image

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-20 16:38:32 +08:00
Joshua Chen 332453eaa1
docs: fix accessibility of search modal (#6417) 2022-01-20 16:36:19 +08:00
Joshua Chen abdcad7316
feat: update website & init template palette to pass WCAG test; include contrast check in ColorGenerator (#5822)
* docs: update website palette to pass WCAG test

* Darker palette in light mode

* Fix CodeBlock

* Fix front page

* Fix announcement color

* Unify primary color

* Add contrast check in website

* Fix color input not updating

* Use website for preview; allow changing background

* Persist in localStorage

* Fixes

* Fix SSR

* Edit dark mode separately

* Fix light mode palette

* Fix storage reset

* Fix CSS

* Fix

* fix toggling when not on styling-layout

* require 100% lighthouse accessibility score

* use sessionStorage

* refactor

* tweak light color

* update comments

Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-01-20 14:51:18 +08:00
Joshua Chen 19fb337618
fix(content-pages): declare hide_table_of_contents as boolean (#6413) 2022-01-20 10:58:36 +08:00
Yaroslav Serhieiev d296f44031
docs(i18n): amend PR #6371 (#6406) 2022-01-19 18:19:41 +01:00
Joshua Chen 71b6ae2fbf
feat(core): check imported API name when extracting translations (#6405) 2022-01-19 17:04:33 +01:00
Joshua Chen 2cace21083
docs: update Algolia docs for new DocSearch infra (#6393) 2022-01-19 16:42:08 +01:00
Joshua Chen 45f1b819b5
feat(content-docs): displayed_sidebar front matter (#5782) 2022-01-19 16:00:42 +01:00
Joshua Chen fdf59f30f0
feat(content-pages): front matter validation, include front matter in metadata (#6400) 2022-01-19 13:44:58 +01:00
Joshua Chen e5801e49f6
feat(mdx-loader): read image dimensions when processing Markdown (#6339) 2022-01-19 12:45:14 +01:00
Yaroslav Serhieiev 6f892e20b0
feat(core, theme-classic): allow overriding htmlLang (#6371) 2022-01-19 12:38:42 +01:00
Nick Schonning 732ecd18e8
chore(website): set cache-control for static assets (#6381) 2022-01-19 12:10:18 +01:00
Joshua Chen 6c0da3ee4b
refactor: clean up TODO comments (#6399) 2022-01-19 12:10:50 +08:00
Joshua Chen 1d7827d572
refactor(theme-classic): add comments to Prism setup; minor refactor (#6391) 2022-01-18 19:46:22 +08:00
Joshua Chen 7bab9ba46d
feat(content-blog): include tags in feed (#6388)
* feat(content-blog): include tags in feed

* fix
2022-01-18 17:20:37 +08:00
Joshua Chen 62223ee556
test: improve test coverage (#6387)
* test: improve test coverage

* fix

* use posixPath
2022-01-18 16:29:40 +08:00
Joshua Chen a9810db1cc
fix(logger): properly stringify objects for logging (#6384)
* fix(logger): properly stringify objects for logging

* Add tests
2022-01-17 20:46:38 +08:00
Joshua Chen cb747025e8
docs: elaborate on different CSS class names (#6383) 2022-01-17 16:37:59 +08:00
Nick Schonning 16141fcd80
chore: enable a few fixable ESLint rules (#6380)
* chore: enable react/jsx-one-expression-per-line

* chore: enable import/first

* chore: enable lines-between-class-members

* revert class spacing

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-01-17 14:25:50 +08:00
Joshua Chen 3cb0972b79
refactor: use findAsyncSequential in a few places (#6377)
* refactor: use findAsyncSequential in a few places

* fixes

* fix
2022-01-17 08:57:06 +08:00
Joshua Chen ad16f4fdd9
fix(core): do not coerce webpack warning to string (#6378) 2022-01-16 19:47:22 +08:00
2937 changed files with 281438 additions and 117318 deletions

42
.cspell.json Normal file
View File

@ -0,0 +1,42 @@
{
"version": "0.2",
"gitignoreRoot": ".",
"useGitignore": true,
"dictionaries": [
"css",
"html",
"fonts",
"typescript",
"softwareTerms",
"companies",
"lorem-ipsum",
"project-words"
],
"dictionaryDefinitions": [
{
"name": "project-words",
"path": "./project-words.txt",
"noSuggest": true
}
],
"ignorePaths": [
"CHANGELOG.md",
"packages/docusaurus-theme-translations/locales",
"package.json",
"yarn.lock",
"project-words.txt",
"__snapshots__",
"website/src/data/users.tsx",
"website/src/data/tweets.tsx",
"website/docusaurus.config.localized.json",
"website/_dogfooding/_pages tests/diagrams.mdx",
"*.xyz",
"*.docx",
"*.gitignore",
"versioned_docs",
"*.min.*",
"jest/vendor"
],
"ignoreRegExpList": ["Email", "Urls", "#[\\w-]*"],
"enableFiletypes": ["mdx"]
}

View File

@ -1,10 +1,33 @@
{
"name": "Docusaurus Dev Container",
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:14-buster",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
},
"extensions": ["dbaeumer.vscode-eslint", "orta.vscode-jest"],
"extensions": [
"dbaeumer.vscode-eslint",
"orta.vscode-jest",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker"
],
"forwardPorts": [3000],
"postCreateCommand": "yarn install"
"containerUser": "vscode",
"postCreateCommand": "yarn install",
"waitFor": "postCreateCommand", // otherwise automated jest tests fail
"features": {
"node": {
"version": "18"
},
"github-cli": "latest"
}
}

View File

@ -1,19 +1,23 @@
__fixtures__
__mocks__
dist
node_modules
.yarn
.history
build
coverage
jest.config.js
jest.transform.js
jest/vendor
examples/
packages/lqip-loader/lib/
packages/docusaurus/lib/
packages/docusaurus-*/lib/*
packages/docusaurus-*/lib-next/
packages/eslint-plugin/lib/
packages/stylelint-copyright/lib/
copyUntypedFiles.mjs
packages/create-docusaurus/lib/*
packages/create-docusaurus/templates/facebook/.eslintrc.js
packages/create-docusaurus/templates/facebook
website/_dogfooding/_swizzle_theme_tests

500
.eslintrc.js vendored
View File

@ -9,6 +9,18 @@ const OFF = 0;
const WARNING = 1;
const ERROR = 2;
const ClientRestrictedImportPatterns = [
// Prevent importing lodash in client bundle for bundle size
'lodash',
'lodash.**',
'lodash/**',
// Prevent importing server code in client bundle
'**/../babel/**',
'**/../server/**',
'**/../commands/**',
'**/../webpack/**',
];
module.exports = {
root: true,
env: {
@ -19,19 +31,23 @@ module.exports = {
},
parser: '@typescript-eslint/parser',
parserOptions: {
allowImportExportEverywhere: true,
// tsconfigRootDir: __dirname,
// project: ['./tsconfig.json', './website/tsconfig.json'],
},
globals: {
testStylelintRule: true,
JSX: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:jest/recommended',
'airbnb',
'plugin:@typescript-eslint/recommended',
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
// 'plugin:@typescript-eslint/strict',
'plugin:regexp/recommended',
'prettier',
'plugin:@docusaurus/all',
],
settings: {
'import/resolver': {
@ -41,21 +57,164 @@ module.exports = {
},
},
reportUnusedDisableDirectives: true,
plugins: ['react-hooks', 'header', 'jest'],
plugins: [
'react-hooks',
'header',
'jest',
'@typescript-eslint',
'regexp',
'@docusaurus',
],
rules: {
'react-hooks/rules-of-hooks': ERROR,
'react-hooks/exhaustive-deps': ERROR,
'react/jsx-uses-react': OFF, // JSX runtime: automatic
'react/react-in-jsx-scope': OFF, // JSX runtime: automatic
'array-callback-return': WARNING,
camelcase: WARNING,
'class-methods-use-this': OFF, // It's a way of allowing private variables.
'func-names': OFF,
// Ignore certain webpack alias because it can't be resolved
'import/no-unresolved': [
ERROR,
curly: [WARNING, 'all'],
'global-require': WARNING,
'lines-between-class-members': OFF,
'max-classes-per-file': OFF,
'max-len': [
WARNING,
{
ignore: ['^@theme', '^@docusaurus', '^@generated', '^@site'],
code: Infinity, // Code width is already enforced by Prettier
tabWidth: 2,
comments: 80,
ignoreUrls: true,
ignorePattern: '(eslint-disable|@)',
},
],
'import/extensions': OFF,
'arrow-body-style': OFF,
'no-await-in-loop': OFF,
'no-case-declarations': WARNING,
'no-console': OFF,
'no-constant-binary-expression': ERROR,
'no-continue': OFF,
'no-control-regex': WARNING,
'no-else-return': OFF,
'no-empty': [WARNING, {allowEmptyCatch: true}],
'no-lonely-if': WARNING,
'no-nested-ternary': WARNING,
'no-param-reassign': [WARNING, {props: false}],
'no-prototype-builtins': WARNING,
'no-restricted-exports': OFF,
'no-restricted-properties': [
ERROR,
.../** @type {[string, string][]} */ ([
// TODO: TS doesn't make Boolean a narrowing function yet,
// so filter(Boolean) is problematic type-wise
// ['compact', 'Array#filter(Boolean)'],
['concat', 'Array#concat'],
['drop', 'Array#slice(n)'],
['dropRight', 'Array#slice(0, -n)'],
['fill', 'Array#fill'],
['filter', 'Array#filter'],
['find', 'Array#find'],
['findIndex', 'Array#findIndex'],
['first', 'foo[0]'],
['flatten', 'Array#flat'],
['flattenDeep', 'Array#flat(Infinity)'],
['flatMap', 'Array#flatMap'],
['fromPairs', 'Object.fromEntries'],
['head', 'foo[0]'],
['indexOf', 'Array#indexOf'],
['initial', 'Array#slice(0, -1)'],
['join', 'Array#join'],
// Unfortunately there's no great alternative to _.last yet
// Candidates: foo.slice(-1)[0]; foo[foo.length - 1]
// Array#at is ES2022; could replace _.nth as well
// ['last'],
['map', 'Array#map'],
['reduce', 'Array#reduce'],
['reverse', 'Array#reverse'],
['slice', 'Array#slice'],
['take', 'Array#slice(0, n)'],
['takeRight', 'Array#slice(-n)'],
['tail', 'Array#slice(1)'],
]).map(([property, alternative]) => ({
object: '_',
property,
message: `Use ${alternative} instead.`,
})),
...[
'readdirSync',
'readFileSync',
'statSync',
'lstatSync',
'existsSync',
'pathExistsSync',
'realpathSync',
'mkdirSync',
'mkdirpSync',
'mkdirsSync',
'writeFileSync',
'writeJsonSync',
'outputFileSync',
'outputJsonSync',
'moveSync',
'copySync',
'copyFileSync',
'ensureFileSync',
'ensureDirSync',
'ensureLinkSync',
'ensureSymlinkSync',
'unlinkSync',
'removeSync',
'emptyDirSync',
].map((property) => ({
object: 'fs',
property,
message: 'Do not use sync fs methods.',
})),
],
'no-restricted-syntax': [
WARNING,
// Copied from airbnb, removed for...of statement, added export all
{
selector: 'ForInStatement',
message:
'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
},
{
selector: 'LabeledStatement',
message:
'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
},
{
selector: 'WithStatement',
message:
'`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
},
{
selector: 'ExportAllDeclaration',
message:
"Export all does't work well if imported in ESM due to how they are transpiled, and they can also lead to unexpected exposure of internal methods.",
},
// TODO make an internal plugin to ensure this
// {
// selector:
// @ 'ExportDefaultDeclaration > Identifier, ExportNamedDeclaration[source=null] > ExportSpecifier',
// message: 'Export in one statement'
// },
...['path', 'fs-extra', 'webpack', 'lodash'].map((m) => ({
selector: `ImportDeclaration[importKind=value]:has(Literal[value=${m}]) > ImportSpecifier[importKind=value]`,
message:
'Default-import this, both for readability and interoperability with ESM',
})),
],
'no-template-curly-in-string': WARNING,
'no-unused-expressions': [
WARNING,
{allowTaggedTemplates: true, allowShortCircuit: true},
],
'no-useless-escape': WARNING,
'no-void': [ERROR, {allowAsStatement: true}],
'prefer-destructuring': WARNING,
'prefer-named-capture-group': WARNING,
'prefer-template': WARNING,
yoda: WARNING,
'header/header': [
ERROR,
'block',
@ -68,22 +227,103 @@ module.exports = {
' ',
],
],
'import/extensions': OFF,
// This rule doesn't yet support resolving .js imports when the actual file
// is .ts. Plus it's not all that useful when our code is fully TS-covered.
'import/no-unresolved': [
OFF,
{
// Ignore certain webpack aliases because they can't be resolved
ignore: [
'^@theme',
'^@docusaurus',
'^@generated',
'^@site',
'^@testing-utils',
],
},
],
'import/order': [
WARNING,
{
groups: [
'builtin',
'external',
'internal',
['parent', 'sibling', 'index'],
'type',
],
pathGroups: [
// always put css import to the last, ref:
// https://github.com/import-js/eslint-plugin-import/issues/1239
{
pattern: '*.+(css|sass|less|scss|pcss|styl)',
group: 'unknown',
patternOptions: {matchBase: true},
position: 'after',
},
{pattern: '@jest/globals', group: 'builtin', position: 'before'},
{pattern: 'react', group: 'builtin', position: 'before'},
{pattern: 'react-dom', group: 'builtin', position: 'before'},
{pattern: 'react-dom/**', group: 'builtin', position: 'before'},
{pattern: 'stream', group: 'builtin', position: 'before'},
{pattern: 'fs-extra', group: 'builtin'},
{pattern: 'lodash', group: 'external', position: 'before'},
{pattern: 'clsx', group: 'external', position: 'before'},
// 'Bit weird to not use the `import/internal-regex` option, but this
// way, we can make `import type { Props } from "@theme/*"` appear
// before `import styles from "styles.module.css"`, which is what we
// always did. This should be removable once we stop using ambient
// module declarations for theme aliases.
{pattern: '@theme/**', group: 'internal'},
{pattern: '@site/**', group: 'internal'},
{pattern: '@theme-init/**', group: 'internal'},
{pattern: '@theme-original/**', group: 'internal'},
],
pathGroupsExcludedImportTypes: [],
// example: let `import './nprogress.css';` after importing others
// in `packages/docusaurus-theme-classic/src/nprogress.ts`
// see more: https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md#warnonunassignedimports-truefalse
warnOnUnassignedImports: true,
},
],
'import/prefer-default-export': OFF,
'jest/consistent-test-it': WARNING,
'jest/expect-expect': OFF,
'jest/no-large-snapshots': [
WARNING,
{maxSize: Infinity, inlineMaxSize: 10},
],
'jest/no-test-return-statement': ERROR,
'jest/prefer-expect-resolves': WARNING,
'jest/prefer-lowercase-title': [WARNING, {ignore: ['describe']}],
'jest/prefer-spy-on': WARNING,
'jest/prefer-to-be': WARNING,
'jest/prefer-to-have-length': WARNING,
'jest/require-top-level-describe': ERROR,
'jest/valid-title': [
ERROR,
{
mustNotMatch: {
it: [
'^should|\\.$',
'Titles should not begin with "should" or end with a full-stop',
],
},
},
],
'jsx-a11y/click-events-have-key-events': WARNING,
'jsx-a11y/no-noninteractive-element-interactions': WARNING,
'jsx-a11y/html-has-lang': OFF,
'no-console': OFF,
'no-else-return': OFF,
'no-param-reassign': [WARNING, {props: false}],
'no-underscore-dangle': OFF,
curly: [WARNING, 'all'],
'react/jsx-filename-extension': OFF,
'react/jsx-one-expression-per-line': OFF,
'react/no-array-index-key': OFF, // Sometimes its ok, e.g. non-changing data.
'react/prop-types': OFF,
'react/destructuring-assignment': OFF, // Too many lines.
'react/prefer-stateless-function': WARNING,
'react/jsx-props-no-spreading': OFF,
'react/require-default-props': [ERROR, {ignoreFunctionalComponents: true}],
'react-hooks/rules-of-hooks': ERROR,
'react-hooks/exhaustive-deps': ERROR,
// Sometimes we do need the props as a whole, e.g. when spreading
'react/destructuring-assignment': OFF,
'react/function-component-definition': [
WARNING,
{
@ -91,112 +331,124 @@ module.exports = {
unnamedComponents: 'arrow-function',
},
],
'react/jsx-filename-extension': OFF,
'react/jsx-key': [ERROR, {checkFragmentShorthand: true}],
'react/jsx-no-useless-fragment': [ERROR, {allowExpressions: true}],
'react/jsx-props-no-spreading': OFF,
'react/no-array-index-key': OFF, // We build a static site, and nearly all components don't change.
'react/no-unstable-nested-components': [WARNING, {allowAsProps: true}],
'@typescript-eslint/no-inferrable-types': OFF,
'@typescript-eslint/consistent-type-imports': [
WARNING,
{disallowTypeAnnotations: false},
],
'import/first': OFF,
'import/order': OFF,
'import/prefer-default-export': OFF,
'lines-between-class-members': OFF,
'no-lonely-if': WARNING,
'no-use-before-define': OFF,
'@typescript-eslint/no-use-before-define': [
ERROR,
{functions: false, classes: false, variables: true},
],
'no-unused-vars': OFF,
'no-nested-ternary': WARNING,
'@typescript-eslint/no-empty-function': OFF,
'@typescript-eslint/no-non-null-assertion': OFF,
'@typescript-eslint/no-unused-vars': [
ERROR,
{argsIgnorePattern: '^_', ignoreRestSiblings: true},
],
'@typescript-eslint/explicit-module-boundary-types': WARNING,
'react/prefer-stateless-function': WARNING,
'react/prop-types': OFF,
'react/require-default-props': [ERROR, {ignoreFunctionalComponents: true}],
'@typescript-eslint/consistent-type-definitions': OFF,
'@typescript-eslint/require-await': OFF,
'@typescript-eslint/ban-ts-comment': [
ERROR,
{'ts-expect-error': 'allow-with-description'},
],
'import/no-extraneous-dependencies': ERROR,
'no-useless-escape': WARNING,
'prefer-template': WARNING,
'no-template-curly-in-string': WARNING,
'array-callback-return': WARNING,
camelcase: WARNING,
'no-restricted-syntax': WARNING,
'no-unused-expressions': [WARNING, {allowTaggedTemplates: true}],
'global-require': WARNING,
'prefer-destructuring': WARNING,
yoda: WARNING,
'no-await-in-loop': OFF,
'no-control-regex': WARNING,
'no-empty': [WARNING, {allowEmptyCatch: true}],
'no-prototype-builtins': WARNING,
'no-case-declarations': WARNING,
'no-undef': OFF,
'no-shadow': OFF,
'@typescript-eslint/no-shadow': ERROR,
'no-redeclare': OFF,
'@typescript-eslint/no-redeclare': ERROR,
'@typescript-eslint/consistent-indexed-object-style': OFF,
'@typescript-eslint/consistent-type-imports': [
WARNING,
{disallowTypeAnnotations: false},
],
'@typescript-eslint/explicit-module-boundary-types': WARNING,
'@typescript-eslint/method-signature-style': ERROR,
'@typescript-eslint/no-empty-function': OFF,
'@typescript-eslint/no-empty-interface': [
ERROR,
{
allowSingleExtends: true,
},
],
'@typescript-eslint/method-signature-style': ERROR,
'no-restricted-imports': [
'@typescript-eslint/no-inferrable-types': OFF,
'@typescript-eslint/no-namespace': [WARNING, {allowDeclarations: true}],
'no-use-before-define': OFF,
'@typescript-eslint/no-use-before-define': [
ERROR,
{functions: false, classes: false, variables: true},
],
'@typescript-eslint/no-non-null-assertion': OFF,
'no-redeclare': OFF,
'@typescript-eslint/no-redeclare': ERROR,
'no-shadow': OFF,
'@typescript-eslint/no-shadow': ERROR,
'no-unused-vars': OFF,
// We don't provide any escape hatches for this rule. Rest siblings and
// function placeholder params are always ignored, and any other unused
// locals must be justified with a disable comment.
'@typescript-eslint/no-unused-vars': [ERROR, {ignoreRestSiblings: true}],
'@typescript-eslint/prefer-optional-chain': ERROR,
'@docusaurus/no-html-links': ERROR,
'@docusaurus/prefer-docusaurus-heading': ERROR,
'@docusaurus/no-untranslated-text': [
WARNING,
{
paths: [
{
name: 'lodash',
importNames: [
// 'compact', // TODO: TS doesn't make Boolean a narrowing function yet, so filter(Boolean) is problematic type-wise
'filter',
'flatten',
'flatMap',
'map',
'reduce',
'take',
'takeRight',
'head',
'tail',
'initial',
],
message: 'These APIs have their ES counterparts.',
},
ignoredStrings: [
'·',
'-',
'—',
'×',
'', // zwj: &#8203;
'@',
'WebContainers',
'Twitter',
'GitHub',
'Dev.to',
'1.x',
],
},
],
'jest/prefer-expect-resolves': WARNING,
'jest/expect-expect': OFF,
'jest/valid-title': OFF,
},
overrides: [
{
files: ['packages/docusaurus/src/client/**/*.{js,ts,tsx}'],
rules: {
'no-restricted-imports': [
'error',
{
patterns: ClientRestrictedImportPatterns,
},
],
},
},
{
files: ['packages/docusaurus-*/src/theme/**/*.{js,ts,tsx}'],
excludedFiles: '*.test.{js,ts,tsx}',
rules: {
'no-restricted-imports': [
'error',
{
patterns: ClientRestrictedImportPatterns.concat(
// Prevents relative imports between React theme components
[
'../**',
'./**',
// Allows relative styles module import with consistent filename
'!./styles.module.css',
],
),
},
],
},
},
{
files: [
'packages/docusaurus-theme-*/src/theme/**/*.js',
'packages/docusaurus-theme-*/src/theme/**/*.ts',
'packages/docusaurus-theme-*/src/theme/**/*.tsx',
'packages/docusaurus-*/src/theme/**/*.{js,ts,tsx}',
'packages/docusaurus/src/client/theme-fallback/**/*.{js,ts,tsx}',
],
rules: {
'import/no-named-export': ERROR,
},
},
{
files: [
'packages/create-docusaurus/templates/**/*.js',
'packages/create-docusaurus/templates/**/*.ts',
'packages/create-docusaurus/templates/**/*.tsx',
],
files: ['packages/create-docusaurus/templates/**/*.{js,ts,tsx}'],
rules: {
'header/header': OFF,
'global-require': OFF,
'@typescript-eslint/no-var-requires': OFF,
'@docusaurus/no-untranslated-text': OFF,
},
},
{
@ -206,18 +458,58 @@ module.exports = {
},
},
{
files: ['*.ts', '*.tsx'],
files: ['*.{ts,tsx}'],
rules: {
'no-undef': OFF,
'import/no-import-module-exports': OFF,
},
},
{
files: ['*.js', '*.mjs', '.cjs'],
files: ['*.{js,mjs,cjs}'],
rules: {
// Make JS code directly runnable in Node.
'@typescript-eslint/no-var-requires': OFF,
'@typescript-eslint/explicit-module-boundary-types': OFF,
},
},
{
files: [
'**/__tests__/**',
'packages/docusaurus-plugin-debug/**',
'website/_dogfooding/**',
],
rules: {
'@docusaurus/no-untranslated-text': OFF,
},
},
{
// Internal files where extraneous deps don't matter much at long as
// they run
files: [
'*.test.{js,ts,tsx}',
'admin/**',
'jest/**',
'website/**',
'packages/docusaurus-theme-common/removeThemeInternalReexport.mjs',
'packages/docusaurus-theme-translations/update.mjs',
'packages/docusaurus-theme-translations/src/utils.ts',
],
rules: {
'import/no-extraneous-dependencies': OFF,
},
},
{
files: ['packages/eslint-plugin/**/*.{js,ts}'],
extends: ['plugin:eslint-plugin/recommended'],
},
{
files: [
'packages/docusaurus-plugin-debug/**',
'packages/docusaurus/src/**',
],
rules: {
'@docusaurus/prefer-docusaurus-heading': OFF,
},
},
],
};

15
.gitattributes vendored
View File

@ -27,3 +27,18 @@
*.bz2 binary
*.swp binary
*.webp binary
# Make GitHub not index certain files in the languages overview
# See https://github.com/github/linguist/blob/master/docs/overrides.md
# generated files' diff will be minimized
**/__fixtures__/** linguist-generated
**/__mocks__/** linguist-generated
examples/** linguist-generated
.husky/** linguist-vendored
jest/** linguist-vendored
admin/** linguist-documentation
website/** linguist-documentation
packages/create-docusaurus/templates/** linguist-vendored
.eslintrc.* linguist-vendored
jest.config.* linguist-vendored
.stylelintrc.* linguist-vendored

View File

@ -1,3 +0,0 @@
## 👉 [Please follow one of these issue templates](https://github.com/facebook/docusaurus/issues/new/choose) 👈
Note: to keep the backlog clean and actionable, issues may be immediately closed if they do not follow one of the above issue templates.

View File

@ -7,7 +7,14 @@ body:
value: |
## Please help us help you!
Make it obvious to understand and reproduce this bug. Ideally, we should be able to understand it without running any code.
Before filing your issue, ask yourself:
- Is this clearly a Docusaurus defect?
- Do I have basic ideas about where it goes wrong? (For example, if there are stack traces, are they pointing to one file?)
- Could it be because of my own mistakes?
**The GitHub issue tracker is not a support forum**. If you are not sure whether it could be your mistakes, ask in the [Discord server](https://discord.gg/docusaurus) or [GitHub discussions](https://github.com/facebook/docusaurus/discussions) first. The quickest way to verify whether it's a Docusaurus defect is through a **reproduction**, starting with a fresh installation and making changes until the bug is reproduced.
Make the bug obvious. Ideally, we should be able to understand it without running any code.
Bugs are fixed faster if you include:
- A repro repository to inspect the code
@ -19,7 +26,7 @@ body:
attributes:
label: Have you read the Contributing Guidelines on issues?
options:
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).
required: true
- type: checkboxes
@ -41,13 +48,27 @@ body:
validations:
required: true
- type: input
attributes:
label: Reproducible demo
description: |
Paste the link to an example repo, including a `docusaurus.config.js`, and exact instructions to reproduce the issue. It can either be a playground link created from https://new.docusaurus.io, or a git repository.
> **What happens if you skip this step?** Someone will read your bug report, and maybe will be able to help you, but its unlikely that it will get much attention from the team. Eventually, the issue will likely get closed in favor of issues that have reproducible demos.
Please remember that:
- Issues without reproducible demos have a very low priority.
- The person fixing the bug would have to do that anyway. Please be respectful of their time.
- You might figure out the issues yourself as you work on extracting it.
Thanks for helping us help you!
- type: textarea
attributes:
label: Steps to reproduce
description: Use https://new.docusaurus.io to create a CodeSandbox reproducible demo of the bug.
description: Write down the steps to reproduce the bug. You should start with a fresh installation, or your git repository linked above.
placeholder: |
Write your steps here.
1. Step 1...
2. Step 2...
3. Step 3...
@ -55,7 +76,6 @@ body:
required: true
- type: textarea
attributes:
label: Expected behavior
description: |
@ -87,22 +107,6 @@ body:
- Environment name and version (e.g. Chrome 89, Node.js 16.4):
- Operating system and version (e.g. Ubuntu 20.04.2 LTS):
- type: input
attributes:
label: Reproducible demo
description: |
Paste the link to an example repo, including a `docusaurus.config.js`, and exact instructions to reproduce the issue. Use https://new.docusaurus.io to create a CodeSandbox reproducible demo of the bug.
> **What happens if you skip this step?** Someone will read your bug report, and maybe will be able to help you, but its unlikely that it will get much attention from the team. Eventually, the issue will likely get closed in favor of issues that have reproducible demos.
Please remember that:
- Issues without reproducible demos have a very low priority.
- The person fixing the bug would have to do that anyway. Please be respectful of their time.
- You might figure out the issues yourself as you work on extracting it.
Thanks for helping us help you!
- type: checkboxes
attributes:
label: Self-service

View File

@ -27,7 +27,7 @@ body:
attributes:
label: Have you read the Contributing Guidelines on issues?
options:
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).
required: true
- type: textarea

View File

@ -15,7 +15,7 @@ body:
attributes:
label: Have you read the Contributing Guidelines on issues?
options:
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).
required: true
- type: textarea

View File

@ -23,7 +23,7 @@ body:
attributes:
label: Have you read the Contributing Guidelines on issues?
options:
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).
- label: I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).
required: true
- type: textarea

View File

@ -1,26 +1,44 @@
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.
You can learn more about contributing to Docusaurus here: https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md
Happy contributing!
-->
## Pre-flight checklist
- [ ] I have read the [Contributing Guidelines on pull requests](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#pull-requests).
- [ ] **If this is a code change**: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
- [ ] **If this is a new API or substantial change**: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.
<!--
Please also remember to sign the CLA, although you can also sign it after submitting the PR. The CLA is required for us to merge your PR.
If this PR adds or changes functionality, please take some time to update the docs. You can also write docs after the API design is finalized and the code changes have been approved.
-->
## Motivation
(Write your motivation here.)
### Have you read the [Contributing Guidelines on pull requests](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#pull-requests)?
(Write your answer here.)
<!-- Help us understand your motivation by explaining why you decided to make this change. Does this fix a bug? Does it close an issue? -->
## Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
<!-- Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! -->
## Related PRs
### Test links
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)
<!--
🙏 Please add an exhaustive list of links relevant to this pull request.
⏱ This saves maintainers a lot of time during reviews.
- If you changed anything that's displayed on UI, please add a dogfooding page in website/_dogfooding to help us preview the effect. Those tests are deployed at https://docusaurus.io/tests
- If you changed documentation, please link to the new and updated documentation pages.
After submission, our Netlify bot will post a deploy preview link in comment, in the format of https://deploy-preview-<PR-NUMBER>--docusaurus-2.netlify.app/. Once available, please edit this section with links to the relevant deploy preview pages.
Please don't be afraid to change the main site's configuration as well! You can make use of your new feature on our site so we can preview its effects. We can decide if it should be kept in production before merging it.
-->
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
## Related issues/PRs
<!-- If you haven't already, link to issues/PRs that are related to this change. This helps us develop the context and keep a rich repo history. If this PR is a continuation of a past PR's work, link to that PR. If the PR addresses part of the problem in a meta-issue, mention that issue. -->

View File

@ -5,8 +5,14 @@ updates:
schedule:
interval: weekly
open-pull-requests-limit: 99
- package-ecosystem: npm
labels:
- 'pr: dependencies'
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: monthly
open-pull-requests-limit: 99
interval: 'daily'
# Disable version updates for npm dependencies
# https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates#overriding-the-default-behavior-with-a-configuration-file
open-pull-requests-limit: 0
labels:
- 'pr: dependencies'

47
.github/workflows/argos.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: Argos CI
on:
push:
branches: [main]
pull_request:
branches: [main]
types:
# Those 3 are the default PR workflow activity types,
# see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
- opened
- synchronize
- reopened
# We want trigger workflow on labeled too!
- labeled
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
take-screenshots:
# Argos is heavy to run
# We only want to trigger Argos on PRs with the 'Argos' label
# See https://stackoverflow.com/questions/62325286/run-github-actions-when-pull-requests-have-a-specific-label
if: ${{ (github.event_name != 'pull_request' && github.ref_name == 'main') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Argos')) }}
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Build website fast
run: yarn build:website:fast
- name: Take Argos screenshots
run: yarn argos:screenshot

View File

@ -4,8 +4,16 @@ on:
pull_request:
branches:
- main
- docusaurus-v**
paths:
- packages/docusaurus/**
- packages/**
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
@ -13,10 +21,12 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '16'
node-version: '18'
cache: yarn
- name: Installation
run: yarn

View File

@ -9,24 +9,45 @@ on:
pull_request:
branches:
- main
paths-ignore:
- website/docs/**
- docusaurus-v**
paths:
- package.json
- yarn.lock
- packages/**
- website/**
- '!website/docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-size:
permissions:
checks: write # for preactjs/compressed-size-action to create and update the checks
contents: read # for actions/checkout to fetch code
issues: write # for preactjs/compressed-size-action to create comments
pull-requests: write # for preactjs/compressed-size-action to write a PR review
name: Build Size Report
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '16'
node-version: '18'
cache: yarn
- uses: preactjs/compressed-size-action@v2
- name: Track build size changes
uses: preactjs/compressed-size-action@8119d3d31b6e57b167e09c81dfa877eada3bcb35 # v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
build-script: build:website:en
clean-script: clear:website # see https://github.com/facebook/docusaurus/pull/6838
pattern: '{website/build/assets/js/main*js,website/build/assets/css/styles*css,website/.docusaurus/globalData.json,website/build/index.html,website/build/blog/index.html,website/build/blog/**/introducing-docusaurus/*,website/build/docs/index.html,website/build/docs/installation/index.html,website/build/tests/docs/index.html,website/build/tests/docs/standalone/index.html}'
strip-hash: '\.([^;]\w{7})\.'
minimum-change-threshold: 30
@ -36,8 +57,10 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
cache: yarn
- name: Installation
@ -52,4 +75,4 @@ jobs:
- name: Build (warm cache)
run: yarn workspace website build --locale en
timeout-minutes: 2
# TODO post a Github comment with build with perf warnings?
# TODO post a GitHub comment with build with perf warnings?

View File

@ -4,21 +4,26 @@ on:
push:
branches:
- main
- docusaurus-v**
paths:
- packages/**
permissions:
contents: read
jobs:
publish-canary:
name: Publish Canary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0 # Needed to get the commit number with "git rev-list --count HEAD"
- name: Set up Node
uses: actions/setup-node@v2
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '16'
node-version: '18'
cache: yarn
- name: Prepare git
run: |

View File

@ -4,12 +4,18 @@ on:
push:
branches:
- main
- docusaurus-v**
pull_request:
branches:
- main
- docusaurus-v**
schedule:
- cron: 25 22 * * 3
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze
@ -26,13 +32,13 @@ jobs:
- javascript
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a # 2.13.4
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a # 2.13.4

View File

@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "cspell",
"pattern": [
{
"regexp": "^(.*):(\\d+):(\\d+)\\s+\\-\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
}
]
}

18
.github/workflows/dependency-review.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Dependency Review
on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Dependency Review
uses: actions/dependency-review-action@733dd5d4a5203f238c33806593ec0f5fc5343d8c # 4.2.4

View File

@ -4,58 +4,67 @@ on:
pull_request_target:
branches:
- main
- docusaurus-v**
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lighthouse-report:
permissions:
pull-requests: write # for marocchino/sticky-pull-request-comment
name: Lighthouse Report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Wait for the Netlify Preview
uses: jakepartusch/wait-for-netlify-action@v1
id: netlify
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
site_name: docusaurus-2
max_timeout: 600
node-version: 18
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website fast
run: yarn build:website:fast
- name: Audit URLs using Lighthouse
id: lighthouse_audit
uses: treosh/lighthouse-ci-action@8.2.0
uses: treosh/lighthouse-ci-action@1b0e7c33270fbba31a18a0fbb1de7cc5256b6d39 # 11.4.0
with:
urls: |
https://deploy-preview-$PR_NUMBER--docusaurus-2.netlify.app/
configPath: ./.github/workflows/lighthousesrc.json
http://localhost:3000
http://localhost:3000/docs/installation
http://localhost:3000/docs/category/getting-started
http://localhost:3000/blog
http://localhost:3000/blog/preparing-your-site-for-docusaurus-v3
http://localhost:3000/blog/tags/release
http://localhost:3000/blog/tags
configPath: ./.github/workflows/lighthouserc.json
uploadArtifacts: true
temporaryPublicStorage: true
env:
PR_NUMBER: ${{ github.event.pull_request.number}}
- name: Format lighthouse score
id: format_lighthouse_score
uses: actions/github-script@v5
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # 7.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const result = ${{ steps.lighthouse_audit.outputs.manifest }}[0].summary
const results = ${{ steps.lighthouse_audit.outputs.manifest }}
const links = ${{ steps.lighthouse_audit.outputs.links }}
const formatResult = (res) => Math.round((res * 100))
Object.keys(result).forEach(key => result[key] = formatResult(result[key]))
const score = res => res >= 90 ? '🟢' : res >= 50 ? '🟠' : '🔴'
const comment = [
`⚡️ [Lighthouse report](${Object.values(links)[0]}) for the changes in this PR:`,
'| Category | Score |',
'| --- | --- |',
`| ${score(result.performance)} Performance | ${result.performance} |`,
`| ${score(result.accessibility)} Accessibility | ${result.accessibility} |`,
`| ${score(result['best-practices'])} Best practices | ${result['best-practices']} |`,
`| ${score(result.seo)} SEO | ${result.seo} |`,
`| ${score(result.pwa)} PWA | ${result.pwa} |`,
' ',
`*Lighthouse ran on [${Object.keys(links)[0]}](${Object.keys(links)[0]})*`
].join('\n')
core.setOutput("comment", comment);
const createLighthouseReport = (await import(`${process.env.GITHUB_WORKSPACE}/admin/scripts/formatLighthouseReport.js`)).default;
const comment = createLighthouseReport({ results, links });
core.setOutput("comment", comment);
- name: Add Lighthouse stats as comment
id: comment_to_pr
uses: marocchino/sticky-pull-request-comment@v2.2.0
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # 2.9.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.pull_request.number }}

22
.github/workflows/lighthouserc.json vendored Normal file
View File

@ -0,0 +1,22 @@
{
"ci": {
"collect": {
"startServerCommand": "yarn serve:website",
"startServerReadyPattern": "Serving",
"startServerReadyTimeout": 10000,
"numberOfRuns": 1,
"settings": {
"skipAudits": [
"robots-txt",
"canonical",
"tap-targets",
"is-crawlable",
"works-offline",
"offline-start-url"
]
}
}
}
}

View File

@ -1,16 +0,0 @@
{
"ci": {
"collect": {
"settings": {
"skipAudits": [
"robots-txt",
"canonical",
"tap-targets",
"is-crawlable",
"works-offline",
"offline-start-url"
]
}
}
}
}

44
.github/workflows/lint-autofix.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Lint AutoFix
on:
pull_request:
branches:
- main
- docusaurus-v**
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint-autofix:
name: Lint AutoFix
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Installation
run: yarn
- name: AutoFix Format
run: yarn format
- name: AutoFix JS
run: yarn lint:js:fix
- name: AutoFix Style
run: yarn lint:style:fix
- name: AutoFix Spelling
run: yarn lint:spelling:fix
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'refactor: apply lint autofix'

View File

@ -4,6 +4,14 @@ on:
pull_request:
branches:
- main
- docusaurus-v**
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
@ -11,17 +19,21 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '16'
node-version: '18'
cache: yarn
- name: Installation
run: yarn
# run: yarn install --immutable # Fails if yarn.lock is modified (unfortunately only works for Yarn 2, and --frozen-lockfile is not the same!)
# run: yarn install --immutable # Fails if yarn.lock is modified (unfortunately only works for Yarn 2, and --frozen-lockfile is not the same!)
- name: Check immutable yarn.lock
run: git diff --exit-code
- name: Lint
run: yarn lint:ci
run: |
echo "::add-matcher::.github/workflows/cspell-problem-matcher.json"
yarn lint:ci
- name: Prettier Code
run: yarn format:diff

View File

@ -4,20 +4,29 @@ on:
pull_request:
branches:
- main
- docusaurus-v**
paths:
- website/src/data/**
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
validate-config:
name: Validate Showcase Config
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Node
uses: actions/setup-node@v2
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '16'
node-version: '20'
cache: yarn
- name: Installation
run: yarn

View File

@ -4,13 +4,32 @@ on:
push:
branches:
- main
paths-ignore:
- website/**
- docusaurus-v**
paths:
- package.json
- yarn.lock
- jest.config.mjs
- packages/**
- tsconfig.json
pull_request:
branches:
- main
paths-ignore:
- website/**
- docusaurus-v**
paths:
- package.json
- yarn.lock
- jest.config.mjs
- packages/**
- tsconfig.json
- admin/verdaccio.yaml
- .github/workflows/tests-e2e.yml
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
yarn-v1:
@ -19,11 +38,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['14', '16', '17']
node: ['18.0', '18', '20']
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node }}
cache: yarn
@ -31,8 +51,6 @@ jobs:
run: yarn
- name: Generate test-website project against main branch
run: yarn test:build:website -s
env:
KEEP_CONTAINER: true
- name: Install test-website project with Yarn v1
run: yarn install
working-directory: ../test-website
@ -54,25 +72,22 @@ jobs:
strategy:
matrix:
nodeLinker: [pnp, node-modules]
variant: [-s, -st]
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js 18
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '16'
node-version: '18'
cache: yarn
- name: Installation
run: yarn
- name: Generate test-website project against main branch
run: yarn test:build:website -s
env:
KEEP_CONTAINER: true
- name: Generate test-website project with ${{ matrix.variant }} against main branch
run: yarn test:build:website ${{ matrix.variant }}
- name: Install test-website project with Yarn Berry and nodeLinker = ${{ matrix.nodeLinker }}
run: |
yarn set version berry
# https://github.com/facebook/docusaurus/pull/6350#issuecomment-1013214763
# Remove this after Yarn 3.2
yarn set version canary
yarn config set nodeLinker ${{ matrix.nodeLinker }}
yarn config set npmRegistryServer http://localhost:4873
@ -83,41 +98,48 @@ jobs:
# https://yarnpkg.com/features/pnp#fallback-mode
yarn config set pnpFallbackMode none
# Patch package so that peer deps are provided. This has been fixed in terser by making acorn a direct dependency
# TODO watch out for the next terser release. Commit: https://github.com/terser/terser/commit/05b23eeb682d732484ad51b19bf528258fd5dc2a
yarn config set packageExtensions --json '{"terser-webpack-plugin@*": {"dependencies": {"acorn": "^8.6.0"}}, "html-minifier-terser@*": {"dependencies": {"acorn": "^8.6.0"}}}'
yarn install
working-directory: ../test-website
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false # Yarn berry should create the lockfile, despite CI env
- name: Install missing dependencies
if: matrix.variant == '-st' && matrix.nodeLinker == 'pnp'
run: |
# These dependencies are referenced in the init project, not by our packages
yarn add @docusaurus/theme-classic @docusaurus/types @types/node
yarn config set packageExtensions --json '{ "unified@^9.2.2": { "dependencies": { "@types/unist": "^2.0.6" } } }'
working-directory: ../test-website
- name: Start test-website project
run: yarn start --no-open
working-directory: ../test-website
env:
E2E_TEST: true
- name: Type check
# TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later.
if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp'
run: yarn typecheck
working-directory: ../test-website
- name: Build test-website project
run: yarn build
working-directory: ../test-website
npm:
name: E2E — NPM
name: E2E — npm
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js 18
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '16'
node-version: '18'
cache: yarn
- name: Installation
run: yarn
- name: Generate test-website project against main branch
run: yarn test:build:website -s
env:
KEEP_CONTAINER: true
- name: Install test-website project with NPM
- name: Install test-website project with npm
run: npm install
working-directory: ../test-website
env:
@ -132,31 +154,31 @@ jobs:
working-directory: ../test-website
pnpm:
name: E2E — PNPM
name: E2E — pnpm
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js 18
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '16'
node-version: '18'
cache: yarn
- name: Installation
run: yarn
- name: Generate test-website project against main branch
run: yarn test:build:website -s
env:
KEEP_CONTAINER: true
- name: Install test-website project with PNPM
- name: Install test-website project with pnpm
run: |
curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
pnpm install
npm install -g pnpm
# Fix some peer dependencies errors
pnpm add @algolia/client-search @types/react@17 typescript
working-directory: ../test-website
env:
npm_config_registry: http://localhost:4873
- name: Start test-website project
run: pnpm run start -- --no-open
run: pnpm start --no-open
working-directory: ../test-website
env:
E2E_TEST: true

46
.github/workflows/tests-swizzle.yml vendored Normal file
View File

@ -0,0 +1,46 @@
name: Swizzle Tests
on:
pull_request:
branches:
- main
- docusaurus-v**
paths:
- packages/**
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
name: Swizzle
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
matrix:
action: ['eject', 'wrap']
variant: ['js', 'ts']
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '18'
cache: yarn
- name: Installation
run: yarn
# Swizzle all the theme components
- name: Swizzle (${{matrix.action}} - ${{matrix.variant}})
run: yarn workspace website test:swizzle:${{matrix.action}}:${{matrix.variant}}
# Build swizzled site
- name: Build website
run: yarn build:website:fast
# Ensure swizzled site still typechecks
- name: TypeCheck website
run: yarn workspace website typecheck

View File

@ -4,8 +4,20 @@ on:
pull_request:
branches:
- main
paths-ignore:
- website/**
- docusaurus-v**
paths:
- package.json
- yarn.lock
- jest.config.mjs
- packages/**
- tsconfig.json
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
windows-test:
@ -14,13 +26,14 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
node: ['14', '16', '17']
node: ['18.0', '18', '20']
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node }}
- name: Installation
@ -34,5 +47,10 @@ jobs:
mkdir -p "website/_dogfooding/_pages tests/deep-file-path-test/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar"
cd "$_"
echo "# hello" > test-file.md
# Lightweight version of tests-swizzle.yml workflow, but for Windows
- name: Swizzle Wrap TS
run: yarn workspace website test:swizzle:wrap:ts
- name: Docusaurus Build
run: yarn build:website --locale en
run: yarn build:website:fast
- name: TypeCheck website
run: yarn workspace website typecheck

View File

@ -4,8 +4,20 @@ on:
pull_request:
branches:
- main
paths-ignore:
- website/**
- docusaurus-v**
paths:
- package.json
- yarn.lock
- jest.config.mjs
- packages/**
- tsconfig.json
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
@ -14,11 +26,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['14', '16', '17']
node: ['18.0', '18', '20']
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node }}
cache: yarn
@ -27,4 +40,8 @@ jobs:
- name: Test
run: yarn test
- name: TypeCheck website
run: yarn workspace website tsc
run: yarn workspace website typecheck
- name: Remove Theme Internal Re-export
run: yarn workspace @docusaurus/theme-common removeThemeInternalReexport
- name: Docusaurus Build
run: yarn build:website:fast

12
.gitignore vendored
View File

@ -1,12 +1,15 @@
.DS_Store
.vscode
.vscode/*
!.vscode/extensions.json
.idea
*.iml
*.code-workspace
.changelog
.history
node_modules
.yarn
package-lock.json
.eslintcache
@ -23,13 +26,18 @@ packages/create-docusaurus/lib/
packages/lqip-loader/lib/
packages/docusaurus/lib/
packages/docusaurus-*/lib/*
packages/eslint-plugin/lib/
packages/stylelint-copyright/lib/
packages/docusaurus-*/lib-next/
website/netlifyDeployPreview/*
website/changelog
!website/netlifyDeployPreview/index.html
!website/netlifyDeployPreview/_redirects
website/_dogfooding/_swizzle_theme_tests
CrowdinTranslations_*.zip
website/i18n/**/*
#!website/i18n/fr
#!website/i18n/fr/**/*

5
.husky/pre-commit vendored
View File

@ -1,4 +1,7 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn lint-staged --allow-empty
# Workaround of a mysterious bug in either lint-staged or husky.
# https://github.com/typicode/husky/issues/1134
# https://github.com/okonet/lint-staged/issues/693#issuecomment-1079759224
FORCE_COLOR=1 yarn lint-staged --allow-empty

5
.lintstagedrc.json Normal file
View File

@ -0,0 +1,5 @@
{
"*.{js,jsx,ts,tsx,mjs}": ["eslint --fix"],
"*.css": ["stylelint --allow-empty-input --fix"],
"*": ["prettier --ignore-unknown --write"]
}

2
.nvmrc
View File

@ -1 +1 @@
14.16.0
18

View File

@ -4,12 +4,15 @@ node_modules
build
coverage
.docusaurus
jest/vendor
packages/lqip-loader/lib/
packages/docusaurus/lib/
packages/docusaurus-*/lib/*
packages/docusaurus-*/lib-next/
packages/create-docusaurus/lib/*
packages/create-docusaurus/templates/*/docusaurus.config.js
packages/eslint-plugin/lib/
packages/stylelint-copyright/lib/
__fixtures__
@ -19,3 +22,7 @@ website/docusaurus.config.js
website/versioned_sidebars/*.json
examples/
website/static/katex/katex.min.css
website/changelog
website/_dogfooding/_swizzle_theme_tests

View File

@ -1,4 +1,8 @@
__fixtures__
# Stylelint runs on everything by default; we only lint CSS files.
*
!*/
!*.css
__tests__/
build
coverage
examples/
@ -6,6 +10,8 @@ examples/
packages/lqip-loader/lib/
packages/docusaurus/lib/
packages/docusaurus-*/lib/*
packages/docusaurus-*/lib-next/
packages/create-docusaurus/lib/*
packages/create-docusaurus/templates/
website/static/katex/katex.min.css
jest/vendor

8
.stylelintrc.js vendored
View File

@ -6,7 +6,7 @@
*/
module.exports = {
extends: ['stylelint-config-recommended', 'stylelint-config-prettier'],
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
plugins: ['stylelint-copyright'],
rules: {
'docusaurus/copyright-header': [
@ -26,5 +26,11 @@ module.exports = {
ignorePseudoClasses: ['global'],
},
],
'selector-class-pattern': null,
'custom-property-empty-line-before': null,
'selector-id-pattern': null,
'declaration-empty-line-before': null,
'comment-empty-line-before': null,
'value-keyword-case': ['lower', {camelCaseSvgKeywords: true}],
},
};

12
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,12 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
"recommendations": [
"streetsidesoftware.code-spell-checker",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint",
"EditorConfig.EditorConfig",
"Gruntfuggly.todo-tree"
],
"unwantedRecommendations": []
}

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,13 @@
# Contributing to Docusaurus
[Docusaurus](https://docusaurus.io) is our way to hopefully help to create open source documentation easier. We currently have [multiple open source projects using it](https://docusaurus.io/showcase), with many more planned. If you're interested in contributing to Docusaurus, hopefully, this document makes the process for contributing clear.
[Docusaurus](https://docusaurus.io) is our way to hopefully help make open source documentation easier. We currently have [multiple open source projects using it](https://docusaurus.io/showcase), with many more planned. If you're interested in contributing to Docusaurus, hopefully, this document makes the process for contributing clear.
The [Open Source Guides](https://opensource.guide/) website has a collection of resources for individuals, communities, and companies who want to learn how to run and contribute to an open source project. Contributors and people new to open source alike will find the following guides especially useful:
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
- [Building Welcoming Communities](https://opensource.guide/building-community/)
## [Code of Conduct](https://code.fb.com/codeofconduct)
## Code of Conduct
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.fb.com/codeofconduct) so that you can understand what actions will and will not be tolerated.
@ -15,9 +15,9 @@ Facebook has adopted a Code of Conduct that we expect project participants to ad
There are many ways to contribute to Docusaurus, and many of them do not involve writing any code. Here's a few ideas to get started:
- Simply start using Docusaurus. Go through the [Getting Started](https://docusaurus.io/docs/installation) guide. Does everything work as expected? If not, we're always looking for improvements. Let us know by [opening an issue](#reporting-new-issues).
- Simply start using Docusaurus. Go through the [Getting Started](https://docusaurus.io/docs/installation) guide. Does everything work as expected? If not, we're always looking for improvements. Let us know by [opening an issue](#issues).
- Look through the [open issues](https://github.com/facebook/docusaurus/issues). Provide workarounds, ask for clarification, or suggest labels. Help [triage issues](#triaging-issues-and-pull-requests).
- If you find an issue you would like to fix, [open a pull request](#your-first-pull-request). Issues tagged as [_Good first issue_](https://github.com/facebook/docusaurus/labels/Good%20first%20issue) are a good place to get started.
- If you find an issue you would like to fix, [open a pull request](#pull-requests). Issues tagged as [_Good first issue_](https://github.com/facebook/docusaurus/labels/Good%20first%20issue) are a good place to get started.
- Read through the [Docusaurus docs](https://docusaurus.io/docs/installation). If you find anything that is confusing or can be improved, you can click "Edit this page" at the bottom of most docs, which takes you to the GitHub interface to make and propose changes.
- Take a look at the [features requested](https://github.com/facebook/docusaurus/labels/feature) by others in the community and consider opening a pull request if you see something you want to work on.
@ -25,7 +25,7 @@ Contributions are very welcome. If you think you need help planning your contrib
### Join our Discord Channel
We have the [`#contributors`](https://discord.gg/6g6ASPA) channel on [Discord](https://discord.gg/docusaurus) to discuss all things about Docusaurus development. You can also be of great help by helping other users in the help channel.
We have the [`#contributors`](https://discord.gg/6g6ASPA) channel on [Discord](https://discord.gg/docusaurus) to discuss all things about Docusaurus development. You can also be of great help by helping other users in the [`#help-and-questions`](https://discord.gg/fwbcrQ3dHR) channel.
### Triaging Issues and Pull Requests
@ -46,24 +46,20 @@ All pull requests will be checked by the continuous integration system, GitHub a
Docusaurus has one primary branch `main` and we use feature branches with deploy previews to deliver new features with pull requests.
## Proposing a Change
If you would like to request a new feature or enhancement but are not yet thinking about opening a pull request, you can also file an issue with the [feature template](https://github.com/facebook/docusaurus/issues/new?assignees=&labels=feature%2Cneeds+triage&template=feature.yml).
If you intend to change the public API (e.g., something in `siteConfig.js`) or make any non-trivial changes to the implementation, we recommend filing an issue with the [proposal template](https://github.com/facebook/docusaurus/issues/new?assignees=&labels=proposal%2Cneeds+triage&template=proposal.yml). This lets us reach an agreement on your proposal before you put significant effort into it. These types of issues should be rare.
If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend [filing an issue](https://github.com/facebook/docusaurus/issues/new?assignees=&labels=bug%2Cneeds+triage&template=bug.yml) detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue.
### Reporting New Issues
## Issues
When [opening a new issue](https://github.com/facebook/docusaurus/issues/new/choose), always make sure to fill out the issue template. **This step is very important!** Not doing so may result in your issue not being managed in a timely fashion. Don't take this personally if this happens, and feel free to open a new issue once you've gathered all the information required by the template.
**Please don't use the GitHub issue tracker for questions.** If you have questions about using Docusaurus, use any of our [support channels](https://docusaurus.io/community/support), and we will do our best to answer your questions.
### Bugs
We use [GitHub Issues](https://github.com/facebook/docusaurus/issues) for our public bugs. If you would like to report a problem, take a look around and see if someone already opened an issue about it. If you are certain this is a new, unreported bug, you can submit a [bug report](https://github.com/facebook/docusaurus/issues/new?assignees=&labels=bug%2Cstatus%3A+needs+triage&template=bug.yml).
- **One issue, one bug:** Please report a single bug per issue.
- **Provide reproduction steps:** List all the steps necessary to reproduce the issue. The person reading your bug report should be able to follow these steps to reproduce your issue with minimal effort.
### Bugs
We use [GitHub Issues](https://github.com/facebook/docusaurus/issues) for our public bugs. If you would like to report a problem, take a look around and see if someone already opened an issue about it. If you are certain this is a new, unreported bug, you can submit a [bug report](#reporting-new-issues).
If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend filing an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue.
### Security Bugs
@ -71,40 +67,26 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
### Feature requests
You can also file issues as [feature requests or enhancements](https://github.com/facebook/docusaurus/labels/feature%20request) in the form of an **elaborated RFC**. If you see anything you'd like to be implemented, create an issue with [feature template](https://raw.githubusercontent.com/facebook/docusaurus/main/.github/ISSUE_TEMPLATE/feature.md)
If you would like to request a new feature or enhancement but are not yet thinking about opening a pull request, you can file an issue with the [feature template](https://github.com/facebook/docusaurus/issues/new?assignees=&labels=feature%2Cstatus%3A+needs+triage&template=feature.yml) in the form of an **elaborated RFC**. Alternatively, you can use the [Canny board](https://docusaurus.io/feature-requests) for more casual feature requests and gain enough traction before proposing an RFC.
### Questions
### Proposals
If you have questions about using Docusaurus, contact the Docusaurus Twitter account at [@docusaurus](https://twitter.com/docusaurus), and we will do our best to answer your questions.
If you intend to make any non-trivial changes to existing implementations, we recommend filing an issue with the [proposal template](https://github.com/facebook/docusaurus/issues/new?assignees=&labels=proposal%2Cstatus%3A+needs+triage&template=proposal.yml). This lets us reach an agreement on your proposal before you put significant effort into it. These types of issues should be rare.
## Pull Requests
### Your First Pull Request
So you have decided to contribute code back to upstream by opening a pull request. You've invested a good chunk of time, and we appreciate it. We will do our best to work with you and get the PR looked at.
Working on your first Pull Request? You can learn how from this free video series:
[**How to Contribute to an Open Source Project on GitHub**](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)
### Claiming issues
We have a list of [beginner-friendly issues](https://github.com/facebook/docusaurus/labels/good%20first%20issue) to help you get your feet wet in the Docusaurus codebase and familiar with our contribution process. This is a great place to get started.
### Versioned Docs
Apart from the `good first issue`, the following labels are also worth looking at:
If you only want to make content changes you just need to be aware of versioned docs.
- [`help wanted`](https://github.com/facebook/docusaurus/labels/help%20wanted): if you have specific knowledge in one domain, working on these issues can make your expertise shine.
- [`status: accepting pr`](https://github.com/facebook/docusaurus/labels/status%3A%20accepting%20pr): community contributors can feel free to claim any of these.
- `website/docs` - The files here are responsible for the "next" version at https://docusaurus.io/docs/next/installation.
- `website/versioned_docs/version-X.Y.Z` - These are the docs for the X.Y.Z version at https://docusaurus.io/docs/X.Y.Z/installation.
If you want to work on any of these issues, just drop a message saying "I'd like to work on this", and we will assign the issue to you and update the issue's status as "claimed". **You are expected to send a pull request within seven days** after that, so we can still delegate the issue to someone else if you are unavailable.
To make a fix to the published versions you must edit the corresponding markdown file in both folders. If you only made changes in `docs`, be sure to be viewing the `next` version to see the updates (ensure there's `next` in the URL).
Alternatively, when opening an issue, you can also click the "self service" checkbox to indicate that you'd like to work on the issue yourself, which will also make us see the issue as "claimed".
> Do not edit the auto-generated files within `versioned_docs/` or `versioned_sidebars/` unless you are sure it is necessary. For example, information about new features should not be documented in versioned docs. Edits made to older versions will not be propagated to newer versions of the docs.
### Installation
1. Ensure you have [Yarn](https://yarnpkg.com/) installed.
1. After cloning the repository, run `yarn install` in the root of the repository.
1. To start a development server, run `yarn workspace website start`.
## Development
### Online one-click setup for contributing
@ -120,74 +102,41 @@ So that you can start contributing straight away.
You can also try using the new [github.dev](https://github.dev/facebook/docusaurus) feature. While you are browsing any file, changing the domain name from `github.com` to `github.dev` will turn your browser into an online editor. You can start making changes and send pull requests right away.
### Sending a Pull Request
### Installation
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it. It is recommended to follow this [commit message style](#semantic-commit-messages).
1. Ensure you have [Yarn](https://yarnpkg.com/) installed.
2. After cloning the repository, run `yarn install` in the root of the repository. This will install all dependencies as well as build all local packages.
3. To start a development server, run `yarn workspace website start`.
### Code Conventions
- **Most important: Look around.** Match the style you see used in the rest of the project. This includes formatting, naming files, naming things in code, naming things in documentation, etc.
- "Attractive"
- We do have Prettier (a formatter) and ESLint (a syntax linter) to catch most stylistic problems. If you are working locally, they should automatically fix some issues during every git commit.
- **For documentation**: Do not wrap lines at 80 characters - configure your editor to soft-wrap when editing documentation.
Don't worry too much about styles in general—the maintainers will help you fix them as they review your code.
## Pull Requests
So you have decided to contribute code back to upstream by opening a pull request. You've invested a good chunk of time, and we appreciate it. We will do our best to work with you and get the PR looked at.
Working on your first Pull Request? You can learn how from this free video series:
[**How to Contribute to an Open Source Project on GitHub**](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)
Please make sure the following is done when submitting a pull request:
1. Fork [the repository](https://github.com/facebook/docusaurus) and create your branch from `main`.
1. Add the [copyright notice](#copyright-header-for-source-code) to the top of any code new files you've added.
1. Describe your [**test plan**](#test-plan) in your pull request description. Make sure to [test your changes](https://github.com/facebook/docusaurus/blob/main/admin/testing-changes-on-Docusaurus-itself.md)!
1. Make sure your code lints (`yarn prettier && yarn lint`).
1. Make sure your Jest tests pass (`yarn test`).
1. If you haven't already, [sign the CLA](https://code.facebook.com/cla).
1. **Keep your PR small.** Small pull requests (~300 lines of diff) are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
2. **Use descriptive titles.** It is recommended to follow this [commit message style](#semantic-commit-messages).
3. **Test your changes.** Describe your [**test plan**](#test-plan) in your pull request description.
4. **CLA.** If you haven't already, [sign the CLA](https://code.facebook.com/cla).
All pull requests should be opened against the `main` branch.
#### Test Plan
We have a lot of integration systems that run automated tests to guard against mistakes. The maintainers will also review your code and fix obvious issues for you. These systems' duty is to make you worry as little about the chores as possible. Your code contributions are more important than sticking to any procedures, although completing the checklist will surely save everyone's time.
A good test plan has the exact commands you ran and their output and provides screenshots or videos if the pull request changes UI. If you've changed APIs, update the documentation.
If you need help testing your changes locally, you can check out the doc on doing [local third-party testing](https://github.com/facebook/docusaurus/blob/main/admin/local-third-party-project-testing.md).
#### Breaking Changes
When adding a new breaking change, follow this template in your pull request:
```md
### New breaking change here
- **Who does this affect**:
- **How to migrate**:
- **Why make this breaking change**:
- **Severity (number of people affected x effort)**:
```
#### Copyright Header for Source Code
Copy and paste this to the top of your new file(s):
```js
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
```
#### Contributor License Agreement (CLA)
In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, the Facebook GitHub Bot will reply with a link to the CLA form. You may also [complete your CLA here](https://code.facebook.com/cla).
After you have signed the CLA, the CLA bot would automatically update the PR status. There's no need to open a new PR.
**CLAs are required for us to merge your pull request.** While we value your effort and are willing to wait for you to come back and address the reviews in case you are unavailable after sending the pull request, pull requests that are ready to merge but have CLA missing and no response from the author **will be closed within two weeks of opening**. If you have further questions about the CLA, please stay in touch with us.
If it happens that you were unavailable and your PR gets closed, feel free to reopen once it's ready! We are still happy to review it, help you complete it, and eventually merge it.
### What Happens Next?
The core Docusaurus team will be monitoring for pull requests. Do help us by keeping pull requests consistent by following the guidelines above.
## Style Guide
[Prettier](https://prettier.io) will catch most styling issues that may exist in your code. You can check the status of your code styling by simply running `yarn prettier`.
However, there are still some styles that Prettier cannot pick up.
## Semantic Commit Messages
### Semantic Commit Messages
See how a minor change to your commit message style can make you a better programmer.
@ -205,35 +154,79 @@ The various types of commits:
- `chore`: upgrading dependencies, releasing new versions... Chores that are **regularly done** for maintenance purposes.
- `misc`: anything else that doesn't change production code, yet is not `test` or `chore`. e.g. updating GitHub actions workflow.
Do not get too stressed about PR titles, however. The maintainers will help you get them right, and we also have a PR label system that doesn't equate with the commit message types. Your code is more important than conventions!
Do not get too stressed about PR titles, however. Your PR will be squash-merged and your commit to the `main` branch will get the title of your PR, so commits within a branch don't need to be semantically named. The maintainers will help you get the PR title right, and we also have a PR label system that doesn't equate with the commit message types. Your code is more important than conventions!
### Example
Example:
```
feat(core): allow overriding of webpack config
^--^^----^ ^------------^
| | |
| | +-> Summary in present tense.
| | +-> Summary in present tense. Use lower case not title case!
| |
| +-> The package(s) that this change affected.
|
+-------> Type: see below for the list we use.
+-------> Type: see above for the list we use.
```
Use lower case not title case!
### Versioned Docs
## Code Conventions
If you only want to make doc changes, you just need to be aware of versioned docs.
### General
- `website/docs` - The files here are responsible for the "next" version at https://docusaurus.io/docs/next/installation.
- `website/versioned_docs/version-X.Y.Z` - These are the docs for the X.Y.Z version at https://docusaurus.io/docs/X.Y.Z/installation.
- **Most important: Look around.** Match the style you see used in the rest of the project. This includes formatting, naming files, naming things in code, naming things in documentation, etc.
- "Attractive"
- We do have Prettier (a formatter) and ESLint (a syntax linter) to catch most stylistic problems. If you are working locally, they should automatically fix some issues during every git commit.
Do not edit the auto-generated files within `versioned_docs/` or `versioned_sidebars/` unless you are sure it is necessary. For example, information about new features should not be documented in versioned docs. Edits made to older versions will not be propagated to newer versions of the docs.
### Documentation
### Test Plan
- Do not wrap lines at 80 characters - configure your editor to soft-wrap when editing documentation.
A good test plan has the exact commands you ran and their output and provides screenshots or videos if the pull request changes UI. If you've changed APIs, update the documentation.
## License
Tests are integrated into our continuous integration system, so you don't always need to run local tests. However, for significant code changes, it saves both your and the maintainers' time if you can do exhaustive tests locally first to make sure your PR is in good shape. There are many types of tests:
By contributing to Docusaurus, you agree that your contributions will be licensed under its MIT license.
- **Build and typecheck.** We use TypeScript in our codebase, which can make sure your code is consistent and catches some obvious mistakes early.
- **Unit tests.** We use [Jest](https://jestjs.io/) for unit tests of API endpoints' behavior. You can run `yarn test` in the root directory to run all tests, or `yarn test path/to/your/file.test.ts` to run a specific test.
- **Dogfooding.** Our website itself covers all kinds of potential configuration cases and we even have a dedicated [tests area](https://docusaurus.io/tests). Don't be afraid to update our website's configuration in your PR—it can help the maintainers preview the effects. We can decide if the website change should be kept when merging and deploying for production.
- **E2E tests.** You can simulate the distribution and installation of the code with your fresh changes. If you need help testing your changes locally, you can check out the doc on doing [local third-party testing](https://github.com/facebook/docusaurus/blob/main/admin/local-third-party-project-testing.md).
### Licensing
By contributing to Docusaurus, you agree that your contributions will be licensed under its MIT license. Copy and paste this to the top of your new file(s):
```js
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
```
This is also auto-fixable with the `header/header` ESLint rule.
### Contributor License Agreement (CLA)
In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, the Facebook GitHub Bot will reply with a link to the CLA form. You may also [complete your CLA here](https://code.facebook.com/cla).
After you have signed the CLA, the CLA bot would automatically update the PR status. There's no need to open a new PR.
**CLAs are required for us to merge your pull request.** While we value your effort and are willing to wait for you to come back and address the reviews in case you are unavailable after sending the pull request, pull requests that are ready to merge but have CLA missing and no response from the author **will be closed within two weeks of opening**. If you have further questions about the CLA, please stay in touch with us.
If it happens that you were unavailable and your PR gets closed, feel free to reopen once it's ready! We are still happy to review it, help you complete it, and eventually merge it.
### Breaking Changes
When adding a new breaking change, follow this template in your pull request:
```md
### New breaking change here
- **Who does this affect**:
- **How to migrate**:
- **Why make this breaking change**:
- **Severity (number of people affected x effort)**:
```
### What Happens Next?
The core Docusaurus team will be monitoring pull requests. Do help us by keeping pull requests consistent by following the guidelines above.

View File

@ -1,28 +1,32 @@
<h1 align="center">
<p align="center">Docusaurus</p>
<a href="https://docusaurus.io"><img src="https://docusaurus.io/img/slash-introducing.svg" alt="Docusaurus"></a>
</h1>
<div align="center">
<h1 align="center">
Docusaurus
<br />
<br />
<a href="https://docusaurus.io">
<img src="https://docusaurus.io/img/slash-introducing.svg" alt="Docusaurus">
</a>
</h1>
</div>
<p align="center">
<a href="https://twitter.com/docusaurus"><img src="https://img.shields.io/twitter/follow/docusaurus.svg?style=social" align="right" alt="Twitter Follow" /></a>
<a href="#backers" alt="sponsors on Open Collective"><img src="https://opencollective.com/Docusaurus/backers/badge.svg" /></a>
<a href="#sponsors" alt="Sponsors on Open Collective"><img src="https://opencollective.com/Docusaurus/sponsors/badge.svg" /></a>
<a href="https://www.npmjs.com/package/@docusaurus/core"><img src="https://img.shields.io/npm/v/@docusaurus/core.svg?style=flat" alt="npm version"></a>
<a href="https://github.com/facebook/docusaurus/actions/workflows/tests.yml"><img src="https://github.com/facebook/docusaurus/actions/workflows/tests.yml/badge.svg" alt="Github Actions status"></a>
<a href="https://github.com/facebook/docusaurus/actions/workflows/tests.yml"><img src="https://github.com/facebook/docusaurus/actions/workflows/tests.yml/badge.svg" alt="GitHub Actions status"></a>
<a href="CONTRIBUTING.md#pull-requests"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
<a href="https://discord.gg/docusaurus"><img src="https://img.shields.io/discord/102860784329052160.svg" align="right" alt="Discord Chat" /></a>
<a href= "https://github.com/prettier/prettier"><img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg"></a>
<a href="#license"><img src="https://img.shields.io/github/license/sourcerer-io/hall-of-fame.svg?colorB=ff0000"></a>
<a href="https://github.com/facebook/jest"><img src="https://img.shields.io/badge/tested_with-jest-99424f.svg" alt="Tested with Jest"></a>
<a href="https://argos-ci.com" target="_blank" rel="noreferrer noopener" aria-label="Covered by Argos"><img src="https://argos-ci.com/badge.svg" alt="Covered by Argos" width="133" height="20" /></a>
<a href="https://gitpod.io/#https://github.com/facebook/docusaurus"><img src="https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod" alt="Gitpod Ready-to-Code"/></a>
<a href="https://app.netlify.com/sites/docusaurus-2/deploys"><img src="https://api.netlify.com/api/v1/badges/9e1ff559-4405-4ebe-8718-5e21c0774bc8/deploy-status" alt="Netlify Status"></a>
<a href="https://meercode.io/facebook/docusaurus"><img src="https://meercode.io/badge/facebook/docusaurus?type=ci-score" alt="CI Score"></a>
<a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Ffacebook%2Fdocusaurus%2Ftree%2Fmain%2Fexamples%2Fclassic&project-name=my-docusaurus-site&repo-name=my-docusaurus-site"><img src="https://vercel.com/button" alt="Deploy with Vercel"/></a>
<a href="https://app.netlify.com/start/deploy?repository=https://github.com/slorber/docusaurus-starter"><img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify"></a>
</p>
> **We are working hard on Docusaurus v2. If you are new to Docusaurus, try using the new version instead of v1. See the [Docusaurus v2 website](https://docusaurus.io/) for more details.**
> Docusaurus v1 doc is available at [v1.docusaurus.io](https://v1.docusaurus.io) and code is available on branch [docusaurus-v1](https://github.com/facebook/docusaurus/tree/docusaurus-v1)
## Introduction
Docusaurus is a project for building, deploying, and maintaining open source project websites easily.
@ -45,17 +49,13 @@ Short on time? Check out our [5-minute tutorial ⏱️](https://tutorial.docusau
## Installation
Use the initialization cli to create your site:
Use the initialization CLI to create your site:
```bash
npm init docusaurus@latest [name] [template]
npm init docusaurus@latest
```
Example:
```bash
npm init docusaurus@latest my-website classic
```
[Read the docs](https://docusaurus.io/docs/installation) for any further information.
## Contributing
@ -107,7 +107,14 @@ The Docusaurus documentation (e.g., `.md` files in the `/docs` folder) is [Creat
## Special thanks
[![BrowserStack logo](./admin/img/browserstack-logo.png)](http://www.browserstack.com/)
<p>
<a href="http://www.browserstack.com/" target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./admin/img/browserstack-dark-mode-logo.svg#gh-dark-mode-only">
<img alt="BrowserStack logo" src="./admin/img/browserstack-light-mode-logo.svg#gh-light-mode-only" height="50px" />
</picture>
</a>
</p>
[BrowserStack](http://www.browserstack.com/) supports us with [free access for open source](https://www.browserstack.com/open-source).

View File

@ -5,37 +5,44 @@
* LICENSE file in the root directory of this source tree.
*/
import util from 'util';
import globCb from 'glob';
import fsCb from 'fs';
const glob = util.promisify(globCb);
const readFile = util.promisify(fsCb.readFile);
import fs from 'fs-extra';
import {Globby} from '@docusaurus/utils';
type PackageJsonFile = {
file: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
content: any;
content: {
name?: string;
private?: boolean;
version?: string;
repository?: {
type?: string;
url?: string;
directory?: string;
};
publishConfig?: {
access?: string;
};
};
};
async function getPackagesJsonFiles(): Promise<PackageJsonFile[]> {
const files = await glob('packages/*/package.json');
const files = await Globby('packages/*/package.json');
return Promise.all(
files.map(async (file) => ({
file,
content: JSON.parse(await readFile(file, 'utf8')),
})),
files.map((file) =>
fs
.readJSON(file)
.then((content: PackageJsonFile['content']) => ({file, content})),
),
);
}
describe('packages', () => {
test('should be found', async () => {
it('are found', async () => {
const packageJsonFiles = await getPackagesJsonFiles();
expect(packageJsonFiles.length).toBeGreaterThan(0);
});
test('should contain repository and directory for every package', async () => {
it('contain repository and directory', async () => {
const packageJsonFiles = await getPackagesJsonFiles();
packageJsonFiles
@ -51,25 +58,27 @@ describe('packages', () => {
/*
If a package starts with @, if won't be published to public npm registry
without an additional publishConfig.acces: "public" config
without an additional publishConfig.access: "public" config
This will make you publish an incomplete list of Docusaurus packages
when trying to release with lerna-publish
*/
test('should have publishConfig.access: "public" when name starts with @', async () => {
it('have publishConfig.access: "public" when name starts with @', async () => {
const packageJsonFiles = await getPackagesJsonFiles();
packageJsonFiles
.filter((packageJsonFile) => packageJsonFile.content.name.startsWith('@'))
.filter((packageJsonFile) =>
packageJsonFile.content.name?.startsWith('@'),
)
.forEach((packageJsonFile) => {
if (packageJsonFile) {
// Unfortunately jest custom message do not exist in loops, so using an exception instead to show failing package file
// (see https://github.com/facebook/jest/issues/3293)
// expect(packageJsonFile.content.publishConfig?.access).toEqual('public');
if (packageJsonFile.content.publishConfig?.access !== 'public') {
throw new Error(
`Package ${packageJsonFile.file} does not have publishConfig.access: 'public'`,
);
}
// Unfortunately jest custom message do not exist in loops,
// so using an exception instead to show failing package file
// (see https://github.com/facebook/jest/issues/3293)
// expect(packageJsonFile.content.publishConfig?.access)
// .toEqual('public');
if (packageJsonFile.content.publishConfig?.access !== 'public') {
throw new Error(
`Package ${packageJsonFile.file} does not have publishConfig.access: 'public'`,
);
}
});
});

View File

@ -0,0 +1,68 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import fs from 'fs-extra';
import {Globby} from '@docusaurus/utils';
import {Joi} from '@docusaurus/utils-validation';
type TsconfigFile = {
file: string;
content: {
extends?: string;
compilerOptions: {
[key: string]: unknown;
};
};
};
async function getTsconfigFiles(): Promise<TsconfigFile[]> {
const files = await Globby('packages/*/tsconfig.*');
return Promise.all(
files.map((file) =>
fs
.readJSON(file)
.then((content: TsconfigFile['content']) => ({file, content})),
),
);
}
const tsconfigSchema = Joi.object({
extends: '../../tsconfig.json',
compilerOptions: Joi.alternatives().conditional(
Joi.object({noEmit: true}).unknown(),
{
then: Joi.object({
noEmit: Joi.valid(true).required(),
incremental: Joi.forbidden(),
tsBuildInfoFile: Joi.forbidden(),
outDir: Joi.forbidden(),
}).unknown(),
otherwise: Joi.object({
noEmit: Joi.valid(false).required(),
incremental: Joi.valid(true).required(),
rootDir: Joi.valid('src').required(),
outDir: Joi.valid('lib').required(),
}).unknown(),
},
),
}).unknown();
describe('tsconfig files', () => {
it('contain all required fields', async () => {
const tsconfigFiles = await getTsconfigFiles();
tsconfigFiles.forEach((file) => {
try {
Joi.attempt(file.content, tsconfigSchema);
} catch (e) {
(
e as Error
).message += `\n${file.file} does not match the required schema.`;
throw e;
}
});
});
});

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="180px" height="32px" viewBox="0 0 180 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-40.000000, -16.000000)">
<g transform="translate(40.000000, 16.000000)">
<g>
<g>
<path d="M31.0344828,15.5172414 C31.0344828,24.0874296 24.0874296,31.0344828 15.5172414,31.0344828 C6.94734717,31.0344828 0,24.0874296 0,15.5172414 C0,6.94734717 6.94734717,0 15.5172414,0 C24.0874296,0 31.0344828,6.94734717 31.0344828,15.5172414" id="Fill-1" fill="#ECB360"></path>
<path d="M26.8965517,13.9655172 C26.8965517,21.6784019 20.8752148,27.9310345 13.4482759,27.9310345 C6.02105363,27.9310345 0,21.6784019 0,13.9655172 C0,6.25263261 6.02105363,0 13.4482759,0 C20.8752148,0 26.8965517,6.25263261 26.8965517,13.9655172" id="Fill-2" fill="#D76835"></path>
<path d="M27.9310345,12.4136422 C27.9310345,19.2697074 22.6047339,24.8275862 16.034049,24.8275862 C9.4642316,24.8275862 4.13793103,19.2697074 4.13793103,12.4136422 C4.13793103,5.55787885 9.4642316,0 16.034049,0 C22.6047339,0 27.9310345,5.55787885 27.9310345,12.4136422" id="Fill-3" fill="#D33A41"></path>
<path d="M26.8965517,13.4484262 C26.8965517,19.7327316 22.0332814,24.8275862 16.0343393,24.8275862 C10.0353971,24.8275862 5.17241379,19.7327316 5.17241379,13.4484262 C5.17241379,7.16351943 10.0353971,2.06896552 16.0343393,2.06896552 C22.0332814,2.06896552 26.8965517,7.16351943 26.8965517,13.4484262" id="Fill-4" fill="#B6CB46"></path>
<path d="M25.862069,14.4826111 C25.862069,20.1959217 21.2304045,24.8275862 15.5170939,24.8275862 C9.80407825,24.8275862 5.17241379,20.1959217 5.17241379,14.4826111 C5.17241379,8.76930045 9.80407825,4.13793103 15.5170939,4.13793103 C21.2304045,4.13793103 25.862069,8.76930045 25.862069,14.4826111" id="Fill-5" fill="#66AD4A"></path>
<path d="M21.7241379,12.4137931 C21.7241379,16.9844178 18.0189006,20.6896552 13.4482759,20.6896552 C8.87737075,20.6896552 5.17241379,16.9844178 5.17241379,12.4137931 C5.17241379,7.84316841 8.87737075,4.13793103 13.4482759,4.13793103 C18.0189006,4.13793103 21.7241379,7.84316841 21.7241379,12.4137931" id="Fill-6" fill="#AED7DC"></path>
<path d="M22.7586207,11.3793103 C22.7586207,15.3784867 19.5166452,18.6206897 15.5170948,18.6206897 C11.5175443,18.6206897 8.27586207,15.3784867 8.27586207,11.3793103 C8.27586207,7.37984085 11.5175443,4.13793103 15.5170948,4.13793103 C19.5166452,4.13793103 22.7586207,7.37984085 22.7586207,11.3793103" id="Fill-7" fill="#5BB1CF"></path>
<path d="M22.7586207,11.8963967 C22.7586207,15.6100389 19.9797805,18.6206897 16.5517241,18.6206897 C13.1236677,18.6206897 10.3448276,15.6100389 10.3448276,11.8963967 C10.3448276,8.18306453 13.1236677,5.17241379 16.5517241,5.17241379 C19.9797805,5.17241379 22.7586207,8.18306453 22.7586207,11.8963967" id="Fill-8" fill="#25A8C3"></path>
<path d="M20.6896552,12.9308813 C20.6896552,16.0732337 18.3737862,18.6206897 15.5171021,18.6206897 C12.6606966,18.6206897 10.3448276,16.0732337 10.3448276,12.9308813 C10.3448276,9.78852889 12.6606966,7.24137931 15.5171021,7.24137931 C18.3737862,7.24137931 20.6896552,9.78852889 20.6896552,12.9308813" id="Fill-9"></path>
<path d="M15.5171021,18.6206897 C12.6606966,18.6206897 10.3448276,16.0732337 10.3448276,12.9308813 C10.3448276,9.78852889 12.6606966,7.24137931 15.5171021,7.24137931 C18.3737862,7.24137931 20.6896552,9.78852889 20.6896552,12.9308813 C20.6896552,16.0732337 18.3737862,18.6206897 15.5171021,18.6206897 Z" id="Fill-11" fill="#1B1A18"></path>
<path d="M18.3395432,11.2904163 C17.8474621,12.1136138 16.8799806,12.5897073 16.1782532,12.3530843 C15.4765258,12.116746 15.3066858,11.2573859 15.7983878,10.4339036 C16.2904689,9.61042129 17.2579504,9.13461253 17.9596778,9.37095081 C18.6614052,9.60728909 18.8312452,10.4666492 18.3395432,11.2904163" id="Fill-12" fill="#FFFFFE"></path>
</g>
<g transform="translate(40.344828, 7.241379)" fill="#FFFFFF">
<path d="M117.326492,14.0927618 C117.079145,13.39893 116.955659,12.5196449 116.955659,11.3399025 C116.955659,10.16016 117.079145,9.28125569 117.326492,8.58704314 C118.018463,6.59770338 119.848911,5.51049721 122.247091,5.51049721 C124.027467,5.51049721 125.43701,6.18109969 126.376328,7.24545739 C126.450871,7.33799367 126.475343,7.47698851 126.351857,7.56952479 L124.793981,8.84142273 C124.670496,8.93395901 124.546634,8.91111055 124.447996,8.79534499 C123.854663,8.17082025 123.236482,7.82390438 122.247091,7.82390438 C121.183911,7.82390438 120.367701,8.30981509 120.021339,9.28125569 C119.823687,9.83647341 119.774368,10.4842274 119.774368,11.3399025 C119.774368,12.1959583 119.823687,12.8669416 120.021339,13.4221593 C120.367701,14.3703706 121.183911,14.8562814 122.247091,14.8562814 C123.236482,14.8562814 123.854663,14.5093655 124.447996,13.8848407 C124.546634,13.7690752 124.670496,13.7690752 124.793981,13.8616115 L126.351857,15.1338902 C126.475343,15.2264265 126.450871,15.3421921 126.376328,15.4575768 C125.43701,16.4987052 124.027467,17.1696885 122.247091,17.1696885 C119.848911,17.1696885 118.018463,16.0824824 117.326492,14.0927618" id="Fill-23"></path>
<path d="M136.031168,16.9153089 C135.858364,16.9153089 135.734502,16.8460019 135.635487,16.6837778 L132.61875,12.0108857 L131.011555,13.7458459 L131.011555,16.6837778 C131.011555,16.8227726 130.912917,16.9153089 130.764584,16.9153089 L128.489136,16.9153089 C128.341179,16.9153089 128.242165,16.8227726 128.242165,16.6837778 L128.242165,1.41567133 C128.242165,1.2770573 128.341179,1.18452102 128.489136,1.18452102 L130.764584,1.18452102 C130.912917,1.18452102 131.011555,1.2770573 131.011555,1.41567133 L131.011555,10.4842274 L135.09185,5.99640792 C135.239806,5.83418381 135.363668,5.7648768 135.561321,5.7648768 L138.083739,5.7648768 C138.232073,5.7648768 138.281392,5.90349083 138.182377,5.99640792 L134.399126,10.0676237 L138.751239,16.6837778 C138.825782,16.7763141 138.776087,16.9153089 138.627754,16.9153089 L136.031168,16.9153089" id="Fill-25"></path>
<path d="M3.44757063,14.5093655 L6.95900335,14.5093655 C8.5910459,14.5093655 9.50589328,13.6300804 9.50589328,12.3117239 C9.50589328,11.0162159 8.5910459,10.1373115 6.95900335,10.1373115 L3.44757063,10.1373115 C3.34893277,10.1373115 3.29923736,10.1833893 3.29923736,10.2759256 L3.29923736,14.3703706 C3.29923736,14.4629069 3.34893277,14.5093655 3.44757063,14.5093655 Z M6.81067007,7.73136809 C8.29437934,7.73136809 9.20922672,6.89854151 9.20922672,5.67234051 C9.20922672,4.42329105 8.29437934,3.59046447 6.81067007,3.59046447 L3.44757063,3.59046447 C3.34893277,3.59046447 3.29923736,3.63654221 3.29923736,3.7290785 L3.29923736,7.59237326 C3.29923736,7.68490955 3.34893277,7.73136809 3.44757063,7.73136809 L6.81067007,7.73136809 Z M0.381514233,1.41567133 C0.381514233,1.2770573 0.480528579,1.18452102 0.628485378,1.18452102 L6.88483671,1.18452102 C10.4455884,1.18452102 12.1269498,2.85017418 12.1269498,5.37150238 C12.1269498,7.1529211 11.2369502,8.17082025 10.173393,8.7028087 L10.173393,8.74926725 C11.2121025,9.11903159 12.4236164,10.3684619 12.4236164,12.2884946 C12.4236164,15.4114991 10.3217263,16.9153089 6.63748909,16.9153089 L0.628485378,16.9153089 C0.480528579,16.9153089 0.381514233,16.8227726 0.381514233,16.6837778 L0.381514233,1.41567133 Z" id="Fill-13"></path>
<path d="M14.4750581,16.9153089 C14.3263484,16.9153089 14.227334,16.8227726 14.227334,16.6837778 L14.227334,5.99640792 C14.227334,5.85741309 14.3263484,5.7648768 14.4750581,5.7648768 L16.7497527,5.7648768 C16.898086,5.7648768 16.9971003,5.85741309 16.9971003,5.99640792 L16.9971003,6.94461925 L17.021948,6.94461925 C17.5904334,6.08894421 18.6042952,5.51049721 20.1128521,5.51049721 C21.0521708,5.51049721 21.9918658,5.85741309 22.6100467,6.43586008 C22.7339087,6.55124483 22.7587564,6.64416193 22.6593656,6.75954668 L21.3488373,8.30981509 C21.2501994,8.42519984 21.1263374,8.44842911 21.0028518,8.35589283 C20.4588376,8.03182542 19.8899758,7.82390438 19.2473237,7.82390438 C17.6894478,7.82390438 16.9971003,8.864652 16.9971003,10.6460707 L16.9971003,16.6837778 C16.9971003,16.8227726 16.898086,16.9153089 16.7497527,16.9153089 L14.4750581,16.9153089" id="Fill-14"></path>
<path d="M30.2623873,13.39893 C30.460416,12.820483 30.509735,12.2884946 30.509735,11.3399025 C30.509735,10.3916911 30.460416,9.88255115 30.2623873,9.28125569 C29.9160254,8.35589283 29.1498877,7.82390438 28.0370117,7.82390438 C26.9241356,7.82390438 26.1327738,8.35589283 25.7867883,9.28125569 C25.5891361,9.88255115 25.5394407,10.3916911 25.5394407,11.3399025 C25.5394407,12.2884946 25.5891361,12.820483 25.7867883,13.39893 C26.1327738,14.3242929 26.9241356,14.8562814 28.0370117,14.8562814 C29.1498877,14.8562814 29.9160254,14.3242929 30.2623873,13.39893 Z M23.1164128,14.0927618 C22.8442175,13.3063938 22.7207319,12.5661035 22.7207319,11.3399025 C22.7207319,10.1140823 22.8442175,9.37379198 23.1164128,8.58704314 C23.7839126,6.64416193 25.6136073,5.51049721 28.0370117,5.51049721 C30.4355683,5.51049721 32.2652631,6.64416193 32.9331393,8.58704314 C33.2049582,9.37379198 33.3288202,10.1140823 33.3288202,11.3399025 C33.3288202,12.5661035 33.2049582,13.3063938 32.9331393,14.0927618 C32.2652631,16.0360238 30.4355683,17.1696885 28.0370117,17.1696885 C25.6136073,17.1696885 23.7839126,16.0360238 23.1164128,14.0927618 Z" id="Fill-15"></path>
<path d="M45.3234858,16.9153089 C45.1747761,16.9153089 45.0761382,16.8227726 45.0264428,16.6837778 L42.7269005,9.55886455 L42.6775816,9.55886455 L40.3531916,16.6837778 C40.3034962,16.8227726 40.2048583,16.9153089 40.0561485,16.9153089 L38.0288016,16.9153089 C37.8800918,16.9153089 37.7814539,16.8227726 37.732135,16.6837778 L33.9733547,5.99640792 C33.9236592,5.85741309 33.9982024,5.7648768 34.1465356,5.7648768 L36.5202446,5.7648768 C36.6934256,5.7648768 36.7924399,5.83418381 36.8417589,5.99640792 L39.1413012,13.3528523 L39.1909966,13.3528523 L41.4656912,5.99640792 C41.5153866,5.85741309 41.6388721,5.7648768 41.7872054,5.7648768 L43.5675812,5.7648768 C43.7159145,5.7648768 43.8397766,5.85741309 43.8890955,5.99640792 L46.3124999,13.3528523 L46.3618188,13.3528523 L48.5378755,5.99640792 C48.5871945,5.83418381 48.6862088,5.7648768 48.8593898,5.7648768 L51.2330987,5.7648768 C51.381432,5.7648768 51.4555987,5.85741309 51.4062797,5.99640792 L47.6474994,16.6837778 C47.5981804,16.8227726 47.4991661,16.9153089 47.3508328,16.9153089 L45.3234858,16.9153089" id="Fill-16"></path>
<path d="M51.8938218,15.4114991 C51.795184,15.3189628 51.795184,15.1803488 51.8938218,15.0878125 L53.3033645,13.6997682 C53.4023788,13.6072319 53.5507121,13.6072319 53.6497264,13.6997682 C54.5152549,14.4400585 55.8999498,14.9720469 57.1363115,14.9720469 C58.595173,14.9720469 59.3368394,14.4168292 59.3368394,13.6533096 C59.3368394,12.9823263 58.9166873,12.5661035 57.3588114,12.4271086 L56.0727543,12.3117239 C53.6497264,12.0801928 52.4129883,10.9236796 52.4129883,9.0264953 C52.4129883,6.87531224 54.0698786,5.51049721 57.0372971,5.51049721 C58.8918396,5.51049721 60.4497155,6.08894421 61.5128961,6.87531224 C61.6367582,6.96784853 61.6367582,7.10646255 61.5625915,7.19899884 L60.3507011,8.56419467 C60.2520633,8.67957943 60.1282012,8.67957943 60.0047156,8.61027241 C59.2626728,8.12436171 58.0760065,7.68490955 56.8889638,7.68490955 C55.7019211,7.68490955 55.0837403,8.17082025 55.0837403,8.84142273 C55.0837403,9.48955754 55.5042689,9.88255115 57.0372971,10.021546 L58.3229777,10.1373115 C60.8205487,10.3684619 62.0075914,11.5714336 62.0075914,13.39893 C62.0075914,15.6198009 60.2765345,17.1696885 57.0124494,17.1696885 C54.5645738,17.1696885 52.8832123,16.2675549 51.8938218,15.4114991" id="Fill-17"></path>
<path d="M71.0995931,9.14226086 C70.7780788,8.24012727 69.8877027,7.70813882 68.7752031,7.70813882 C67.6378558,7.70813882 66.7474797,8.24012727 66.4263419,9.14226086 C66.326951,9.41986972 66.2776321,9.69747858 66.2776321,10.090853 C66.2776321,10.1833893 66.326951,10.2298478 66.4263419,10.2298478 L71.0995931,10.2298478 C71.1986075,10.2298478 71.2479264,10.1833893 71.2479264,10.090853 C71.2479264,9.69747858 71.1986075,9.41986972 71.0995931,9.14226086 Z M63.9039232,14.0695325 C63.6565755,13.3528523 63.4833946,12.4967965 63.4833946,11.3399025 C63.4833946,10.1833893 63.6321043,9.30448497 63.8790755,8.58704314 C64.5465752,6.64416193 66.37627,5.51049721 68.7503554,5.51049721 C71.1986075,5.51049721 72.9789833,6.69023967 73.646483,8.58704314 C73.9186784,9.37379198 74.0421639,10.1373115 74.0421639,11.9415787 C74.0421639,12.0801928 73.9431496,12.172729 73.7703451,12.172729 L66.4263419,12.172729 C66.326951,12.172729 66.2776321,12.2191876 66.2776321,12.3117239 C66.2776321,12.6354105 66.3517988,12.9130193 66.4508131,13.1673989 C66.846494,14.2549859 67.7861891,14.8562814 69.1211886,14.8562814 C70.4565646,14.8562814 71.3224695,14.3935999 71.9154261,13.7923045 C72.0392882,13.6765389 72.1627738,13.6533096 72.2862593,13.7458459 L73.7454974,14.9488176 C73.868983,15.0413539 73.868983,15.1571195 73.7703451,15.272885 C72.7564834,16.3829397 71.0747454,17.1696885 68.8742175,17.1696885 C66.3517988,17.1696885 64.5714229,16.0131753 63.9039232,14.0695325 Z" id="Fill-18"></path>
<path d="M76.0928527,16.9153089 C75.9448959,16.9153089 75.8458816,16.8227726 75.8458816,16.6837778 L75.8458816,5.99640792 C75.8458816,5.85741309 75.9448959,5.7648768 76.0928527,5.7648768 L78.3679238,5.7648768 C78.5166335,5.7648768 78.6152714,5.85741309 78.6152714,5.99640792 L78.6152714,6.94461925 L78.6401191,6.94461925 C79.2086045,6.08894421 80.2224662,5.51049721 81.7310232,5.51049721 C82.6707183,5.51049721 83.6100369,5.85741309 84.2282177,6.43586008 C84.3520798,6.55124483 84.376551,6.64416193 84.2779131,6.75954668 L82.9673849,8.30981509 C82.868747,8.42519984 82.7448849,8.44842911 82.6210229,8.35589283 C82.0773852,8.03182542 81.5085233,7.82390438 80.8658712,7.82390438 C79.3079953,7.82390438 78.6152714,8.864652 78.6152714,10.6460707 L78.6152714,16.6837778 C78.6152714,16.8227726 78.5166335,16.9153089 78.3679238,16.9153089 L76.0928527,16.9153089" id="Fill-19"></path>
<path d="M84.704089,15.0878125 C84.6050746,14.9952762 84.5557557,14.8562814 84.65477,14.7405158 L86.1877982,13.0748626 C86.2868126,12.9594779 86.4351458,12.9594779 86.5337837,13.0520142 C87.6221886,13.8616115 89.2293834,14.7172865 91.1083971,14.7172865 C93.1112728,14.7172865 94.2734678,13.7690752 94.2734678,12.4507187 C94.2734678,11.317054 93.5318014,10.5767637 91.2074114,10.2759256 L90.3170353,10.16016 C87.0781744,9.74393713 85.2481031,8.28620501 85.2481031,5.67234051 C85.2481031,2.8269449 87.4734788,0.930141431 90.9352161,0.930141431 C93.0371062,0.930141431 95.0399819,1.55466616 96.3753579,2.5028775 C96.49922,2.59579459 96.5240677,2.68833088 96.4250533,2.8269449 L95.2380106,4.5386758 C95.1393728,4.65444136 95.0155107,4.67767064 94.8916487,4.60836362 C93.5318014,3.77553704 92.2705921,3.38216262 90.8614259,3.38216262 C89.1548403,3.38216262 88.2155217,4.26144775 88.2155217,5.48726794 C88.2155217,6.57447411 89.0313547,7.3147644 91.3064258,7.61560253 L92.1968019,7.73136809 C95.4356628,8.14759098 97.2160387,9.58171302 97.2160387,12.2884946 C97.2160387,15.0878125 95.0648296,17.1696885 90.8858972,17.1696885 C88.4135504,17.1696885 86.0146172,16.2443257 84.704089,15.0878125" id="Fill-20"></path>
<path d="M102.339937,17.1118057 C99.9413803,17.1118057 99.0265329,16.0245996 99.0265329,13.8498064 L99.0265329,7.97432345 C99.0265329,7.88178716 98.9768375,7.83532861 98.8778232,7.83532861 L98.0864614,7.83532861 C97.9385046,7.83532861 97.8394902,7.74279233 97.8394902,7.60379749 L97.8394902,6.05390989 C97.8394902,5.91529587 97.9385046,5.82275958 98.0864614,5.82275958 L98.8778232,5.82275958 C98.9768375,5.82275958 99.0265329,5.77630103 99.0265329,5.68376475 L99.0265329,2.63006729 C99.0265329,2.49145326 99.1255473,2.39891698 99.2735041,2.39891698 L101.548575,2.39891698 C101.696908,2.39891698 101.795923,2.49145326 101.795923,2.63006729 L101.795923,5.68376475 C101.795923,5.77630103 101.845242,5.82275958 101.944256,5.82275958 L103.52698,5.82275958 C103.674936,5.82275958 103.773951,5.91529587 103.773951,6.05390989 L103.773951,7.60379749 C103.773951,7.74279233 103.674936,7.83532861 103.52698,7.83532861 L101.944256,7.83532861 C101.845242,7.83532861 101.795923,7.88178716 101.795923,7.97432345 L101.795923,13.757651 C101.795923,14.544019 102.142285,14.7983986 102.908799,14.7983986 L103.52698,14.7983986 C103.674936,14.7983986 103.773951,14.8909349 103.773951,15.0299297 L103.773951,16.8802746 C103.773951,17.0192695 103.674936,17.1118057 103.52698,17.1118057 L102.339937,17.1118057" id="Fill-21"></path>
<path d="M112.530885,13.1673989 L112.530885,12.3117239 C112.530885,12.2191876 112.48119,12.172729 112.382175,12.172729 L110.404147,12.172729 C108.623771,12.172729 107.83241,12.6354105 107.83241,13.6765389 C107.83241,14.6019018 108.549228,15.0645832 109.884604,15.0645832 C111.59119,15.0645832 112.530885,14.4400585 112.530885,13.1673989 Z M112.827175,16.9153089 C112.678842,16.9153089 112.580204,16.8227726 112.580204,16.6837778 L112.580204,15.8741805 L112.555356,15.8741805 C111.986494,16.6377001 110.873618,17.1696885 109.192633,17.1696885 C107.016577,17.1696885 105.186505,16.1057116 105.186505,13.7690752 C105.186505,11.3399025 107.016577,10.2298478 109.958771,10.2298478 L112.382175,10.2298478 C112.48119,10.2298478 112.530885,10.1833893 112.530885,10.090853 L112.530885,9.55886455 C112.530885,8.28620501 111.88748,7.70813882 109.884604,7.70813882 C108.549228,7.70813882 107.733395,8.05505469 107.164533,8.47165839 C107.041048,8.56419467 106.892714,8.5409654 106.818548,8.42519984 L105.9037,6.89854151 C105.829534,6.78277595 105.854382,6.66701039 105.953019,6.59770338 C106.917562,5.94994937 108.22809,5.51049721 110.181647,5.51049721 C113.816566,5.51049721 115.151942,6.66701039 115.151942,9.39702125 L115.151942,16.6837778 C115.151942,16.8227726 115.052551,16.9153089 114.904594,16.9153089 L112.827175,16.9153089 Z" id="Fill-22"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="180px" height="32px" viewBox="0 0 180 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-40.000000, -16.000000)">
<g transform="translate(40.000000, 16.000000)">
<g>
<g>
<path d="M31.0344828,15.5172414 C31.0344828,24.0874296 24.0874296,31.0344828 15.5172414,31.0344828 C6.94734717,31.0344828 0,24.0874296 0,15.5172414 C0,6.94734717 6.94734717,0 15.5172414,0 C24.0874296,0 31.0344828,6.94734717 31.0344828,15.5172414" id="Fill-1" fill="#ECB360"></path>
<path d="M26.8965517,13.9655172 C26.8965517,21.6784019 20.8752148,27.9310345 13.4482759,27.9310345 C6.02105363,27.9310345 0,21.6784019 0,13.9655172 C0,6.25263261 6.02105363,0 13.4482759,0 C20.8752148,0 26.8965517,6.25263261 26.8965517,13.9655172" id="Fill-2" fill="#D76835"></path>
<path d="M27.9310345,12.4136422 C27.9310345,19.2697074 22.6047339,24.8275862 16.034049,24.8275862 C9.4642316,24.8275862 4.13793103,19.2697074 4.13793103,12.4136422 C4.13793103,5.55787885 9.4642316,0 16.034049,0 C22.6047339,0 27.9310345,5.55787885 27.9310345,12.4136422" id="Fill-3" fill="#D33A41"></path>
<path d="M26.8965517,13.4484262 C26.8965517,19.7327316 22.0332814,24.8275862 16.0343393,24.8275862 C10.0353971,24.8275862 5.17241379,19.7327316 5.17241379,13.4484262 C5.17241379,7.16351943 10.0353971,2.06896552 16.0343393,2.06896552 C22.0332814,2.06896552 26.8965517,7.16351943 26.8965517,13.4484262" id="Fill-4" fill="#B6CB46"></path>
<path d="M25.862069,14.4826111 C25.862069,20.1959217 21.2304045,24.8275862 15.5170939,24.8275862 C9.80407825,24.8275862 5.17241379,20.1959217 5.17241379,14.4826111 C5.17241379,8.76930045 9.80407825,4.13793103 15.5170939,4.13793103 C21.2304045,4.13793103 25.862069,8.76930045 25.862069,14.4826111" id="Fill-5" fill="#66AD4A"></path>
<path d="M21.7241379,12.4137931 C21.7241379,16.9844178 18.0189006,20.6896552 13.4482759,20.6896552 C8.87737075,20.6896552 5.17241379,16.9844178 5.17241379,12.4137931 C5.17241379,7.84316841 8.87737075,4.13793103 13.4482759,4.13793103 C18.0189006,4.13793103 21.7241379,7.84316841 21.7241379,12.4137931" id="Fill-6" fill="#AED7DC"></path>
<path d="M22.7586207,11.3793103 C22.7586207,15.3784867 19.5166452,18.6206897 15.5170948,18.6206897 C11.5175443,18.6206897 8.27586207,15.3784867 8.27586207,11.3793103 C8.27586207,7.37984085 11.5175443,4.13793103 15.5170948,4.13793103 C19.5166452,4.13793103 22.7586207,7.37984085 22.7586207,11.3793103" id="Fill-7" fill="#5BB1CF"></path>
<path d="M22.7586207,11.8963967 C22.7586207,15.6100389 19.9797805,18.6206897 16.5517241,18.6206897 C13.1236677,18.6206897 10.3448276,15.6100389 10.3448276,11.8963967 C10.3448276,8.18306453 13.1236677,5.17241379 16.5517241,5.17241379 C19.9797805,5.17241379 22.7586207,8.18306453 22.7586207,11.8963967" id="Fill-8" fill="#25A8C3"></path>
<path d="M20.6896552,12.9308813 C20.6896552,16.0732337 18.3737862,18.6206897 15.5171021,18.6206897 C12.6606966,18.6206897 10.3448276,16.0732337 10.3448276,12.9308813 C10.3448276,9.78852889 12.6606966,7.24137931 15.5171021,7.24137931 C18.3737862,7.24137931 20.6896552,9.78852889 20.6896552,12.9308813" id="Fill-9"></path>
<path d="M15.5171021,18.6206897 C12.6606966,18.6206897 10.3448276,16.0732337 10.3448276,12.9308813 C10.3448276,9.78852889 12.6606966,7.24137931 15.5171021,7.24137931 C18.3737862,7.24137931 20.6896552,9.78852889 20.6896552,12.9308813 C20.6896552,16.0732337 18.3737862,18.6206897 15.5171021,18.6206897 Z" id="Fill-11" fill="#1B1A18"></path>
<path d="M18.3395432,11.2904163 C17.8474621,12.1136138 16.8799806,12.5897073 16.1782532,12.3530843 C15.4765258,12.116746 15.3066858,11.2573859 15.7983878,10.4339036 C16.2904689,9.61042129 17.2579504,9.13461253 17.9596778,9.37095081 C18.6614052,9.60728909 18.8312452,10.4666492 18.3395432,11.2904163" id="Fill-12" fill="#FFFFFE"></path>
</g>
<g transform="translate(40.344828, 7.241379)" fill="#202020">
<path d="M117.326492,14.0927618 C117.079145,13.39893 116.955659,12.5196449 116.955659,11.3399025 C116.955659,10.16016 117.079145,9.28125569 117.326492,8.58704314 C118.018463,6.59770338 119.848911,5.51049721 122.247091,5.51049721 C124.027467,5.51049721 125.43701,6.18109969 126.376328,7.24545739 C126.450871,7.33799367 126.475343,7.47698851 126.351857,7.56952479 L124.793981,8.84142273 C124.670496,8.93395901 124.546634,8.91111055 124.447996,8.79534499 C123.854663,8.17082025 123.236482,7.82390438 122.247091,7.82390438 C121.183911,7.82390438 120.367701,8.30981509 120.021339,9.28125569 C119.823687,9.83647341 119.774368,10.4842274 119.774368,11.3399025 C119.774368,12.1959583 119.823687,12.8669416 120.021339,13.4221593 C120.367701,14.3703706 121.183911,14.8562814 122.247091,14.8562814 C123.236482,14.8562814 123.854663,14.5093655 124.447996,13.8848407 C124.546634,13.7690752 124.670496,13.7690752 124.793981,13.8616115 L126.351857,15.1338902 C126.475343,15.2264265 126.450871,15.3421921 126.376328,15.4575768 C125.43701,16.4987052 124.027467,17.1696885 122.247091,17.1696885 C119.848911,17.1696885 118.018463,16.0824824 117.326492,14.0927618" id="Fill-23"></path>
<path d="M136.031168,16.9153089 C135.858364,16.9153089 135.734502,16.8460019 135.635487,16.6837778 L132.61875,12.0108857 L131.011555,13.7458459 L131.011555,16.6837778 C131.011555,16.8227726 130.912917,16.9153089 130.764584,16.9153089 L128.489136,16.9153089 C128.341179,16.9153089 128.242165,16.8227726 128.242165,16.6837778 L128.242165,1.41567133 C128.242165,1.2770573 128.341179,1.18452102 128.489136,1.18452102 L130.764584,1.18452102 C130.912917,1.18452102 131.011555,1.2770573 131.011555,1.41567133 L131.011555,10.4842274 L135.09185,5.99640792 C135.239806,5.83418381 135.363668,5.7648768 135.561321,5.7648768 L138.083739,5.7648768 C138.232073,5.7648768 138.281392,5.90349083 138.182377,5.99640792 L134.399126,10.0676237 L138.751239,16.6837778 C138.825782,16.7763141 138.776087,16.9153089 138.627754,16.9153089 L136.031168,16.9153089" id="Fill-25"></path>
<path d="M3.44757063,14.5093655 L6.95900335,14.5093655 C8.5910459,14.5093655 9.50589328,13.6300804 9.50589328,12.3117239 C9.50589328,11.0162159 8.5910459,10.1373115 6.95900335,10.1373115 L3.44757063,10.1373115 C3.34893277,10.1373115 3.29923736,10.1833893 3.29923736,10.2759256 L3.29923736,14.3703706 C3.29923736,14.4629069 3.34893277,14.5093655 3.44757063,14.5093655 Z M6.81067007,7.73136809 C8.29437934,7.73136809 9.20922672,6.89854151 9.20922672,5.67234051 C9.20922672,4.42329105 8.29437934,3.59046447 6.81067007,3.59046447 L3.44757063,3.59046447 C3.34893277,3.59046447 3.29923736,3.63654221 3.29923736,3.7290785 L3.29923736,7.59237326 C3.29923736,7.68490955 3.34893277,7.73136809 3.44757063,7.73136809 L6.81067007,7.73136809 Z M0.381514233,1.41567133 C0.381514233,1.2770573 0.480528579,1.18452102 0.628485378,1.18452102 L6.88483671,1.18452102 C10.4455884,1.18452102 12.1269498,2.85017418 12.1269498,5.37150238 C12.1269498,7.1529211 11.2369502,8.17082025 10.173393,8.7028087 L10.173393,8.74926725 C11.2121025,9.11903159 12.4236164,10.3684619 12.4236164,12.2884946 C12.4236164,15.4114991 10.3217263,16.9153089 6.63748909,16.9153089 L0.628485378,16.9153089 C0.480528579,16.9153089 0.381514233,16.8227726 0.381514233,16.6837778 L0.381514233,1.41567133 Z" id="Fill-13"></path>
<path d="M14.4750581,16.9153089 C14.3263484,16.9153089 14.227334,16.8227726 14.227334,16.6837778 L14.227334,5.99640792 C14.227334,5.85741309 14.3263484,5.7648768 14.4750581,5.7648768 L16.7497527,5.7648768 C16.898086,5.7648768 16.9971003,5.85741309 16.9971003,5.99640792 L16.9971003,6.94461925 L17.021948,6.94461925 C17.5904334,6.08894421 18.6042952,5.51049721 20.1128521,5.51049721 C21.0521708,5.51049721 21.9918658,5.85741309 22.6100467,6.43586008 C22.7339087,6.55124483 22.7587564,6.64416193 22.6593656,6.75954668 L21.3488373,8.30981509 C21.2501994,8.42519984 21.1263374,8.44842911 21.0028518,8.35589283 C20.4588376,8.03182542 19.8899758,7.82390438 19.2473237,7.82390438 C17.6894478,7.82390438 16.9971003,8.864652 16.9971003,10.6460707 L16.9971003,16.6837778 C16.9971003,16.8227726 16.898086,16.9153089 16.7497527,16.9153089 L14.4750581,16.9153089" id="Fill-14"></path>
<path d="M30.2623873,13.39893 C30.460416,12.820483 30.509735,12.2884946 30.509735,11.3399025 C30.509735,10.3916911 30.460416,9.88255115 30.2623873,9.28125569 C29.9160254,8.35589283 29.1498877,7.82390438 28.0370117,7.82390438 C26.9241356,7.82390438 26.1327738,8.35589283 25.7867883,9.28125569 C25.5891361,9.88255115 25.5394407,10.3916911 25.5394407,11.3399025 C25.5394407,12.2884946 25.5891361,12.820483 25.7867883,13.39893 C26.1327738,14.3242929 26.9241356,14.8562814 28.0370117,14.8562814 C29.1498877,14.8562814 29.9160254,14.3242929 30.2623873,13.39893 Z M23.1164128,14.0927618 C22.8442175,13.3063938 22.7207319,12.5661035 22.7207319,11.3399025 C22.7207319,10.1140823 22.8442175,9.37379198 23.1164128,8.58704314 C23.7839126,6.64416193 25.6136073,5.51049721 28.0370117,5.51049721 C30.4355683,5.51049721 32.2652631,6.64416193 32.9331393,8.58704314 C33.2049582,9.37379198 33.3288202,10.1140823 33.3288202,11.3399025 C33.3288202,12.5661035 33.2049582,13.3063938 32.9331393,14.0927618 C32.2652631,16.0360238 30.4355683,17.1696885 28.0370117,17.1696885 C25.6136073,17.1696885 23.7839126,16.0360238 23.1164128,14.0927618 Z" id="Fill-15"></path>
<path d="M45.3234858,16.9153089 C45.1747761,16.9153089 45.0761382,16.8227726 45.0264428,16.6837778 L42.7269005,9.55886455 L42.6775816,9.55886455 L40.3531916,16.6837778 C40.3034962,16.8227726 40.2048583,16.9153089 40.0561485,16.9153089 L38.0288016,16.9153089 C37.8800918,16.9153089 37.7814539,16.8227726 37.732135,16.6837778 L33.9733547,5.99640792 C33.9236592,5.85741309 33.9982024,5.7648768 34.1465356,5.7648768 L36.5202446,5.7648768 C36.6934256,5.7648768 36.7924399,5.83418381 36.8417589,5.99640792 L39.1413012,13.3528523 L39.1909966,13.3528523 L41.4656912,5.99640792 C41.5153866,5.85741309 41.6388721,5.7648768 41.7872054,5.7648768 L43.5675812,5.7648768 C43.7159145,5.7648768 43.8397766,5.85741309 43.8890955,5.99640792 L46.3124999,13.3528523 L46.3618188,13.3528523 L48.5378755,5.99640792 C48.5871945,5.83418381 48.6862088,5.7648768 48.8593898,5.7648768 L51.2330987,5.7648768 C51.381432,5.7648768 51.4555987,5.85741309 51.4062797,5.99640792 L47.6474994,16.6837778 C47.5981804,16.8227726 47.4991661,16.9153089 47.3508328,16.9153089 L45.3234858,16.9153089" id="Fill-16"></path>
<path d="M51.8938218,15.4114991 C51.795184,15.3189628 51.795184,15.1803488 51.8938218,15.0878125 L53.3033645,13.6997682 C53.4023788,13.6072319 53.5507121,13.6072319 53.6497264,13.6997682 C54.5152549,14.4400585 55.8999498,14.9720469 57.1363115,14.9720469 C58.595173,14.9720469 59.3368394,14.4168292 59.3368394,13.6533096 C59.3368394,12.9823263 58.9166873,12.5661035 57.3588114,12.4271086 L56.0727543,12.3117239 C53.6497264,12.0801928 52.4129883,10.9236796 52.4129883,9.0264953 C52.4129883,6.87531224 54.0698786,5.51049721 57.0372971,5.51049721 C58.8918396,5.51049721 60.4497155,6.08894421 61.5128961,6.87531224 C61.6367582,6.96784853 61.6367582,7.10646255 61.5625915,7.19899884 L60.3507011,8.56419467 C60.2520633,8.67957943 60.1282012,8.67957943 60.0047156,8.61027241 C59.2626728,8.12436171 58.0760065,7.68490955 56.8889638,7.68490955 C55.7019211,7.68490955 55.0837403,8.17082025 55.0837403,8.84142273 C55.0837403,9.48955754 55.5042689,9.88255115 57.0372971,10.021546 L58.3229777,10.1373115 C60.8205487,10.3684619 62.0075914,11.5714336 62.0075914,13.39893 C62.0075914,15.6198009 60.2765345,17.1696885 57.0124494,17.1696885 C54.5645738,17.1696885 52.8832123,16.2675549 51.8938218,15.4114991" id="Fill-17"></path>
<path d="M71.0995931,9.14226086 C70.7780788,8.24012727 69.8877027,7.70813882 68.7752031,7.70813882 C67.6378558,7.70813882 66.7474797,8.24012727 66.4263419,9.14226086 C66.326951,9.41986972 66.2776321,9.69747858 66.2776321,10.090853 C66.2776321,10.1833893 66.326951,10.2298478 66.4263419,10.2298478 L71.0995931,10.2298478 C71.1986075,10.2298478 71.2479264,10.1833893 71.2479264,10.090853 C71.2479264,9.69747858 71.1986075,9.41986972 71.0995931,9.14226086 Z M63.9039232,14.0695325 C63.6565755,13.3528523 63.4833946,12.4967965 63.4833946,11.3399025 C63.4833946,10.1833893 63.6321043,9.30448497 63.8790755,8.58704314 C64.5465752,6.64416193 66.37627,5.51049721 68.7503554,5.51049721 C71.1986075,5.51049721 72.9789833,6.69023967 73.646483,8.58704314 C73.9186784,9.37379198 74.0421639,10.1373115 74.0421639,11.9415787 C74.0421639,12.0801928 73.9431496,12.172729 73.7703451,12.172729 L66.4263419,12.172729 C66.326951,12.172729 66.2776321,12.2191876 66.2776321,12.3117239 C66.2776321,12.6354105 66.3517988,12.9130193 66.4508131,13.1673989 C66.846494,14.2549859 67.7861891,14.8562814 69.1211886,14.8562814 C70.4565646,14.8562814 71.3224695,14.3935999 71.9154261,13.7923045 C72.0392882,13.6765389 72.1627738,13.6533096 72.2862593,13.7458459 L73.7454974,14.9488176 C73.868983,15.0413539 73.868983,15.1571195 73.7703451,15.272885 C72.7564834,16.3829397 71.0747454,17.1696885 68.8742175,17.1696885 C66.3517988,17.1696885 64.5714229,16.0131753 63.9039232,14.0695325 Z" id="Fill-18"></path>
<path d="M76.0928527,16.9153089 C75.9448959,16.9153089 75.8458816,16.8227726 75.8458816,16.6837778 L75.8458816,5.99640792 C75.8458816,5.85741309 75.9448959,5.7648768 76.0928527,5.7648768 L78.3679238,5.7648768 C78.5166335,5.7648768 78.6152714,5.85741309 78.6152714,5.99640792 L78.6152714,6.94461925 L78.6401191,6.94461925 C79.2086045,6.08894421 80.2224662,5.51049721 81.7310232,5.51049721 C82.6707183,5.51049721 83.6100369,5.85741309 84.2282177,6.43586008 C84.3520798,6.55124483 84.376551,6.64416193 84.2779131,6.75954668 L82.9673849,8.30981509 C82.868747,8.42519984 82.7448849,8.44842911 82.6210229,8.35589283 C82.0773852,8.03182542 81.5085233,7.82390438 80.8658712,7.82390438 C79.3079953,7.82390438 78.6152714,8.864652 78.6152714,10.6460707 L78.6152714,16.6837778 C78.6152714,16.8227726 78.5166335,16.9153089 78.3679238,16.9153089 L76.0928527,16.9153089" id="Fill-19"></path>
<path d="M84.704089,15.0878125 C84.6050746,14.9952762 84.5557557,14.8562814 84.65477,14.7405158 L86.1877982,13.0748626 C86.2868126,12.9594779 86.4351458,12.9594779 86.5337837,13.0520142 C87.6221886,13.8616115 89.2293834,14.7172865 91.1083971,14.7172865 C93.1112728,14.7172865 94.2734678,13.7690752 94.2734678,12.4507187 C94.2734678,11.317054 93.5318014,10.5767637 91.2074114,10.2759256 L90.3170353,10.16016 C87.0781744,9.74393713 85.2481031,8.28620501 85.2481031,5.67234051 C85.2481031,2.8269449 87.4734788,0.930141431 90.9352161,0.930141431 C93.0371062,0.930141431 95.0399819,1.55466616 96.3753579,2.5028775 C96.49922,2.59579459 96.5240677,2.68833088 96.4250533,2.8269449 L95.2380106,4.5386758 C95.1393728,4.65444136 95.0155107,4.67767064 94.8916487,4.60836362 C93.5318014,3.77553704 92.2705921,3.38216262 90.8614259,3.38216262 C89.1548403,3.38216262 88.2155217,4.26144775 88.2155217,5.48726794 C88.2155217,6.57447411 89.0313547,7.3147644 91.3064258,7.61560253 L92.1968019,7.73136809 C95.4356628,8.14759098 97.2160387,9.58171302 97.2160387,12.2884946 C97.2160387,15.0878125 95.0648296,17.1696885 90.8858972,17.1696885 C88.4135504,17.1696885 86.0146172,16.2443257 84.704089,15.0878125" id="Fill-20"></path>
<path d="M102.339937,17.1118057 C99.9413803,17.1118057 99.0265329,16.0245996 99.0265329,13.8498064 L99.0265329,7.97432345 C99.0265329,7.88178716 98.9768375,7.83532861 98.8778232,7.83532861 L98.0864614,7.83532861 C97.9385046,7.83532861 97.8394902,7.74279233 97.8394902,7.60379749 L97.8394902,6.05390989 C97.8394902,5.91529587 97.9385046,5.82275958 98.0864614,5.82275958 L98.8778232,5.82275958 C98.9768375,5.82275958 99.0265329,5.77630103 99.0265329,5.68376475 L99.0265329,2.63006729 C99.0265329,2.49145326 99.1255473,2.39891698 99.2735041,2.39891698 L101.548575,2.39891698 C101.696908,2.39891698 101.795923,2.49145326 101.795923,2.63006729 L101.795923,5.68376475 C101.795923,5.77630103 101.845242,5.82275958 101.944256,5.82275958 L103.52698,5.82275958 C103.674936,5.82275958 103.773951,5.91529587 103.773951,6.05390989 L103.773951,7.60379749 C103.773951,7.74279233 103.674936,7.83532861 103.52698,7.83532861 L101.944256,7.83532861 C101.845242,7.83532861 101.795923,7.88178716 101.795923,7.97432345 L101.795923,13.757651 C101.795923,14.544019 102.142285,14.7983986 102.908799,14.7983986 L103.52698,14.7983986 C103.674936,14.7983986 103.773951,14.8909349 103.773951,15.0299297 L103.773951,16.8802746 C103.773951,17.0192695 103.674936,17.1118057 103.52698,17.1118057 L102.339937,17.1118057" id="Fill-21"></path>
<path d="M112.530885,13.1673989 L112.530885,12.3117239 C112.530885,12.2191876 112.48119,12.172729 112.382175,12.172729 L110.404147,12.172729 C108.623771,12.172729 107.83241,12.6354105 107.83241,13.6765389 C107.83241,14.6019018 108.549228,15.0645832 109.884604,15.0645832 C111.59119,15.0645832 112.530885,14.4400585 112.530885,13.1673989 Z M112.827175,16.9153089 C112.678842,16.9153089 112.580204,16.8227726 112.580204,16.6837778 L112.580204,15.8741805 L112.555356,15.8741805 C111.986494,16.6377001 110.873618,17.1696885 109.192633,17.1696885 C107.016577,17.1696885 105.186505,16.1057116 105.186505,13.7690752 C105.186505,11.3399025 107.016577,10.2298478 109.958771,10.2298478 L112.382175,10.2298478 C112.48119,10.2298478 112.530885,10.1833893 112.530885,10.090853 L112.530885,9.55886455 C112.530885,8.28620501 111.88748,7.70813882 109.884604,7.70813882 C108.549228,7.70813882 107.733395,8.05505469 107.164533,8.47165839 C107.041048,8.56419467 106.892714,8.5409654 106.818548,8.42519984 L105.9037,6.89854151 C105.829534,6.78277595 105.854382,6.66701039 105.953019,6.59770338 C106.917562,5.94994937 108.22809,5.51049721 110.181647,5.51049721 C113.816566,5.51049721 115.151942,6.66701039 115.151942,9.39702125 L115.151942,16.6837778 C115.151942,16.8227726 115.052551,16.9153089 114.904594,16.9153089 L112.827175,16.9153089 Z" id="Fill-22"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -10,11 +10,17 @@ import type {HandlerEvent, HandlerResponse} from '@netlify/functions';
const CookieName = 'DocusaurusPlaygroundName';
const PlaygroundConfigs = {
codesandbox: 'https://codesandbox.io/s/docusaurus',
codesandbox:
'https://codesandbox.io/p/sandbox/github/facebook/docusaurus/tree/main/examples/classic?file=%2FREADME.md&privacy=public',
'codesandbox-ts':
'https://codesandbox.io/p/sandbox/github/facebook/docusaurus/tree/main/examples/classic-typescript?file=%2FREADME.md&privacy=public',
// stackblitz: 'https://stackblitz.com/fork/docusaurus', // not updated
// stackblitz: 'https://stackblitz.com/github/facebook/docusaurus/tree/main/examples/classic', // slow to load
stackblitz: 'https://stackblitz.com/github/facebook/docusaurus/tree/starter', // dedicated branch: faster load
// Slow to load
// stackblitz: 'https://stackblitz.com/github/facebook/docusaurus/tree/main/examples/classic',
// Dedicated branch: faster load
stackblitz: 'https://stackblitz.com/github/facebook/docusaurus/tree/starter',
'stackblitz-ts':
'https://stackblitz.com/github/facebook/docusaurus/tree/main/examples/classic-typescript',
};
const PlaygroundDocumentationUrl = 'https://docusaurus.io/docs/playground';
@ -22,9 +28,11 @@ const PlaygroundDocumentationUrl = 'https://docusaurus.io/docs/playground';
export type PlaygroundName = keyof typeof PlaygroundConfigs;
function isValidPlaygroundName(
playgroundName: string,
playgroundName: string | undefined,
): playgroundName is PlaygroundName {
return Object.keys(PlaygroundConfigs).includes(playgroundName);
return (
!!playgroundName && Object.keys(PlaygroundConfigs).includes(playgroundName)
);
}
export function createPlaygroundDocumentationResponse(): HandlerResponse {
@ -50,10 +58,10 @@ export function createPlaygroundResponse(
}
// Inspired by https://stackoverflow.com/a/3409200/82609
function parseCookieString(cookieString: string): Record<string, string> {
const result: Record<string, string> = {};
function parseCookieString(cookieString: string): {[key: string]: string} {
const result: {[key: string]: string} = {};
cookieString.split(';').forEach((cookie) => {
const [name, value] = cookie.split('=');
const [name, value] = cookie.split('=') as [string, string];
result[name.trim()] = decodeURI(value);
});
return result;
@ -62,19 +70,16 @@ function parseCookieString(cookieString: string): Record<string, string> {
export function readPlaygroundName(
event: HandlerEvent,
): PlaygroundName | undefined {
const parsedCookie: Record<string, string> = event.headers.cookie
const parsedCookie: {[key: string]: string} = event.headers.cookie
? parseCookieString(event.headers.cookie)
: {};
const playgroundName: string | undefined = parsedCookie[CookieName];
if (playgroundName) {
if (isValidPlaygroundName(playgroundName)) {
return playgroundName;
} else {
console.error(
`playgroundName found in cookie was invalid: ${playgroundName}`,
);
}
if (!isValidPlaygroundName(playgroundName)) {
console.error(
`playgroundName found in cookie was invalid: ${playgroundName}`,
);
return undefined;
}
return undefined;
return playgroundName;
}

View File

@ -0,0 +1,12 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
import type {Handler} from '@netlify/functions';
export const handler: Handler = () =>
Promise.resolve(createPlaygroundResponse('codesandbox-ts'));

View File

@ -5,10 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
import {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
import type {Handler} from '@netlify/functions';
import {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
export const handler: Handler = async function (_event, _context) {
return createPlaygroundResponse('codesandbox');
};
export const handler: Handler = () =>
Promise.resolve(createPlaygroundResponse('codesandbox'));

View File

@ -5,15 +5,14 @@
* LICENSE file in the root directory of this source tree.
*/
import type {Handler} from '@netlify/functions';
import {
readPlaygroundName,
createPlaygroundResponse,
createPlaygroundDocumentationResponse,
} from '../functionUtils/playgroundUtils';
import type {Handler} from '@netlify/functions';
export const handler: Handler = async (event, _context) => {
export const handler: Handler = async (event) => {
const playgroundName = readPlaygroundName(event);
return playgroundName
? createPlaygroundResponse(playgroundName)

View File

@ -0,0 +1,12 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
import type {Handler} from '@netlify/functions';
export const handler: Handler = () =>
Promise.resolve(createPlaygroundResponse('stackblitz-ts'));

View File

@ -5,10 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
import {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
import type {Handler} from '@netlify/functions';
import {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
export const handler: Handler = async function (_event, _context) {
return createPlaygroundResponse('stackblitz');
};
export const handler: Handler = () =>
Promise.resolve(createPlaygroundResponse('stackblitz'));

View File

@ -13,11 +13,21 @@ to = "/.netlify/functions/codesandbox"
status = 200
[[redirects]]
from = "/codesandbox-ts"
to = "/.netlify/functions/codesandbox-ts"
status = 200
[[redirects]]
from = "/stackblitz"
to = "/.netlify/functions/stackblitz"
status = 200
[[redirects]]
from = "/stackblitz-ts"
to = "/.netlify/functions/stackblitz-ts"
status = 200
[[redirects]]
from = "/*"
to = "/.netlify/functions/index"
status = 200

View File

@ -1,14 +1,11 @@
{
"name": "new.docusaurus.io",
"version": "2.0.0-beta.14",
"version": "3.2.0",
"private": true,
"scripts": {
"start": "netlify dev"
"start": "npx --package netlify-cli netlify dev"
},
"dependencies": {
"@netlify/functions": "^0.10.0"
},
"devDependencies": {
"netlify-cli": "^8.0.5"
"@netlify/functions": "^1.6.0"
}
}

View File

@ -10,7 +10,7 @@ Get access from the Docusaurus npm admins (@yangshun/@JoelMarcey).
You need publish access to **the main Docusaurus repository** (not a fork).
## NPM
## npm
Publishing will only work if you are logged into npm with an account with publishing rights to the package.
@ -70,15 +70,26 @@ This local test step is optional because it will be run by the CI on your releas
### 3. Update the v2 changelog
The changelog uses GitHub labels to classify each pull request. Use the GitHub interface to assign each newly merged pull request to a GitHub label starting with `tag:`, otherwise the PR won't appear in the changelog.
The changelog uses GitHub labels to classify each pull request. Use the GitHub interface to assign each newly merged pull request to a GitHub label starting with `pr:`, otherwise the PR won't appear in the changelog.
[Check tags of all recently merged Pull-Requests](https://github.com/facebook/docusaurus/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged+)
Not all labels will appear in the changelog—some are designed not to. However, you should **always** label each PR, so that before release, we can do a quick scan and confirm no PR is accidentally left out. Here's a search query (pity that GH doesn't have wildcard queries yet):
The `tag:` label prefix is for PRs only. Other labels are not used by the changelog tool, and it's not necessary to assign such labels to issues, only PRs.
```
is:pr is:merged sort:updated-desc -label:"pr: breaking change","pr: new feature","pr: bug fix","pr: performance","pr: polish","pr: documentation","pr: maintenance","pr: internal","pr: dependencies","pr: showcase"
```
[Check tags of all recently merged Pull-Requests](https://github.com/facebook/docusaurus/pulls?q=is%3Apr+is%3Amerged+sort%3Aupdated-desc+-label%3A%22pr%3A+breaking+change%22%2C%22pr%3A+new+feature%22%2C%22pr%3A+bug+fix%22%2C%22pr%3A+performance%22%2C%22pr%3A+polish%22%2C%22pr%3A+documentation%22%2C%22pr%3A+maintenance%22%2C%22pr%3A+internal%22%2C%22pr%3A+dependencies%22%2C%22pr%3A+showcase%22)
Some general principles about the labeling process:
- "Will an average user be interested in this entry?" Items like "improve test coverage", "upgrade dependencies" can probably be left out (we have `pr: internal` and `pr: dependencies` for this). However, "pin GitHub actions to an SHA", "add visual testing infrastructure", etc., albeit internal, could be interesting to the user, and can be included in the "maintenance" section.
- "Will this change have tangible impact on the user?" A common case is when a PR implements a feature X, then there are immediately follow-up PRs that fix bugs or polish feature X. These follow-up PRs don't necessarily have to be in the changelog, and even if they alter the API, they are not breaking changes, because to an average user bumping their version, they will only see the new feature X as a whole. Make the entries atomic.
The `pr:` label prefix is for PRs only. Other labels are not used by the changelog tool, and it's not necessary to assign such labels to issues, only PRs.
Generate a GitHub auth token by going to https://github.com/settings/tokens (the only permission needed is `public_repo`). Save the token somewhere for future reference.
Fetch the tags from Github (lerna-changelog looks for commits since last tag by default):
Fetch the tags from GitHub (lerna-changelog looks for commits since last tag by default):
```sh
git fetch --tags
@ -110,7 +121,7 @@ Test running the website with the new version locally.
To keep versions number small, delete the oldest version and add a link to it in `archivedVersions.json`.
Check [Netlify site deployments](https://app.netlify.com/sites/docusaurus-2/deploys) to pick a recent immutable deployment url.
Check [Netlify site deployments](https://app.netlify.com/sites/docusaurus-2/deploys) to pick a recent immutable deployment URL.
### 5. Create a Pull Request
@ -118,7 +129,7 @@ You should still be on your local branch `<your_username>/<version_to_release>`
Make a commit/push, create a pull request with the changes.
Example PR: [#3114](https://github.com/facebook/docusaurus/pull/5098), using title such as `chore(v2): prepare v2.0.0-beta.0 release`
Example PR: [#3114](https://github.com/facebook/docusaurus/pull/5098), using title such as `chore: prepare v2.0.0-beta.0 release`
**Don't merge it yet**, but wait for the CI checks to complete.
@ -163,7 +174,7 @@ npm access ls-packages
</pre>
</details>
It can happen that some accesses are not granted, as an admin might add you to the @docusaurus NPM organization, but you don't have access to the packages that are not in that organization.
It can happen that some accesses are not granted, as an admin might add you to the @docusaurus npm organization, but you don't have access to the packages that are not in that organization.
Please **double-check your permissions on these packages**, otherwise you'll publish a half-release and will have to release a new version.
@ -187,6 +198,8 @@ This command does a few things:
You should receive many emails notifying you that a new version of the packages has been published.
If above command fail (network issue or whatever), you can try to recover with `yarn lerna publish from-package`: it will try to publish the packages that are missing on npm.
Now that the release is done, **merge the pull request**.
### 7. Create a release on GitHub

View File

@ -0,0 +1,36 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import fs from 'fs-extra';
import path from 'path';
import chokidar from 'chokidar';
const srcDir = path.join(process.cwd(), 'src');
const libDir = path.join(process.cwd(), 'lib');
const ignoredPattern = /(?:__tests__|\.tsx?$)/;
async function copy() {
await fs.copy(srcDir, libDir, {
filter(testedPath) {
return !ignoredPattern.test(testedPath);
},
});
}
if (process.argv.includes('--watch')) {
const watcher = chokidar.watch(srcDir, {
ignored: ignoredPattern,
ignoreInitial: true,
persistent: true,
});
['add', 'change', 'unlink', 'addDir', 'unlinkDir'].forEach((event) =>
watcher.on(event, copy),
);
} else {
await copy();
}

View File

@ -0,0 +1,92 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// @ts-check
/** @typedef {Record<'performance' | 'accessibility' | 'best-practices' | 'seo' | 'pwa', number>} LighthouseSummary */
/** @type {Record<keyof LighthouseSummary, string>} */
const summaryKeys = {
performance: 'Performance',
accessibility: 'Accessibility',
'best-practices': 'Best Practices',
seo: 'SEO',
pwa: 'PWA',
};
/** @param {number} rawScore */
const scoreEntry = (rawScore) => {
const score = Math.round(rawScore * 100);
// eslint-disable-next-line no-nested-ternary
const scoreIcon = score >= 90 ? '🟢' : score >= 50 ? '🟠' : '🔴';
return `${scoreIcon} ${score}`;
};
/**
* @param {string} url
* @returns {module:url.URL}
*/
function createURL(url) {
try {
return new URL(url);
} catch (e) {
throw new Error(`Can't create URL for string=${url}`, {cause: e});
}
}
/**
* @param {Object} param0
* @param {string} param0.url
* @param {LighthouseSummary} param0.summary
* @param {string} param0.reportUrl
*/
const createMarkdownTableRow = ({url, summary, reportUrl}) =>
[
`| [${createURL(url).pathname}](${url})`,
.../** @type {(keyof LighthouseSummary)[]} */ (
Object.keys(summaryKeys)
).map((k) => scoreEntry(summary[k])),
`[Report](${reportUrl}) |`,
].join(' | ');
const createMarkdownTableHeader = () => [
['| URL', ...Object.values(summaryKeys), 'Report |'].join(' | '),
['|---', ...Array(Object.keys(summaryKeys).length).fill('---'), '---|'].join(
'|',
),
];
/**
* @param {Object} param0
* @param {Record<string, string>} param0.links
* @param {{url: string, summary: LighthouseSummary}[]} param0.results
*/
const createLighthouseReport = ({results, links}) => {
const tableHeader = createMarkdownTableHeader();
const tableBody = results.map((result) => {
const testUrl = /** @type {string} */ (
Object.keys(links).find((key) => key === result.url)
);
const reportPublicUrl = /** @type {string} */ (links[testUrl]);
return createMarkdownTableRow({
url: testUrl,
summary: result.summary,
reportUrl: reportPublicUrl,
});
});
const comment = [
'### ⚡️ Lighthouse report for the deploy preview of this PR',
'',
...tableHeader,
...tableBody,
'',
];
return comment.join('\n');
};
export default createLighthouseReport;

View File

@ -0,0 +1,206 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// @ts-check
import fs from 'fs-extra';
import shell from 'shelljs';
/**
* Generate one example per init template
* We use those generated examples as CodeSandbox projects
* See https://github.com/facebook/docusaurus/issues/1699
* @param {string} template
*/
async function generateTemplateExample(template) {
try {
console.log(
`generating ${template} template for codesandbox in the examples folder...`,
);
// Run the docusaurus script to create the template in the examples folder
const command = template.endsWith('-typescript')
? template.replace('-typescript', ' -- --typescript')
: `${template} -- --javascript`;
shell.exec(
// We use the published init script on purpose, because the local init is
// too new and could generate upcoming/unavailable config options.
// Remember CodeSandbox templates will use the published version,
// not the repo version.
// Using "yarn create" because "npm init" still try to use local pkg
`yarn create docusaurus examples/${template} ${command}`,
);
const templatePackageJson =
await /** @type {Promise<import("../../packages/create-docusaurus/templates/classic/package.json") & { scripts: { [name: string]: string }; description: string }>} */ (
fs.readJSON(`examples/${template}/package.json`)
);
// Attach the dev script which would be used in code sandbox by default
templatePackageJson.scripts.dev = 'docusaurus start';
// These example projects are not meant to be published to npm
templatePackageJson.private = true;
// Make sure package.json name is not "examples-classic". The package.json
// name appears in CodeSandbox UI so let's display a good name!
// Unfortunately we can't use uppercase or spaces... See also
// https://github.com/codesandbox/codesandbox-client/pull/5136#issuecomment-763521662
templatePackageJson.name =
template === 'classic' ? 'docusaurus' : `docusaurus-${template}`;
templatePackageJson.description =
template === 'classic'
? 'Docusaurus example project'
: `Docusaurus example project (${template} template)`;
await fs.writeFile(
`./examples/${template}/package.json`,
`${JSON.stringify(templatePackageJson, null, 2)}\n`,
);
// Create sandbox/stackblitz config file at the root of template
const codeSandboxConfig = {
infiniteLoopProtection: true,
hardReloadOnChange: true,
view: 'browser',
template: 'docusaurus',
node: '18',
container: {
node: '18',
},
};
await fs.writeFile(
`./examples/${template}/sandbox.config.json`,
`${JSON.stringify(codeSandboxConfig, null, 2)}\n`,
);
const stackBlitzConfig = {
installDependencies: true,
startCommand: 'npm start',
};
await fs.writeFile(
`./examples/${template}/.stackblitzrc`,
`${JSON.stringify(stackBlitzConfig, null, 2)}\n`,
);
console.log(`Generated example for template ${template}`);
} catch (err) {
console.error(`Failed to generated example for template ${template}`);
throw err;
}
}
/**
* Starters are repositories/branches that only contains a newly initialized
* Docusaurus site. Those are useful for users to inspect (may be more
* convenient than "examples/classic) Also some tools like Netlify deploy button
* currently require using the main branch of a dedicated repo.
* See https://github.com/jamstack/jamstack.org/pull/609
* Button visible here: https://jamstack.org/generators/
*/
function updateStarters() {
/**
* @param {Object} param0
* @param {string} param0.subfolder
* @param {string} param0.remote
* @param {string} param0.remoteBranch
*/
function forcePushGitSubtree({subfolder, remote, remoteBranch}) {
console.log('');
// See https://stackoverflow.com/questions/33172857/how-do-i-force-a-subtree-push-to-overwrite-remote-changes
const command = `git push ${remote} \`git subtree split --prefix ${subfolder}\`:${remoteBranch} --force`;
try {
console.log(`forcePushGitSubtree command: ${command}`);
shell.exec(command);
console.log('forcePushGitSubtree success!');
} catch (err) {
console.error(
`Can't force push to git subtree with command '${command}'`,
);
console.error(`If it's a permission problem, ask @slorber`);
console.error(err);
}
console.log('');
}
console.log('');
console.log('Updating https://github.com/facebook/docusaurus/tree/starter');
forcePushGitSubtree({
subfolder: 'examples/classic',
remote: 'origin',
remoteBranch: 'starter',
});
console.log('');
console.log('');
// TODO replace by starter repo in Docusaurus-community org (if we get it)
console.log('Updating https://github.com/slorber/docusaurus-starter');
forcePushGitSubtree({
subfolder: 'examples/classic',
remote: 'git@github.com:slorber/docusaurus-starter.git',
remoteBranch: 'main',
});
console.log('');
}
const branch = shell.exec('git rev-parse --abbrev-ref HEAD').stdout;
if (branch === 'main') {
throw new Error(
"Please don't generate Docusaurus examples from the main branch!\nWe are going to commit during this process!",
);
}
if (shell.exec('git diff --exit-code').code !== 0) {
throw new Error(
'Please run the generate examples command with a clean Git state and no uncommitted local changes. git diff should display nothing!',
);
}
console.log(`
# Generate examples start!
`);
// Delete the examples directories if they exist
console.log(`-------
## Removing example folders...
`);
await fs.rm('./examples/classic', {recursive: true, force: true});
await fs.rm('./examples/classic-typescript', {recursive: true, force: true});
// Get the list of all available templates
console.log(`
-------
## Generate example folders...
`);
const excludes = ['README.md', 'shared'];
const templates = (
await fs.readdir('./packages/create-docusaurus/templates')
).filter((name) => !excludes.includes(name));
console.log(`Will generate examples for templates: ${templates.join(',')}`);
for (const template of templates) {
await generateTemplateExample(template);
}
console.log('Committing changes');
shell.exec('git add examples');
shell.exec("git commit -am 'update examples' --allow-empty");
// Update starters
console.log(`
-------
# Updating starter repos and branches ...
It can take some time... please wait until done...
`);
updateStarters();
console.log(`
-------
Generate examples end!
Don't forget to push and merge your pull request!
`);

View File

@ -1,204 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable import/no-extraneous-dependencies */
import fs from 'fs-extra';
import shell from 'shelljs';
const NODE_MAJOR_VERSION = parseInt(process.versions.node.split('.')[0], 10);
if (NODE_MAJOR_VERSION < 16) {
throw new Error(
'This generateExamples Docusaurus script requires at least Node.js 16 and npm 7. See why here: https://github.com/facebook/docusaurus/pull/5722#issuecomment-948847891',
);
}
// Generate one example per init template
// We use those generated examples as CodeSandbox projects
// See https://github.com/facebook/docusaurus/issues/1699
async function generateTemplateExample(template) {
try {
console.log(
`generating ${template} template for codesandbox in the examples folder...`,
);
// run the docusaurus script to bootstrap the template in the examples folder
const command = template.endsWith('-typescript')
? template.replace('-typescript', ' -- --typescript')
: template;
shell.exec(
// /!\ we use the published init script on purpose,
// because using the local init script is too early and could generate upcoming/unavailable config options
// remember CodeSandbox templates will use the published version, not the repo version
`npm init docusaurus@latest examples/${template} ${command}`,
// `node ./packages/docusaurus-init/bin/index.js init examples/${template} ${template}`,
);
// read the content of the package.json
const templatePackageJson = JSON.parse(
await fs.readFile(`examples/${template}/package.json`, 'utf8'),
);
// attach the dev script which would be used in code sandbox by default
templatePackageJson.scripts.dev = 'docusaurus start';
// these example projects are not meant to be published to npm
templatePackageJson.private = true;
// make sure package.json name is not "examples-classic"
// the package.json name appear in CodeSandbox UI so let's display a good name!
// unfortunately we can't use uppercase or spaces
// see also https://github.com/codesandbox/codesandbox-client/pull/5136#issuecomment-763521662
templatePackageJson.name =
template === 'classic' ? 'docusaurus' : `docusaurus-${template}`;
templatePackageJson.description =
template === 'classic'
? 'Docusaurus example project'
: `Docusaurus example project (${template} template)`;
// rewrite the package.json file with the new edit
await fs.writeFile(
`./examples/${template}/package.json`,
`${JSON.stringify(templatePackageJson, null, 2)}\n`,
);
// create sandbox.config.json file at the root of template
const codeSandboxConfig = {
infiniteLoopProtection: true,
hardReloadOnChange: true,
view: 'browser',
template: 'docusaurus',
node: '14',
container: {
node: '14',
},
};
await fs.writeFile(
`./examples/${template}/sandbox.config.json`,
`${JSON.stringify(codeSandboxConfig, null, 2)}\n`,
);
const stackBlitzConfig = {
installDependencies: true,
startCommand: 'npm start',
};
await fs.writeFile(
`./examples/${template}/.stackblitzrc`,
`${JSON.stringify(stackBlitzConfig, null, 2)}\n`,
);
console.log(`Generated example for template ${template}`);
} catch (error) {
console.error(`Failed to generated example for template ${template}`);
throw error;
}
}
/*
Starters are repositories/branches that only contains a newly initialized Docusaurus site
Those are useful for users to inspect (may be more convenient than "examples/classic)
Also some tools like Netlify deploy button currently require using the main branch of a dedicated repo
See https://github.com/jamstack/jamstack.org/pull/609
Button visible here: https://jamstack.org/generators/
*/
function updateStarters() {
function forcePushGitSubtree({subfolder, remote, remoteBranch}) {
console.log('');
// See https://stackoverflow.com/questions/33172857/how-do-i-force-a-subtree-push-to-overwrite-remote-changes
const command = `git push ${remote} \`git subtree split --prefix ${subfolder}\`:${remoteBranch} --force`;
try {
console.log(`forcePushGitSubtree command: ${command}`);
shell.exec(command);
console.log('forcePushGitSubtree success!');
} catch (e) {
console.error(
`Can't force push to git subtree with command '${command}'`,
);
console.error(`If it's a permission problem, ask @slorber`);
console.error(e);
}
console.log('');
}
console.log('');
console.log('Updating https://github.com/facebook/docusaurus/tree/starter');
forcePushGitSubtree({
subfolder: 'examples/classic',
remote: 'origin',
remoteBranch: 'starter',
});
console.log('');
console.log('');
// TODO replace by starter repo in Docusaurus-community org (if we get it)
console.log('Updating https://github.com/slorber/docusaurus-starter');
forcePushGitSubtree({
subfolder: 'examples/classic',
remote: 'git@github.com:slorber/docusaurus-starter.git',
remoteBranch: 'main',
});
console.log('');
}
const branch = shell.exec('git rev-parse --abbrev-ref HEAD').stdout;
if (branch === 'main') {
throw new Error(
"Please don't generate Docusaurus examples from the main branch!\nWe are going to commit during this process!",
);
}
if (shell.exec('git diff --exit-code').code !== 0) {
throw new Error(
'Please run the generate examples command with a clean Git state and no uncommitted local changes. git diff should display nothing!',
);
}
console.log(`
# Generate examples start!
`);
// delete the examples directories if they exists
console.log(`-------
## Removing example folders...
`);
await fs.rm('./examples/classic', {recursive: true, force: true});
await fs.rm('./examples/classic-typescript', {recursive: true, force: true});
await fs.rm('./examples/facebook', {recursive: true, force: true});
// get the list of all available templates
console.log(`
-------
## Generate example folders...
`);
const excludes = ['README.md', 'shared'];
const templates = (
await fs.readdir('./packages/create-docusaurus/templates')
).filter((name) => !excludes.includes(name));
console.log(`Will generate examples for templates: ${templates.join(',')}`);
// eslint-disable-next-line no-restricted-syntax
for (const template of templates) {
await generateTemplateExample(template);
}
console.log('Committing changes');
shell.exec('git add examples');
shell.exec("git commit -am 'update examples' --allow-empty");
// update starters
console.log(`
-------
# Updating starter repos and branches ...
It can take some time... please wait until done...
`);
updateStarters();
console.log(`
-------
Generate examples end!
Don't forget to push and merge your pull request!
`);

View File

@ -1,45 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable import/no-extraneous-dependencies */
import sharp from 'sharp';
import fs from 'fs-extra';
import path from 'path';
import imageSize from 'image-size';
import {fileURLToPath} from 'url';
const allImages = (
await fs.readdir(new URL('../../website/src/data/showcase', import.meta.url))
).filter((file) => ['.png', 'jpg', '.jpeg'].includes(path.extname(file)));
const [, , ...selectedImages] = process.argv;
const images = selectedImages.length > 0 ? selectedImages : allImages;
await Promise.all(
images.map(async (img) => {
const imgPath = fileURLToPath(
new URL(`../../website/src/data/showcase/${img}`, import.meta.url),
);
const {width, height} = imageSize(imgPath);
if (width === 640 && height === 320) {
// Do not emit if no resized. Important because we
// can't guarantee idempotency during resize -> optimization
return;
}
const data = await sharp(imgPath)
.resize(640, 320, {fit: 'cover', position: 'top'})
.png()
.toBuffer();
await fs.writeFile(imgPath.replace(/jpe?g/, 'png'), data);
}),
);
// You should also run optimizt `find website/src/data/showcase -type f -name '*.png'`.
// This is not included here because @funboxteam/optimizt doesn't seem to play well with M1
// so I had to run this in a Rosetta terminal.
// TODO integrate this as part of the script

View File

@ -0,0 +1,7 @@
{
"name": "docu-scripts",
"description": "These are the scripts used in various places of Docusaurus maintenance",
"private": true,
"license": "MIT",
"type": "module"
}

View File

@ -0,0 +1,105 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import fs from 'fs-extra';
import path from 'path';
import {fileURLToPath} from 'url';
import {program} from 'commander';
import logger from '@docusaurus/logger';
import sharp from 'sharp';
import imageSize from 'image-size';
// You can use it as:
//
// # Resize all images in showcase (which is most likely)
// node admin/scripts/resizeImage.js
//
// # Resize specified images / all images in a folder
// # This does not read folders recursively as of now
// node admin/scripts/resizeImage.js image1.png some-folder ...
//
// By default, showcase images are resized to 640×320; everything else is
// resized to width 1000. You can explicitly give a width/height as arguments.
// node admin/scripts/resizeImage.js --width 640 --height 320 image1.png
function maybeParseInt(n) {
const res = Number.parseInt(n, 10);
if (Number.isNaN(res)) {
return undefined;
}
return res;
}
const showcasePath = 'website/src/data/showcase';
program
.arguments('[imagePaths...]')
.option('-w, --width <width>', 'Image width', maybeParseInt)
.option('-h, --height <height>', 'Image height', maybeParseInt)
.action(async (imagePaths, options) => {
if (imagePaths.length === 0) {
imagePaths.push(showcasePath);
}
const rootDir = fileURLToPath(new URL('../..', import.meta.url));
const images = (
await Promise.all(
imagePaths.map(async (p) =>
path.extname(p)
? [path.resolve(rootDir, p)]
: (await fs.readdir(p)).map((f) => path.resolve(rootDir, p, f)),
),
)
)
.flat()
.filter((p) => ['.png', 'jpg', '.jpeg'].includes(path.extname(p)));
const stats = {
skipped: 0,
resized: 0,
};
await Promise.all(
images.map(async (imgPath) => {
const {width, height} = imageSize(imgPath);
const targetWidth =
options.width ?? (imgPath.includes(showcasePath) ? 640 : 1000);
const targetHeight =
options.height ?? (imgPath.includes(showcasePath) ? 320 : undefined);
if (
width <= targetWidth &&
(!targetHeight || height <= targetHeight) &&
imgPath.endsWith('.png')
) {
// Do not emit if not resized. Important because we can't guarantee
// idempotency during resize -> optimization
stats.skipped += 1;
return;
}
logger.info`Resized path=${imgPath}: before number=${width}×number=${height}; now number=${targetWidth}×number=${
targetHeight ?? Math.floor((height / width) * targetWidth)
}`;
const data = await sharp(imgPath)
.resize(targetWidth, targetHeight, {fit: 'cover', position: 'top'})
.png()
.toBuffer();
await fs.writeFile(imgPath.replace(/jpe?g/, 'png'), data);
stats.resized += 1;
}),
);
logger.info`Images resizing complete.
resized: number=${stats.resized}
skipped: number=${stats.skipped}`;
});
program.parse(process.argv);
// You should also run
// optimizt `find website/src/data/showcase -type f -name '*.png'`.
// This is not included here because @funboxteam/optimizt doesn't seem to play
// well with M1 so I had to run this in a Rosetta terminal.
// TODO integrate this as part of the script

View File

@ -8,20 +8,20 @@
set -euo pipefail
CUSTOM_REGISTRY_URL="http://localhost:4873"
NEW_VERSION="$(node -p "require('./packages/docusaurus/package.json').version").NEW"
NEW_VERSION="$(node -p "require('./packages/docusaurus/package.json').version")-NEW"
CONTAINER_NAME="verdaccio"
EXTRA_OPTS=""
usage() { echo "Usage: $0 [-n] [-s]" 1>&2; exit 1; }
usage() { echo "Usage: $0 [-s] [-t]" 1>&2; exit 1; }
while getopts ":ns" o; do
while getopts ":st" o; do
case "${o}" in
n)
EXTRA_OPTS="${EXTRA_OPTS} --use-npm"
;;
s)
EXTRA_OPTS="${EXTRA_OPTS} --skip-install"
;;
t)
EXTRA_OPTS="${EXTRA_OPTS} --typescript"
;;
*)
usage
;;
@ -52,10 +52,10 @@ git diff --name-only -- '*.json' | sed 's, ,\\&,g' | xargs git checkout --
cd ..
# Build skeleton website with new version
npm_config_registry="$CUSTOM_REGISTRY_URL" npx create-docusaurus@"$NEW_VERSION" test-website classic $EXTRA_OPTS
npm_config_registry="$CUSTOM_REGISTRY_URL" npx create-docusaurus@"$NEW_VERSION" test-website classic --javascript $EXTRA_OPTS
# Stop Docker container
if [[ -z "${KEEP_CONTAINER:-}" ]] && ( $(docker container inspect "$CONTAINER_NAME" > /dev/null 2>&1) ); then
if [[ -z "${KEEP_CONTAINER:-true}" ]] && ( $(docker container inspect "$CONTAINER_NAME" > /dev/null 2>&1) ); then
# Remove Docker container
docker container stop $CONTAINER_NAME > /dev/null
fi

View File

@ -17,7 +17,7 @@ yarn start
### VS Code
Use the following code in VSCode to enable breakpoints. Please ensure you have a later version of node for non-legacy debugging.
Use the following code in VS Code to enable breakpoints. Please ensure you have a later version of node for non-legacy debugging.
```json
{

View File

@ -13,11 +13,30 @@
storage: ../storage
# Verdaccio does not allow to publish packages when the client is offline, to avoid
# errors on publish
# https://verdaccio.org/docs/configuration#offline-publish
publish:
allow_offline: false
# A list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
# Forked packages need to be fetched from npm
'@docusaurus/react-loadable':
access: $all
publish: $all
proxy: npmjs
# Group and isolate all local packages, avoid being proxy from outside
'@docusaurus/*':
access: $all
publish: $all
'@*/*':
access: $all
publish: $authenticated
proxy: npmjs
'**':
# Allow all users (including non-authenticated users) to read and
# publish all packages

5
argos/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
/screenshots/
/test-results/
/playwright-report/
/playwright/.cache/

21
argos/README.md Normal file
View File

@ -0,0 +1,21 @@
# Argos visual regression tests
We use [Argos CI](https://argos-ci.com) to detect visual regressions on Docusaurus.
This workspace can be run manually, but is generally run through the [Argos GitHub Action](../.github/workflows/argos.yml).
The workflow execute those following steps:
- Build the website locally with `yarn build:website:fast`
- Start the website server with `yarn serve:website` on [http://localhost:3000](http://localhost:3000)
- Take screenshots of all pages found in `sitemap.xml` with Playwright
- Upload all screenshots to [Argos CI](https://argos-ci.com)
This workflow runs for `main` and PR branches, and add a commit status to each PR with a visual diff that we can easily inspect.
---
Some additional capabilities:
- Use [./tests/screenshot.spec.ts](./tests/screenshot.spec.ts) to customize the screenshots we take, eventually filter out some useless sitemap pages like versioned docs
- Use [./tests/screenshot.css](./tests/screenshot.css) to hide flaky CSS elements: iframe, video, gif...

17
argos/package.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "argos",
"version": "3.2.0",
"description": "Argos visual diff tests",
"license": "MIT",
"private": true,
"scripts": {
"screenshot": "playwright test",
"upload": "npx @argos-ci/cli upload ./screenshots",
"report": "playwright show-report"
},
"dependencies": {
"@argos-ci/playwright": "^1.9.3",
"@playwright/test": "^1.41.2",
"cheerio": "^1.0.0-rc.12"
}
}

View File

@ -0,0 +1,40 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {devices} from '@playwright/test';
import type {PlaywrightTestConfig} from '@playwright/test';
/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
testDir: './tests',
timeout: 60000,
reporter: [['list'], ['@argos-ci/playwright/reporter']],
// Run website production built
// Need to run "yarn website:build:fast" before
webServer: {
cwd: '..',
port: 3000,
command: 'yarn serve:website',
},
// Browsers: only Chrome for now
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
},
],
};
export default config;

View File

@ -0,0 +1,54 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
We need to hide some elements in Argos/Playwright screenshots
Those elements are source of flakiness due to nondeterministic rendering
They don't consistently render exactly the same across CI runs
*/
/******* DOCUSAURUS GLOBAL / THEME *******/
/* Iframes can load lazily */
iframe,
/* Avatar images can be flaky due to using external sources: GitHub/Unavatar */
.avatar__photo,
/* Gifs load lazily and are animated */
img[src$='.gif'],
/* Algolia Keyboard shortcuts appear with a little delay */
.DocSearch-Button-Keys > kbd,
/* The live playground preview can often display dates/counters */
[class*='playgroundPreview'] {
visibility: hidden;
}
/*
Different docs last-update dates can alter layout
"visibility: hidden" is not enough
*/
.theme-last-updated {
display: none;
}
/*
Mermaid diagrams are rendered client-side and produce layout shifts
*/
.docusaurus-mermaid-container {
display: none;
}
/******* DOCUSAURUS WEBSITE SPECIFIC *******/
/* ProductHunt vote counter can increment at any time */
.producthunt-badge-widget {
visibility: hidden;
}
/* YouTube player lite can load video lazily */
article.yt-lite {
visibility: hidden;
}

View File

@ -0,0 +1,108 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import * as fs from 'fs';
import {test} from '@playwright/test';
import {argosScreenshot} from '@argos-ci/playwright';
import * as cheerio from 'cheerio';
const siteUrl = 'http://localhost:3000';
const sitemapPath = '../website/build/sitemap.xml';
const stylesheetPath = './tests/screenshot.css';
// Use ONLY_PATH="/docs/installation" to debug a specific page
const onlyPath: string | undefined = process.env.ONLY_PATH;
// eslint-disable-next-line no-restricted-properties
const sitemap = fs.readFileSync(sitemapPath).toString();
// eslint-disable-next-line no-restricted-properties
const stylesheet = fs.readFileSync(stylesheetPath).toString();
function extractSitemapUrls() {
const $ = cheerio.load(sitemap, {xmlMode: true});
const urls: string[] = [];
$('loc').each(function handleLoc() {
urls.push($(this).text());
});
return urls;
}
function isBlacklisted(pathname: string) {
if (onlyPath && onlyPath !== pathname) {
return true;
}
// Some paths explicitly blacklisted
const BlacklistedPathnames: string[] = [
// Flaky because of Canny widget
'/feature-requests',
// Flaky because of dynamic canary version fetched from npm
'/community/canary',
// Long blog post with many image carousels, often timeouts
'/blog/2022/08/01/announcing-docusaurus-2.0',
];
return (
// changelog docs
pathname.startsWith('/changelog') ||
// versioned docs
pathname.match(/^\/docs\/((\d\.\d\.\d)|(next))\//) ||
// manually excluded urls
BlacklistedPathnames.includes(pathname)
);
}
function getPathnames(): string[] {
const urls = extractSitemapUrls();
const pathnamesUnfiltered = urls.map((url) => new URL(url).pathname);
const pathnames = pathnamesUnfiltered.filter(
(pathname) => !isBlacklisted(pathname),
);
pathnames.sort();
console.log('Pathnames:\n', JSON.stringify(pathnames, null, 2));
console.log('Pathnames before filtering', pathnamesUnfiltered.length);
console.log('Pathnames after filtering', pathnames.length);
return pathnames;
}
function pathnameToArgosName(pathname: string): string {
function removeTrailingSlash(str: string): string {
return str.endsWith('/') ? str.slice(0, -1) : str;
}
function removeLeadingSlash(str: string): string {
return str.startsWith('/') ? str.slice(1) : str;
}
pathname = removeTrailingSlash(pathname);
pathname = removeLeadingSlash(pathname);
if (pathname === '') {
return 'index';
}
return pathname;
}
// See https://github.com/facebook/docusaurus/pull/9256
// Docusaurus adds a <html data-has-hydrated="true">
function waitForDocusaurusHydration() {
return document.documentElement.dataset.hasHydrated === 'true';
}
function createPathnameTest(pathname: string) {
test(`pathname ${pathname}`, async ({page}) => {
const url = siteUrl + pathname;
await page.goto(url);
await page.waitForFunction(waitForDocusaurusHydration);
await page.addStyleTag({content: stylesheet});
// await expect(page).toHaveScreenshot({ fullPage: true, ...options });
await argosScreenshot(page, pathnameToArgosName(pathname));
});
}
test.describe('Docusaurus site screenshots', () => {
const pathnames = getPathnames();
pathnames.forEach(createPathnameTest);
});

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
module.exports = {
presets: [
[
'@babel/env',
{
targets: {
node: 'current',
},
},
],
'@babel/react',
'@babel/preset-typescript',
],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-optional-chaining',
],
};

1
examples/README.md generated
View File

@ -10,7 +10,6 @@ You can run them in CodeSandbox:
- [classic](https://codesandbox.io/s/github/facebook/docusaurus/tree/main/examples/classic)
- [classic-typescript](https://codesandbox.io/s/github/facebook/docusaurus/tree/main/examples/classic-typescript)
- [facebook](https://codesandbox.io/s/github/facebook/docusaurus/tree/main/examples/facebook)
**Tip**: use the [new.docusaurus.io](https://new.docusaurus.io) shortcut.

View File

@ -1,4 +1,4 @@
{
"installDependencies": true,
"startCommand": "npm start"
}
}

View File

@ -1,6 +1,6 @@
# Website
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
### Installation

View File

@ -12,24 +12,36 @@ Get started by **creating a new site**.
Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
### What you'll need
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
## Generate a new site
Generate a new Docusaurus site using the **classic template**:
Generate a new Docusaurus site using the **classic template**.
The classic template will automatically be added to your project after you run the command:
```bash
npm init docusaurus@latest my-website classic
```
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
The command also installs all necessary dependencies you need to run Docusaurus.
## Start your site
Run the development server:
```bash
cd my-website
npx docusaurus start
npm run start
```
Your site starts at `http://localhost:3000`.
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
Open `docs/intro.md` and edit some lines: the site **reloads automatically** and displays your changes.
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.

View File

@ -1,4 +1,8 @@
{
"label": "Tutorial - Basics",
"position": 2
"position": 2,
"link": {
"type": "generated-index",
"description": "5 minutes to learn the most important Docusaurus concepts."
}
}

View File

@ -14,7 +14,9 @@ Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://
## What's next?
- Read the [official documentation](https://docusaurus.io/).
- Read the [official documentation](https://docusaurus.io/)
- Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config)
- Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration)
- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
- Add a [search bar](https://docusaurus.io/docs/search)
- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)

View File

@ -28,7 +28,7 @@ tags: [greetings]
Congratulations, you have made your first post!
Feel free to play around and edit this post as much you like.
Feel free to play around and edit this post as much as you like.
```
A new blog post is now available at `http://localhost:3000/blog/greetings`.
A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings).

View File

@ -12,7 +12,7 @@ Documents are **groups of pages** connected through:
## Create your first Doc
Create a markdown file at `docs/hello.md`:
Create a Markdown file at `docs/hello.md`:
```md title="docs/hello.md"
# Hello
@ -20,7 +20,7 @@ Create a markdown file at `docs/hello.md`:
This is my **first Docusaurus document**!
```
A new document is now available at `http://localhost:3000/docs/hello`.
A new document is now available at [http://localhost:3000/docs/hello](http://localhost:3000/docs/hello).
## Configure the Sidebar
@ -41,14 +41,16 @@ This is my **first Docusaurus document**!
It is also possible to create your sidebar explicitly in `sidebars.js`:
```diff title="sidebars.js"
module.exports = {
```js title="sidebars.js"
export default {
tutorialSidebar: [
'intro',
// highlight-next-line
'hello',
{
type: 'category',
label: 'Tutorial',
- items: [...],
+ items: ['hello'],
items: ['tutorial-basics/create-a-document'],
},
],
};

View File

@ -6,9 +6,9 @@ sidebar_position: 1
Add **Markdown or React** files to `src/pages` to create a **standalone page**:
- `src/pages/index.js` -> `localhost:3000/`
- `src/pages/foo.md` -> `localhost:3000/foo`
- `src/pages/foo/bar.js` -> `localhost:3000/foo/bar`
- `src/pages/index.js` `localhost:3000/`
- `src/pages/foo.md` `localhost:3000/foo`
- `src/pages/foo/bar.js` `localhost:3000/foo/bar`
## Create your first React Page
@ -28,7 +28,7 @@ export default function MyReactPage() {
}
```
A new page is now available at `http://localhost:3000/my-react-page`.
A new page is now available at [http://localhost:3000/my-react-page](http://localhost:3000/my-react-page).
## Create your first Markdown Page
@ -40,4 +40,4 @@ Create a file at `src/pages/my-markdown-page.md`:
This is a Markdown page
```
A new page is now available at `http://localhost:3000/my-markdown-page`.
A new page is now available at [http://localhost:3000/my-markdown-page](http://localhost:3000/my-markdown-page).

View File

@ -26,6 +26,6 @@ Test your production build locally:
npm run serve
```
The `build` folder is now served at `http://localhost:3000/`.
The `build` folder is now served at [http://localhost:3000/](http://localhost:3000/).
You can now deploy the `build` folder **almost anywhere** easily, **for free** or very small cost (read the **[Deployment Guide](https://docusaurus.io/docs/deployment)**).

View File

@ -43,7 +43,7 @@ Let's see how to [Create a page](./create-a-page.md).
Regular Markdown images are supported.
Add an image at `static/img/docusaurus.png` and display it in Markdown:
You can use absolute paths to reference images in the static directory (`static/img/docusaurus.png`):
```md
![Docusaurus logo](/img/docusaurus.png)
@ -51,17 +51,23 @@ Add an image at `static/img/docusaurus.png` and display it in Markdown:
![Docusaurus logo](/img/docusaurus.png)
You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them:
```md
![Docusaurus logo](./img/docusaurus.png)
```
## Code Blocks
Markdown code blocks are supported with Syntax highlighting.
```jsx title="src/components/HelloDocusaurus.js"
function HelloDocusaurus() {
return (
<h1>Hello, Docusaurus!</h1>
)
}
```
````md
```jsx title="src/components/HelloDocusaurus.js"
function HelloDocusaurus() {
return <h1>Hello, Docusaurus!</h1>;
}
```
````
```jsx title="src/components/HelloDocusaurus.js"
function HelloDocusaurus() {
@ -73,17 +79,19 @@ function HelloDocusaurus() {
Docusaurus has a special syntax to create admonitions and callouts:
:::tip My tip
```md
:::tip My tip
Use this awesome feature option
Use this awesome feature option
:::
:::
:::danger Take care
:::danger Take care
This action is dangerous
This action is dangerous
:::
:::
```
:::tip My tip

View File

@ -1,4 +1,7 @@
{
"label": "Tutorial - Extras",
"position": 3
"position": 3,
"link": {
"type": "generated-index"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -28,7 +28,7 @@ To navigate seamlessly across versions, add a version dropdown.
Modify the `docusaurus.config.js` file:
```js title="docusaurus.config.js"
module.exports = {
export default {
themeConfig: {
navbar: {
items: [
@ -45,7 +45,7 @@ module.exports = {
The docs version dropdown appears in your navbar:
![Docs Version Dropdown](/img/tutorial/docsVersionDropdown.png)
![Docs Version Dropdown](./img/docsVersionDropdown.png)
## Update an existing version

View File

@ -11,7 +11,7 @@ Let's translate `docs/intro.md` to French.
Modify `docusaurus.config.js` to add support for the `fr` locale:
```js title="docusaurus.config.js"
module.exports = {
export default {
i18n: {
defaultLocale: 'en',
locales: ['en', 'fr'],
@ -39,11 +39,11 @@ Start your site on the French locale:
npm run start -- --locale fr
```
Your localized site is accessible at `http://localhost:3000/fr/` and the `Getting Started` page is translated.
Your localized site is accessible at [http://localhost:3000/fr/](http://localhost:3000/fr/) and the `Getting Started` page is translated.
:::caution
In development, you can only use one locale at a same time.
In development, you can only use one locale at a time.
:::
@ -54,7 +54,7 @@ To navigate seamlessly across languages, add a locale dropdown.
Modify the `docusaurus.config.js` file:
```js title="docusaurus.config.js"
module.exports = {
export default {
themeConfig: {
navbar: {
items: [
@ -71,7 +71,7 @@ module.exports = {
The locale dropdown now appears in your navbar:
![Locale Dropdown](/img/tutorial/localeDropdown.png)
![Locale Dropdown](./img/localeDropdown.png)
## Build your localized site

View File

@ -1,118 +0,0 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'My Site',
tagline: 'Dinosaurs are cool',
url: 'https://your-docusaurus-test-site.com',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'docusaurus', // Usually your repo name.
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'My Site',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'doc',
docId: 'intro',
position: 'left',
label: 'Tutorial',
},
{to: '/blog', label: 'Blog', position: 'left'},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Tutorial',
to: '/docs/intro',
},
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
},
{
label: 'Discord',
href: 'https://discordapp.com/invite/docusaurus',
},
{
label: 'Twitter',
href: 'https://twitter.com/docusaurus',
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/facebook/docusaurus',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;

View File

@ -0,0 +1,133 @@
import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
const config: Config = {
title: 'My Site',
tagline: 'Dinosaurs are cool',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://your-docusaurus-site.example.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'docusaurus', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'My Site',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
},
{to: '/blog', label: 'Blog', position: 'left'},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Tutorial',
to: '/docs/intro',
},
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
},
{
label: 'Discord',
href: 'https://discordapp.com/invite/docusaurus',
},
{
label: 'Twitter',
href: 'https://twitter.com/docusaurus',
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/facebook/docusaurus',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
};
export default config;

View File

@ -16,18 +16,19 @@
"dev": "docusaurus start"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.14",
"@docusaurus/preset-classic": "2.0.0-beta.14",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1"
"@docusaurus/core": "3.2.0",
"@docusaurus/preset-classic": "3.2.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.14",
"@tsconfig/docusaurus": "^1.0.4",
"typescript": "^4.5.2"
"@docusaurus/module-type-aliases": "3.2.0",
"@docusaurus/tsconfig": "3.2.0",
"@docusaurus/types": "3.2.0",
"typescript": "~5.2.2"
},
"browserslist": {
"production": [
@ -36,10 +37,13 @@
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=18.0"
},
"description": "Docusaurus example project (classic-typescript template)"
}
}

View File

@ -3,8 +3,8 @@
"hardReloadOnChange": true,
"view": "browser",
"template": "docusaurus",
"node": "14",
"node": "18",
"container": {
"node": "14"
"node": "18"
}
}
}

View File

@ -1,31 +0,0 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/
// @ts-check
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
// But you can create a sidebar manually
/*
tutorialSidebar: [
{
type: 'category',
label: 'Tutorial',
items: ['hello'],
},
],
*/
};
module.exports = sidebars;

31
examples/classic-typescript/sidebars.ts generated Normal file
View File

@ -0,0 +1,31 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/
const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
};
export default sidebars;

View File

@ -1,75 +0,0 @@
import useBaseUrl from '@docusaurus/useBaseUrl';
import React from 'react';
import clsx from 'clsx';
import styles from './HomepageFeatures.module.css';
type FeatureItem = {
title: string;
image: string;
description: JSX.Element;
};
const FeatureList: FeatureItem[] = [
{
title: 'Easy to Use',
image: '/img/undraw_docusaurus_mountain.svg',
description: (
<>
Docusaurus was designed from the ground up to be easily installed and
used to get your website up and running quickly.
</>
),
},
{
title: 'Focus on What Matters',
image: '/img/undraw_docusaurus_tree.svg',
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
ahead and move your docs into the <code>docs</code> directory.
</>
),
},
{
title: 'Powered by React',
image: '/img/undraw_docusaurus_react.svg',
description: (
<>
Extend or customize your website layout by reusing React. Docusaurus can
be extended while reusing the same header and footer.
</>
),
},
];
function Feature({title, image, description}: FeatureItem) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<img
className={styles.featureSvg}
alt={title}
src={useBaseUrl(image)}
/>
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
<p>{description}</p>
</div>
</div>
);
}
export default function HomepageFeatures(): JSX.Element {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
}

View File

@ -0,0 +1,70 @@
import clsx from 'clsx';
import Heading from '@theme/Heading';
import styles from './styles.module.css';
type FeatureItem = {
title: string;
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
description: JSX.Element;
};
const FeatureList: FeatureItem[] = [
{
title: 'Easy to Use',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
description: (
<>
Docusaurus was designed from the ground up to be easily installed and
used to get your website up and running quickly.
</>
),
},
{
title: 'Focus on What Matters',
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
ahead and move your docs into the <code>docs</code> directory.
</>
),
},
{
title: 'Powered by React',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
description: (
<>
Extend or customize your website layout by reusing React. Docusaurus can
be extended while reusing the same header and footer.
</>
),
},
];
function Feature({title, Svg, description}: FeatureItem) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
</div>
<div className="text--center padding-horiz--md">
<Heading as="h3">{title}</Heading>
<p>{description}</p>
</div>
</div>
);
}
export default function HomepageFeatures(): JSX.Element {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
}

View File

@ -6,23 +6,25 @@
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: rgb(33, 175, 144);
--ifm-color-primary-darker: rgb(31, 165, 136);
--ifm-color-primary-darkest: rgb(26, 136, 112);
--ifm-color-primary-light: rgb(70, 203, 174);
--ifm-color-primary-lighter: rgb(102, 212, 189);
--ifm-color-primary-lightest: rgb(146, 224, 208);
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}
.docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.1);
display: block;
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
}
html[data-theme='dark'] .docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.3);
/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

View File

@ -10,7 +10,7 @@
overflow: hidden;
}
@media screen and (max-width: 966px) {
@media screen and (max-width: 996px) {
.heroBanner {
padding: 2rem;
}

View File

@ -1,17 +1,20 @@
import React from 'react';
import clsx from 'clsx';
import Layout from '@theme/Layout';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import Heading from '@theme/Heading';
import styles from './index.module.css';
import HomepageFeatures from '../components/HomepageFeatures';
function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<h1 className="hero__title">{siteConfig.title}</h1>
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Some files were not shown because too many files have changed in this diff Show More