Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebook/docusaurus
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.2.0
Choose a base ref
...
head repository: facebook/docusaurus
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.3.0
Choose a head ref

Commits on Oct 29, 2022

  1. chore: backport retro compatible commits for the Docusaurus v2.2 rele…

    …ase (#8264)
    
    Co-authored-by: Jan Peer Stoecklmair <jan.peer.stoecklmair@dynatrace.com>
    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>
    Co-authored-by: LittleboyHarry <littleboyharry@qq.com>
    Co-authored-by: Mikey O'Toole <mikey@homotechsual.dev>
    Co-authored-by: Jan Peer Stöcklmair <jan.oster94@gmail.com>
    Co-authored-by: Nguyễn Thành Nam <namnguyenthanh.work@gmail.com>
    Co-authored-by: Sanjaiyan Parthipan <parthipankalayini@gmail.com>
    Co-authored-by: Ramazan SANCAR <ramazansancar4545@gmail.com>
    Co-authored-by: mturoci <64769322+mturoci@users.noreply.github.com>
    Co-authored-by: Adnan Hashmi <56730784+adnanhashmi09@users.noreply.github.com>
    Co-authored-by: Pranav Joglekar <pranav2000joglekar@gmail.com>
    Co-authored-by: forgeRW <20483211+forgeRW@users.noreply.github.com>
    Co-authored-by: Masahiko Hara <pasora@sfc.wide.ad.jp>
    Co-authored-by: Johan Fagerberg <johanringmann@gmail.com>
    Co-authored-by: John Reilly <johnny_reilly@hotmail.com>
    Co-authored-by: Sam Wall <oss@samuelwall.co.uk>
    Co-authored-by: Jeferson S. Brito <30840709+jeferson-sb@users.noreply.github.com>
    Co-authored-by: evan <evanmccarthy@outlook.com>
    Co-authored-by: Xabier Lahuerta Vazquez <xlahuerta@protonmail.com>
    Co-authored-by: Forresst <forresst17@gmail.com>
    Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
    Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
    1

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    de97214 View commit details

Commits on Jan 26, 2023

  1. Copy the full SHA
    d531e50 View commit details
  2. Copy the full SHA
    b82c31b View commit details
  3. fix(theme-translations): complete Swedish theme translations (#8312)

    Co-authored-by: stnor <stefan@selessia.com>
    2 people authored and slorber committed Jan 26, 2023
    Copy the full SHA
    a5a1949 View commit details
  4. Copy the full SHA
    21ad883 View commit details
  5. Copy the full SHA
    5d2dd9b View commit details
  6. fix(core): normalize input for poll option (#8342)

    Fixes #8306
    mhnaeem authored and slorber committed Jan 26, 2023
    Copy the full SHA
    0294171 View commit details
  7. Copy the full SHA
    8ef6e62 View commit details
  8. Copy the full SHA
    cf3ec18 View commit details
  9. Copy the full SHA
    3f55453 View commit details
  10. Copy the full SHA
    d20d144 View commit details
  11. feat(core): deploy CLI - add support for git url "insteadOf": use 're…

    …mote get-url' to determine source repo url (#8397)
    friederbluemle authored and slorber committed Jan 26, 2023
    Copy the full SHA
    1ff378d View commit details
  12. fix(content-blog): blog Atom feed id + RSS feed guid should be fully …

    …qualified urls (#8381)
    
    Closes #8380
    johnnyreilly authored and slorber committed Jan 26, 2023
    Copy the full SHA
    5cf826a View commit details
  13. Copy the full SHA
    2d5d7bd View commit details
  14. Copy the full SHA
    9547b05 View commit details
  15. feat(eslint-plugin): add plugin to exported configs (#8281)

    Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
    closes undefined
    Closes #8280
    lachieh authored and slorber committed Jan 26, 2023
    Copy the full SHA
    3eb866a View commit details
  16. Copy the full SHA
    cc95fb6 View commit details
  17. feat(theme-classic): store selected tab in query string. (#8225)

    Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
    Closes #7008
    mturoci authored and slorber committed Jan 26, 2023
    Copy the full SHA
    78d5a53 View commit details
  18. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    6aecc23 View commit details
  19. Copy the full SHA
    e5b0707 View commit details
  20. feat(theme-algolia): add option.replaceSearchResultPathname to proces…

    …s/replaceAll search result urls
    
    #8428
    slorber committed Jan 26, 2023
    Copy the full SHA
    deb376e View commit details
  21. Copy the full SHA
    f3507e0 View commit details
  22. fix(core): explicitly define CopyWebpackPlugin toType: 'dir' (#8481)

    closes undefined
    Thomascogez authored and slorber committed Jan 26, 2023
    Copy the full SHA
    70bfaae View commit details
  23. Copy the full SHA
    266209f View commit details
  24. fix(search-algolia): pass custom transformItems function to SearchBar (

    …#8462)
    
    Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
    closes undefined
    Closes #8462
    Closes #8461
    mturoci authored and slorber committed Jan 26, 2023
    Copy the full SHA
    30573dd View commit details
  25. feat(blog): add options.createFeedItems to filter/limit/transform fee…

    …d items (#8378)
    
    Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
    johnnyreilly and slorber committed Jan 26, 2023
    Copy the full SHA
    25a4ec3 View commit details
  26. 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>
    3 people committed Jan 26, 2023
    Copy the full SHA
    704365c View commit details
  27. feat(plugin-google-tag-manager): add new google-tag-manager plugin + …

    …deprecate google-analytics plugin #8470
    lanegoolsby authored and slorber committed Jan 26, 2023
    Copy the full SHA
    003729e View commit details
  28. 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>
    dependabot[bot] and slorber committed Jan 26, 2023
    Copy the full SHA
    74fc822 View commit details
  29. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    41d0043 View commit details
  30. Copy the full SHA
    61f7d56 View commit details
  31. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    6d575d1 View commit details
  32. 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>
    3 people committed Jan 26, 2023
    Copy the full SHA
    c6cdf70 View commit details
  33. Copy the full SHA
    63ec772 View commit details
  34. Copy the full SHA
    35a691b View commit details

Commits on Jan 27, 2023

  1. Copy the full SHA
    86a85c5 View commit details
  2. v2.3.0

    slorber committed Jan 27, 2023
    Copy the full SHA
    ad47778 View commit details
Showing with 4,922 additions and 1,222 deletions.
  1. +1 −1 admin/new.docusaurus.io/package.json
  2. +1 −1 lerna.json
  3. +3 −3 packages/create-docusaurus/package.json
  4. +4 −2 packages/create-docusaurus/src/index.ts
  5. +4 −4 packages/create-docusaurus/templates/classic-typescript/package.json
  6. +10 −3 packages/create-docusaurus/templates/classic/docusaurus.config.js
  7. +4 −4 packages/create-docusaurus/templates/classic/package.json
  8. +9 −3 packages/create-docusaurus/templates/facebook/docusaurus.config.js
  9. +3 −3 packages/create-docusaurus/templates/facebook/package.json
  10. +5 −1 packages/create-docusaurus/templates/shared/docs/tutorial-basics/markdown-features.mdx
  11. BIN packages/create-docusaurus/templates/shared/static/img/docusaurus-social-card.jpg
  12. +1 −1 packages/docusaurus-cssnano-preset/package.json
  13. +1 −1 packages/docusaurus-logger/package.json
  14. +4 −4 packages/docusaurus-mdx-loader/package.json
  15. +4 −1 packages/docusaurus-mdx-loader/src/loader.ts
  16. +10 −0 packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/__fixtures__/nesting.md
  17. +5 −0 packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/__snapshots__/index.test.ts.snap
  18. +5 −0 packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/index.test.ts
  19. +42 −6 packages/docusaurus-mdx-loader/src/remark/admonitions/index.ts
  20. +51 −0 packages/docusaurus-mdx-loader/src/remark/mermaid/__tests__/__snapshots__/index.test.ts.snap
  21. +46 −0 packages/docusaurus-mdx-loader/src/remark/mermaid/__tests__/index.test.ts
  22. +32 −0 packages/docusaurus-mdx-loader/src/remark/mermaid/index.ts
  23. +3 −3 packages/docusaurus-migrate/package.json
  24. +3 −3 packages/docusaurus-migrate/src/__tests__/__snapshots__/index.test.ts.snap
  25. +2 −2 packages/docusaurus-module-type-aliases/package.json
  26. +7 −7 packages/docusaurus-plugin-client-redirects/package.json
  27. +19 −2 ...ages/docusaurus-plugin-client-redirects/src/__tests__/__snapshots__/collectRedirects.test.ts.snap
  28. +2 −2 ...saurus-plugin-client-redirects/src/__tests__/__snapshots__/createRedirectPageContent.test.ts.snap
  29. +11 −11 ...es/docusaurus-plugin-client-redirects/src/__tests__/__snapshots__/writeRedirectFiles.test.ts.snap
  30. +63 −0 packages/docusaurus-plugin-client-redirects/src/__tests__/collectRedirects.test.ts
  31. +51 −7 packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts
  32. +1 −1 packages/docusaurus-plugin-client-redirects/src/templates/redirectPage.template.html.ts
  33. +8 −11 packages/docusaurus-plugin-content-blog/package.json
  34. +118 −21 packages/docusaurus-plugin-content-blog/src/__tests__/__snapshots__/feed.test.ts.snap
  35. +52 −0 packages/docusaurus-plugin-content-blog/src/__tests__/feed.test.ts
  36. +2 −2 packages/docusaurus-plugin-content-blog/src/__tests__/frontMatter.test.ts
  37. +34 −9 packages/docusaurus-plugin-content-blog/src/feed.ts
  38. +1 −0 packages/docusaurus-plugin-content-blog/src/index.ts
  39. +1 −0 packages/docusaurus-plugin-content-blog/src/options.ts
  40. +29 −2 packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts
  41. +9 −9 packages/docusaurus-plugin-content-docs/package.json
  42. +34 −11 packages/docusaurus-plugin-content-docs/src/__tests__/docs.test.ts
  43. +2 −2 packages/docusaurus-plugin-content-docs/src/__tests__/frontMatter.test.ts
  44. +6 −4 packages/docusaurus-plugin-content-docs/src/docs.ts
  45. +6 −4 packages/docusaurus-plugin-content-docs/src/index.ts
  46. +6 −6 packages/docusaurus-plugin-content-pages/package.json
  47. +1 −0 packages/docusaurus-plugin-content-pages/src/index.ts
  48. +4 −4 packages/docusaurus-plugin-debug/package.json
  49. +4 −4 packages/docusaurus-plugin-google-analytics/package.json
  50. +4 −4 packages/docusaurus-plugin-google-gtag/package.json
  51. +3 −0 packages/docusaurus-plugin-google-tag-manager/.npmignore
  52. +7 −0 packages/docusaurus-plugin-google-tag-manager/README.md
  53. +33 −0 packages/docusaurus-plugin-google-tag-manager/package.json
  54. +78 −0 packages/docusaurus-plugin-google-tag-manager/src/index.ts
  55. +12 −0 packages/docusaurus-plugin-google-tag-manager/src/options.ts
  56. +8 −0 packages/docusaurus-plugin-google-tag-manager/src/types.d.ts
  57. +15 −0 packages/docusaurus-plugin-google-tag-manager/tsconfig.client.json
  58. +13 −0 packages/docusaurus-plugin-google-tag-manager/tsconfig.json
  59. +7 −7 packages/docusaurus-plugin-ideal-image/package.json
  60. +4 −10 packages/docusaurus-plugin-ideal-image/src/theme/IdealImage/index.tsx
  61. +8 −8 packages/docusaurus-plugin-pwa/package.json
  62. +7 −7 packages/docusaurus-plugin-sitemap/package.json
  63. +14 −13 packages/docusaurus-preset-classic/package.json
  64. +6 −0 packages/docusaurus-preset-classic/src/index.ts
  65. +2 −0 packages/docusaurus-preset-classic/src/options.ts
  66. +1 −1 packages/docusaurus-remark-plugin-npm2yarn/package.json
  67. +13 −13 packages/docusaurus-theme-classic/package.json
  68. +1 −1 packages/docusaurus-theme-classic/src/__tests__/options.test.ts
  69. +47 −1 packages/docusaurus-theme-classic/src/getSwizzleConfig.ts
  70. +18 −25 packages/docusaurus-theme-classic/src/theme-classic.d.ts
  71. +9 −1 packages/docusaurus-theme-classic/src/theme/AnnouncementBar/styles.module.css
  72. +2 −4 packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx
  73. +2 −1 packages/docusaurus-theme-classic/src/theme/ColorModeToggle/index.tsx
  74. +33 −0 packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/Items/Home/index.tsx
  75. +14 −0 packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/Items/Home/styles.module.css
  76. +1 −20 packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx
  77. +0 −8 packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/styles.module.css
  78. +3 −2 packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css
  79. +13 −8 packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/index.tsx
  80. +7 −0 packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/styles.module.css
  81. +1 −0 packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css
  82. +1 −0 packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/styles.module.css
  83. +6 −0 packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/Content/index.tsx
  84. +0 −6 packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/styles.module.css
  85. +18 −8 packages/docusaurus-theme-classic/src/theme/Heading/index.tsx
  86. +0 −2 packages/docusaurus-theme-classic/src/theme/Layout/Provider/index.tsx
  87. +6 −1 packages/docusaurus-theme-classic/src/theme/Layout/index.tsx
  88. +2 −0 packages/docusaurus-theme-classic/src/theme/Layout/styles.module.css
  89. +24 −4 packages/docusaurus-theme-classic/src/theme/MDXComponents/Code.tsx
  90. +2 −0 packages/docusaurus-theme-classic/src/theme/MDXComponents/index.tsx
  91. +16 −0 packages/docusaurus-theme-classic/src/theme/Mermaid.tsx
  92. +6 −0 packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx
  93. +6 −0 packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Header/index.tsx
  94. +11 −6 packages/docusaurus-theme-classic/src/theme/Navbar/MobileSidebar/Toggle/index.tsx
  95. +4 −1 packages/docusaurus-theme-classic/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx
  96. +5 −1 packages/docusaurus-theme-classic/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx
  97. +2 −18 packages/docusaurus-theme-classic/src/theme/SkipToContent/index.tsx
  98. +138 −84 packages/docusaurus-theme-classic/src/theme/Tabs/__tests__/index.test.tsx
  99. +87 −144 packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx
  100. +1 −1 packages/docusaurus-theme-classic/src/theme/Tag/styles.module.css
  101. +10 −9 packages/docusaurus-theme-common/package.json
  102. +0 −85 packages/docusaurus-theme-common/src/contexts/tabGroupChoice.tsx
  103. +7 −1 packages/docusaurus-theme-common/src/hooks/useHideableNavbar.ts
  104. +10 −5 packages/docusaurus-theme-common/src/hooks/useSearchPage.ts
  105. +0 −58 packages/docusaurus-theme-common/src/hooks/useSkipToContent.ts
  106. +12 −1 packages/docusaurus-theme-common/src/index.ts
  107. +7 −6 packages/docusaurus-theme-common/src/internal.ts
  108. +43 −0 packages/docusaurus-theme-common/src/utils/admonitionUtils.tsx
  109. +29 −1 packages/docusaurus-theme-common/src/utils/historyUtils.ts
  110. +103 −0 packages/docusaurus-theme-common/src/utils/skipToContentUtils.tsx
  111. +108 −7 packages/docusaurus-theme-common/src/utils/storageUtils.ts
  112. +266 −0 packages/docusaurus-theme-common/src/utils/tabsUtils.tsx
  113. +6 −6 packages/docusaurus-theme-live-codeblock/package.json
  114. +3 −0 packages/docusaurus-theme-mermaid/.npmignore
  115. +21 −0 packages/docusaurus-theme-mermaid/README.md
  116. +56 −0 packages/docusaurus-theme-mermaid/package.json
  117. +75 −0 packages/docusaurus-theme-mermaid/src/__tests__/validateThemeConfig.test.ts
  118. +77 −0 packages/docusaurus-theme-mermaid/src/client/index.ts
  119. +23 −0 packages/docusaurus-theme-mermaid/src/index.ts
  120. +35 −0 packages/docusaurus-theme-mermaid/src/theme-mermaid.d.ts
  121. +32 −0 packages/docusaurus-theme-mermaid/src/theme/Mermaid/index.tsx
  122. +14 −0 packages/docusaurus-theme-mermaid/src/theme/Mermaid/styles.module.css
  123. +37 −0 packages/docusaurus-theme-mermaid/src/validateThemeConfig.ts
  124. +15 −0 packages/docusaurus-theme-mermaid/tsconfig.client.json
  125. +14 −0 packages/docusaurus-theme-mermaid/tsconfig.json
  126. +9 −9 packages/docusaurus-theme-search-algolia/package.json
  127. +48 −1 packages/docusaurus-theme-search-algolia/src/__tests__/validateThemeConfig.test.ts
  128. +2 −0 packages/docusaurus-theme-search-algolia/src/client/index.ts
  129. +15 −0 packages/docusaurus-theme-search-algolia/src/client/useAlgoliaThemeConfig.ts
  130. +54 −0 packages/docusaurus-theme-search-algolia/src/client/useSearchResultUrlProcessor.ts
  131. +10 −0 packages/docusaurus-theme-search-algolia/src/theme-search-algolia.d.ts
  132. +20 −24 packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx
  133. +15 −17 packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx
  134. +14 −0 packages/docusaurus-theme-search-algolia/src/validateThemeConfig.ts
  135. +5 −1 packages/docusaurus-theme-translations/locales/ar/theme-common.json
  136. +10 −2 packages/docusaurus-theme-translations/locales/base/theme-common.json
  137. +5 −1 packages/docusaurus-theme-translations/locales/bn/theme-common.json
  138. +5 −1 packages/docusaurus-theme-translations/locales/cs/theme-common.json
  139. +5 −1 packages/docusaurus-theme-translations/locales/da/theme-common.json
  140. +5 −1 packages/docusaurus-theme-translations/locales/de/theme-common.json
  141. +5 −1 packages/docusaurus-theme-translations/locales/es/theme-common.json
  142. +5 −1 packages/docusaurus-theme-translations/locales/fa/theme-common.json
  143. +23 −23 packages/docusaurus-theme-translations/locales/fa/theme-search-algolia.json
  144. +5 −1 packages/docusaurus-theme-translations/locales/fil/theme-common.json
  145. +5 −1 packages/docusaurus-theme-translations/locales/fr/theme-common.json
  146. +5 −1 packages/docusaurus-theme-translations/locales/he/theme-common.json
  147. +5 −1 packages/docusaurus-theme-translations/locales/hi/theme-common.json
  148. +5 −1 packages/docusaurus-theme-translations/locales/it/theme-common.json
  149. +5 −5 packages/docusaurus-theme-translations/locales/ja/plugin-ideal-image.json
  150. +38 −34 packages/docusaurus-theme-translations/locales/ja/theme-common.json
  151. +2 −2 packages/docusaurus-theme-translations/locales/ja/theme-live-codeblock.json
  152. +25 −25 packages/docusaurus-theme-translations/locales/ja/theme-search-algolia.json
  153. +5 −1 packages/docusaurus-theme-translations/locales/ko/theme-common.json
  154. +5 −1 packages/docusaurus-theme-translations/locales/nl/theme-common.json
  155. +13 −9 packages/docusaurus-theme-translations/locales/pl/theme-common.json
  156. +23 −23 packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json
  157. +5 −1 packages/docusaurus-theme-translations/locales/pt-BR/theme-common.json
  158. +5 −1 packages/docusaurus-theme-translations/locales/pt-PT/theme-common.json
  159. +11 −7 packages/docusaurus-theme-translations/locales/ru/theme-common.json
  160. +23 −23 packages/docusaurus-theme-translations/locales/ru/theme-search-algolia.json
  161. +7 −0 packages/docusaurus-theme-translations/locales/sl/plugin-ideal-image.json
  162. +5 −0 packages/docusaurus-theme-translations/locales/sl/plugin-pwa.json
  163. +72 −0 packages/docusaurus-theme-translations/locales/sl/theme-common.json
  164. +4 −0 packages/docusaurus-theme-translations/locales/sl/theme-live-codeblock.json
  165. +35 −0 packages/docusaurus-theme-translations/locales/sl/theme-search-algolia.json
  166. +5 −1 packages/docusaurus-theme-translations/locales/sr/theme-common.json
  167. +5 −1 packages/docusaurus-theme-translations/locales/sv/theme-common.json
  168. +24 −1 packages/docusaurus-theme-translations/locales/sv/theme-search-algolia.json
  169. +5 −5 packages/docusaurus-theme-translations/locales/tr/plugin-ideal-image.json
  170. +22 −16 packages/docusaurus-theme-translations/locales/tr/theme-common.json
  171. +23 −23 packages/docusaurus-theme-translations/locales/tr/theme-search-algolia.json
  172. +5 −1 packages/docusaurus-theme-translations/locales/uk/theme-common.json
  173. +9 −5 packages/docusaurus-theme-translations/locales/vi/theme-common.json
  174. +1 −1 packages/docusaurus-theme-translations/locales/vi/theme-search-algolia.json
  175. +5 −1 packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json
  176. +5 −1 packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json
  177. +3 −3 packages/docusaurus-theme-translations/package.json
  178. +1 −1 packages/docusaurus-types/package.json
  179. +24 −1 packages/docusaurus-types/src/config.d.ts
  180. +1 −0 packages/docusaurus-types/src/index.d.ts
  181. +1 −1 packages/docusaurus-utils-common/package.json
  182. +3 −3 packages/docusaurus-utils-validation/package.json
  183. +3 −0 packages/docusaurus-utils-validation/src/validationSchemas.ts
  184. +4 −3 packages/docusaurus-utils/package.json
  185. +1 −0 packages/docusaurus-utils/src/__tests__/__fixtures__/build-snap/htmlFile.html
  186. +1 −0 ...ages/docusaurus-utils/src/__tests__/__fixtures__/build-snap/weird.html.folder/nestedHtmlFile.html
  187. +33 −1 packages/docusaurus-utils/src/__tests__/emitUtils.test.ts
  188. +15 −1 packages/docusaurus-utils/src/__tests__/markdownUtils.test.ts
  189. +1 −1 packages/docusaurus-utils/src/__tests__/pathUtils.test.ts
  190. +14 −12 packages/docusaurus-utils/src/emitUtils.ts
  191. +1 −0 packages/docusaurus-utils/src/index.ts
  192. +1 −4 packages/docusaurus-utils/src/markdownUtils.ts
  193. +1 −6 packages/docusaurus-utils/src/pathUtils.ts
  194. +12 −0 packages/docusaurus-utils/src/regExpUtils.ts
  195. +22 −0 packages/docusaurus/bin/docusaurus.mjs
  196. +10 −10 packages/docusaurus/package.json
  197. +21 −4 packages/docusaurus/src/client/ClientLifecyclesDispatcher.tsx
  198. +3 −2 packages/docusaurus/src/client/exports/Link.tsx
  199. +9 −1 packages/docusaurus/src/client/exports/useBaseUrl.ts
  200. +5 −1 packages/docusaurus/src/commands/build.ts
  201. +1 −1 packages/docusaurus/src/commands/deploy.ts
  202. +60 −0 packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap
  203. +9 −3 packages/docusaurus/src/commands/swizzle/__tests__/actions.test.ts
  204. +2 −1 packages/docusaurus/src/commands/swizzle/actions.ts
  205. +2 −0 packages/docusaurus/src/commands/swizzle/common.ts
  206. +1 −1 packages/docusaurus/src/commands/swizzle/components.ts
  207. +3 −2 packages/docusaurus/src/commands/swizzle/context.ts
  208. +1 −1 packages/docusaurus/src/commands/swizzle/index.ts
  209. +20 −0 packages/docusaurus/src/server/__tests__/__snapshots__/config.test.ts.snap
  210. +0 −5 packages/docusaurus/src/server/__tests__/__snapshots__/configValidation.test.ts.snap
  211. +4 −0 packages/docusaurus/src/server/__tests__/__snapshots__/index.test.ts.snap
  212. +179 −14 packages/docusaurus/src/server/__tests__/configValidation.test.ts
  213. +34 −0 packages/docusaurus/src/server/__tests__/routes.test.ts
  214. +46 −13 packages/docusaurus/src/server/configValidation.ts
  215. +5 −2 packages/docusaurus/src/server/plugins/synthetic.ts
  216. +7 −1 packages/docusaurus/src/server/routes.ts
  217. +1 −1 packages/eslint-plugin/package.json
  218. +2 −0 packages/eslint-plugin/src/index.ts
  219. +2 −2 packages/lqip-loader/package.json
  220. +1 −1 packages/stylelint-copyright/package.json
  221. +5 −0 project-words.txt
  222. +15 −0 website/_dogfooding/_blog tests/2022-10-02-html-slug.md
  223. +1 −0 website/_dogfooding/_docs tests/tests/ascii/folder/æøå.md
  224. +1 −0 website/_dogfooding/_docs tests/tests/ascii/æøå/index.md
  225. +316 −0 website/_dogfooding/_pages tests/diagrams.mdx
  226. +1 −0 website/_dogfooding/_pages tests/index.md
  227. +28 −0 website/_dogfooding/_pages tests/markdownPageTests.md
  228. +31 −17 website/_dogfooding/testSwizzleThemeClassic.mjs
  229. +0 −1 website/community/2-resources.md
  230. +24 −0 website/docs/api/docusaurus.config.js.md
  231. +10 −12 website/docs/api/misc/eslint-plugin/README.md
  232. +20 −0 website/docs/api/plugins/plugin-content-blog.md
  233. +10 −0 website/docs/api/plugins/plugin-google-analytics.md
  234. +71 −0 website/docs/api/plugins/plugin-google-tag-manager.md
  235. +19 −0 website/docs/blog.mdx
  236. +10 −9 website/docs/cli.md
  237. +127 −2 website/docs/guides/markdown-features/markdown-features-admonitions.mdx
  238. +85 −0 website/docs/guides/markdown-features/markdown-features-diagrams.mdx
  239. +60 −0 website/docs/guides/markdown-features/markdown-features-tabs.mdx
  240. +6 −0 website/docs/search.md
  241. +5 −2 website/docs/using-plugins.md
  242. +1 −1 website/docusaurus.config-blog-only.js
  243. +14 −10 website/docusaurus.config.js
  244. +15 −14 website/package.json
  245. +1 −0 website/sidebars.js
  246. BIN website/static/docusaurus-social-card.jpg
  247. BIN website/static/docusaurus-social-card.png
  248. BIN website/static/img/docusaurus-soc.png
  249. +356 −21 yarn.lock
2 changes: 1 addition & 1 deletion admin/new.docusaurus.io/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.docusaurus.io",
"version": "2.1.0",
"version": "2.3.0",
"private": true,
"scripts": {
"start": "npx --package netlify-cli netlify dev"
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.1.0",
"version": "2.3.0",
"npmClient": "yarn",
"useWorkspaces": true,
"changelog": {
6 changes: 3 additions & 3 deletions packages/create-docusaurus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-docusaurus",
"version": "2.1.0",
"version": "2.3.0",
"description": "Create Docusaurus apps easily.",
"type": "module",
"repository": {
@@ -22,8 +22,8 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/logger": "2.1.0",
"@docusaurus/utils": "2.1.0",
"@docusaurus/logger": "2.3.0",
"@docusaurus/utils": "2.3.0",
"commander": "^5.1.0",
"fs-extra": "^10.1.0",
"lodash": "^4.17.21",
6 changes: 4 additions & 2 deletions packages/create-docusaurus/src/index.ts
Original file line number Diff line number Diff line change
@@ -456,8 +456,10 @@ export default async function init(
reqTemplate?: string,
cliOptions: CLIOptions = {},
): Promise<void> {
const templates = await readTemplates();
const siteName = await getSiteName(reqName, rootDir);
const [templates, siteName] = await Promise.all([
readTemplates(),
getSiteName(reqName, rootDir),
]);
const dest = path.resolve(rootDir, siteName);
const source = await getSource(reqTemplate, templates, cliOptions);

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-classic-typescript-template",
"version": "2.1.0",
"version": "2.3.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
@@ -15,16 +15,16 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "2.1.0",
"@docusaurus/preset-classic": "2.1.0",
"@docusaurus/core": "2.3.0",
"@docusaurus/preset-classic": "2.3.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.1.0",
"@docusaurus/module-type-aliases": "2.3.0",
"@tsconfig/docusaurus": "^1.0.5",
"typescript": "^4.7.4"
},
13 changes: 10 additions & 3 deletions packages/create-docusaurus/templates/classic/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -8,17 +8,22 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const config = {
title: 'My Site',
tagline: 'Dinosaurs are cool',
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://your-docusaurus-test-site.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',

// 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 internalization, 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".
@@ -56,6 +61,8 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'My Site',
logo: {
8 changes: 4 additions & 4 deletions packages/create-docusaurus/templates/classic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-classic-template",
"version": "2.1.0",
"version": "2.3.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
@@ -14,16 +14,16 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.1.0",
"@docusaurus/preset-classic": "2.1.0",
"@docusaurus/core": "2.3.0",
"@docusaurus/preset-classic": "2.3.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.1.0"
"@docusaurus/module-type-aliases": "2.3.0"
},
"browserslist": {
"production": [
Original file line number Diff line number Diff line change
@@ -13,17 +13,22 @@
const config = {
title: 'My Site',
tagline: 'The tagline of my site',
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://your-docusaurus-test-site.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',

// 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',

presets: [
[
'classic',
@@ -53,6 +58,7 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'My Meta Project',
logo: {
6 changes: 3 additions & 3 deletions packages/create-docusaurus/templates/facebook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-facebook-template",
"version": "2.1.0",
"version": "2.3.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
@@ -18,8 +18,8 @@
"format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\""
},
"dependencies": {
"@docusaurus/core": "2.1.0",
"@docusaurus/preset-classic": "2.1.0",
"@docusaurus/core": "2.3.0",
"@docusaurus/preset-classic": "2.3.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"react": "^17.0.2",
Original file line number Diff line number Diff line change
@@ -51,7 +51,11 @@ You can use absolute paths to reference images in the static directory (`static/

![Docusaurus logo](/img/docusaurus.png)

You can reference images relative to the current file as well, as shown in [the extra guides](../tutorial-extras/manage-docs-versions.md).
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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/docusaurus-cssnano-preset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/cssnano-preset",
"version": "2.1.0",
"version": "2.3.0",
"description": "Advanced cssnano preset for maximum optimization.",
"main": "lib/index.js",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/docusaurus-logger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/logger",
"version": "2.1.0",
"version": "2.3.0",
"description": "An encapsulated logger for semantically formatting console messages.",
"main": "./lib/index.js",
"repository": {
8 changes: 4 additions & 4 deletions packages/docusaurus-mdx-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/mdx-loader",
"version": "2.1.0",
"version": "2.3.0",
"description": "Docusaurus Loader for MDX",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -20,8 +20,8 @@
"dependencies": {
"@babel/parser": "^7.18.8",
"@babel/traverse": "^7.18.8",
"@docusaurus/logger": "2.1.0",
"@docusaurus/utils": "2.1.0",
"@docusaurus/logger": "2.3.0",
"@docusaurus/utils": "2.3.0",
"@mdx-js/mdx": "^1.6.22",
"escape-html": "^1.0.3",
"file-loader": "^6.2.0",
@@ -37,7 +37,7 @@
"webpack": "^5.73.0"
},
"devDependencies": {
"@docusaurus/types": "2.1.0",
"@docusaurus/types": "2.3.0",
"@types/escape-html": "^1.0.2",
"@types/mdast": "^3.0.10",
"@types/stringify-object": "^3.3.1",
5 changes: 4 additions & 1 deletion packages/docusaurus-mdx-loader/src/loader.ts
Original file line number Diff line number Diff line change
@@ -22,8 +22,10 @@ import toc from './remark/toc';
import unwrapMdxCodeBlocks from './remark/unwrapMdxCodeBlocks';
import transformImage from './remark/transformImage';
import transformLinks from './remark/transformLinks';
import mermaid from './remark/mermaid';

import transformAdmonitions from './remark/admonitions';
import type {MarkdownConfig} from '@docusaurus/types';
import type {LoaderContext} from 'webpack';
import type {Processor, Plugin} from 'unified';
import type {AdmonitionOptions} from './remark/admonitions';
@@ -61,6 +63,7 @@ export type MDXOptions = {
};

export type Options = Partial<MDXOptions> & {
markdownConfig: MarkdownConfig;
staticDirs: string[];
siteDir: string;
isMDXPartial?: (filePath: string) => boolean;
@@ -71,7 +74,6 @@ export type Options = Partial<MDXOptions> & {
frontMatter: {[key: string]: unknown};
metadata: {[key: string]: unknown};
}) => {[key: string]: unknown};
filepath: string;
};

/**
@@ -171,6 +173,7 @@ export async function mdxLoader(
...(reqOptions.beforeDefaultRemarkPlugins ?? []),
...getAdmonitionsPlugins(reqOptions.admonitions ?? false),
...DEFAULT_OPTIONS.remarkPlugins,
...(reqOptions.markdownConfig.mermaid ? [mermaid] : []),
[
transformImage,
{

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -42,3 +42,8 @@ exports[`admonitions remark plugin interpolation 1`] = `
"<p>Test admonition with interpolated title/body</p>
<admonition type="tip"><mdxAdmonitionTitle>My <code>interpolated</code> <strong>title</strong> &#x3C;button style={{color: "red"}} onClick={() => alert("click")}>test</mdxAdmonitionTitle><p><code>body</code> <strong>interpolated</strong> content</p></admonition>"
`;

exports[`admonitions remark plugin nesting 1`] = `
"<p>Test nested Admonitions</p>
<admonition type="info"><mdxAdmonitionTitle><strong>Weather</strong></mdxAdmonitionTitle><p>On nice days, you can enjoy skiing in the mountains.</p><admonition type="danger"><mdxAdmonitionTitle><em>Storms</em></mdxAdmonitionTitle><p>Take care of snowstorms...</p></admonition></admonition>"
`;
Original file line number Diff line number Diff line change
@@ -50,4 +50,9 @@ describe('admonitions remark plugin', () => {
const result = await processFixture('interpolation');
expect(result).toMatchSnapshot();
});

it('nesting', async () => {
const result = await processFixture('nesting');
expect(result).toMatchSnapshot();
});
});
48 changes: 42 additions & 6 deletions packages/docusaurus-mdx-loader/src/remark/admonitions/index.ts
Original file line number Diff line number Diff line change
@@ -52,9 +52,20 @@ const plugin: Plugin = function plugin(
const options = normalizeOptions(optionsInput);

const keywords = Object.values(options.keywords).map(escapeRegExp).join('|');
const nestingChar = escapeRegExp(options.tag.slice(0, 1));
const tag = escapeRegExp(options.tag);
const regex = new RegExp(`${tag}(${keywords})(?: *(.*))?\n`);
const escapeTag = new RegExp(escapeRegExp(`\\${options.tag}`), 'g');

// resolve th nesting level of an opening tag
// ::: -> 0, :::: -> 1, ::::: -> 2 ...
const nestingLevelRegex = new RegExp(
`^${tag}(?<nestingLevel>${nestingChar}*)`,
);

const regex = new RegExp(`${tag}${nestingChar}*(${keywords})(?: *(.*))?\n`);
const escapeTag = new RegExp(
escapeRegExp(`\\${options.tag}${options.tag.slice(0, 1)}*`),
'g',
);

// The tokenizer is called on blocks to determine if there is an admonition
// present and create tags for it
@@ -77,6 +88,11 @@ const plugin: Plugin = function plugin(
];
const food = [];
const content = [];
// get the nesting level of the opening tag
const openingLevel =
nestingLevelRegex.exec(opening)!.groups!.nestingLevel!.length;
// used as a stack to keep track of nested admonitions
const nestingLevels: number[] = [openingLevel];

let newValue = value;
// consume lines until a closing tag
@@ -88,12 +104,32 @@ const plugin: Plugin = function plugin(
next !== -1 ? newValue.slice(idx + 1, next) : newValue.slice(idx + 1);
food.push(line);
newValue = newValue.slice(idx + 1);
// the closing tag is NOT part of the content
if (line.startsWith(options.tag)) {
break;
const nesting = nestingLevelRegex.exec(line);
idx = newValue.indexOf(NEWLINE);
if (!nesting) {
content.push(line);
continue;
}
const tagLevel = nesting.groups!.nestingLevel!.length;
// first level
if (nestingLevels.length === 0) {
nestingLevels.push(tagLevel);
content.push(line);
continue;
}
const currentLevel = nestingLevels[nestingLevels.length - 1]!;
if (tagLevel < currentLevel) {
// entering a nested admonition block
nestingLevels.push(tagLevel);
} else if (tagLevel === currentLevel) {
// closing a nested admonition block
nestingLevels.pop();
// the closing tag is NOT part of the content
if (nestingLevels.length === 0) {
break;
}
}
content.push(line);
idx = newValue.indexOf(NEWLINE);
}

// consume the processed tag and replace escape sequences
Loading