@docusaurus/theme-classic 3.4.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/lib/getSwizzleConfig.js +32 -1
  2. package/lib/index.d.ts +0 -1
  3. package/lib/index.js +1 -1
  4. package/lib/inlineScripts.js +3 -3
  5. package/lib/options.d.ts +0 -1
  6. package/lib/options.js +15 -3
  7. package/lib/theme/Admonition/Icon/Danger.d.ts +0 -2
  8. package/lib/theme/Admonition/Icon/Info.d.ts +0 -2
  9. package/lib/theme/Admonition/Icon/Note.d.ts +0 -2
  10. package/lib/theme/Admonition/Icon/Tip.d.ts +0 -2
  11. package/lib/theme/Admonition/Icon/Warning.d.ts +0 -2
  12. package/lib/theme/Admonition/Layout/index.d.ts +0 -2
  13. package/lib/theme/Admonition/Type/Caution.d.ts +0 -2
  14. package/lib/theme/Admonition/Type/Danger.d.ts +0 -2
  15. package/lib/theme/Admonition/Type/Info.d.ts +0 -2
  16. package/lib/theme/Admonition/Type/Note.d.ts +0 -2
  17. package/lib/theme/Admonition/Type/Tip.d.ts +0 -2
  18. package/lib/theme/Admonition/Type/Warning.d.ts +0 -2
  19. package/lib/theme/Admonition/Types.d.ts +0 -1
  20. package/lib/theme/Admonition/index.d.ts +0 -2
  21. package/lib/theme/AnnouncementBar/CloseButton/index.d.ts +0 -2
  22. package/lib/theme/AnnouncementBar/Content/index.d.ts +0 -2
  23. package/lib/theme/AnnouncementBar/index.d.ts +0 -1
  24. package/lib/theme/BackToTopButton/index.d.ts +0 -1
  25. package/lib/theme/Blog/Components/Author/Socials/index.d.ts +10 -0
  26. package/lib/theme/Blog/Components/Author/Socials/index.js +49 -0
  27. package/lib/theme/Blog/Components/Author/Socials/styles.module.css +39 -0
  28. package/lib/theme/Blog/Components/Author/index.d.ts +8 -0
  29. package/lib/theme/Blog/Components/Author/index.js +86 -0
  30. package/lib/theme/Blog/Components/Author/styles.module.css +74 -0
  31. package/lib/theme/Blog/Pages/BlogAuthorsListPage/index.d.ts +9 -0
  32. package/lib/theme/Blog/Pages/BlogAuthorsListPage/index.js +54 -0
  33. package/lib/theme/Blog/Pages/BlogAuthorsListPage/styles.module.css +11 -0
  34. package/lib/theme/Blog/Pages/BlogAuthorsPostsPage/index.d.ts +8 -0
  35. package/lib/theme/Blog/Pages/BlogAuthorsPostsPage/index.js +67 -0
  36. package/lib/theme/BlogArchivePage/index.d.ts +0 -2
  37. package/lib/theme/BlogLayout/index.d.ts +0 -2
  38. package/lib/theme/BlogListPage/StructuredData/index.d.ts +0 -2
  39. package/lib/theme/BlogListPage/StructuredData/index.js +1 -1
  40. package/lib/theme/BlogListPage/index.d.ts +0 -2
  41. package/lib/theme/BlogListPaginator/index.d.ts +0 -2
  42. package/lib/theme/BlogPostItem/Container/index.d.ts +0 -2
  43. package/lib/theme/BlogPostItem/Content/index.d.ts +0 -2
  44. package/lib/theme/BlogPostItem/Content/index.js +1 -1
  45. package/lib/theme/BlogPostItem/Footer/ReadMoreLink/index.d.ts +0 -2
  46. package/lib/theme/BlogPostItem/Footer/index.d.ts +0 -1
  47. package/lib/theme/BlogPostItem/Footer/index.js +1 -1
  48. package/lib/theme/BlogPostItem/Header/Authors/index.d.ts +0 -2
  49. package/lib/theme/BlogPostItem/Header/Authors/index.js +5 -4
  50. package/lib/theme/BlogPostItem/Header/Authors/styles.module.css +0 -1
  51. package/lib/theme/BlogPostItem/Header/Info/index.d.ts +0 -2
  52. package/lib/theme/BlogPostItem/Header/Info/index.js +2 -4
  53. package/lib/theme/BlogPostItem/Header/Title/index.d.ts +0 -2
  54. package/lib/theme/BlogPostItem/Header/Title/index.js +1 -1
  55. package/lib/theme/BlogPostItem/Header/index.d.ts +0 -1
  56. package/lib/theme/BlogPostItem/index.d.ts +0 -2
  57. package/lib/theme/BlogPostItem/index.js +1 -1
  58. package/lib/theme/BlogPostItems/index.d.ts +0 -2
  59. package/lib/theme/BlogPostItems/index.js +1 -1
  60. package/lib/theme/BlogPostPage/Metadata/index.d.ts +0 -1
  61. package/lib/theme/BlogPostPage/Metadata/index.js +1 -1
  62. package/lib/theme/BlogPostPage/StructuredData/index.d.ts +0 -1
  63. package/lib/theme/BlogPostPage/StructuredData/index.js +1 -1
  64. package/lib/theme/BlogPostPage/index.d.ts +0 -2
  65. package/lib/theme/BlogPostPage/index.js +7 -4
  66. package/lib/theme/BlogPostPaginator/index.d.ts +0 -2
  67. package/lib/theme/BlogSidebar/Content/index.d.ts +11 -0
  68. package/lib/theme/BlogSidebar/Content/index.js +41 -0
  69. package/lib/theme/BlogSidebar/Desktop/index.d.ts +4 -3
  70. package/lib/theme/BlogSidebar/Desktop/index.js +24 -17
  71. package/lib/theme/BlogSidebar/Desktop/styles.module.css +5 -0
  72. package/lib/theme/BlogSidebar/Mobile/index.d.ts +4 -3
  73. package/lib/theme/BlogSidebar/Mobile/index.js +25 -17
  74. package/lib/theme/BlogSidebar/Mobile/styles.module.css +10 -0
  75. package/lib/theme/BlogSidebar/index.d.ts +0 -2
  76. package/lib/theme/BlogTagsListPage/index.d.ts +0 -2
  77. package/lib/theme/BlogTagsPostsPage/index.d.ts +0 -2
  78. package/lib/theme/BlogTagsPostsPage/index.js +3 -31
  79. package/lib/theme/CodeBlock/Content/Element.d.ts +0 -2
  80. package/lib/theme/CodeBlock/Content/String.d.ts +0 -2
  81. package/lib/theme/CodeBlock/CopyButton/index.d.ts +0 -2
  82. package/lib/theme/CodeBlock/Line/index.d.ts +0 -2
  83. package/lib/theme/CodeBlock/WordWrapButton/index.d.ts +0 -2
  84. package/lib/theme/CodeBlock/index.d.ts +0 -2
  85. package/lib/theme/CodeInline/index.d.ts +0 -2
  86. package/lib/theme/ColorModeToggle/index.d.ts +0 -1
  87. package/lib/theme/ContentVisibility/Draft/index.d.ts +8 -0
  88. package/lib/theme/ContentVisibility/Draft/index.js +24 -0
  89. package/lib/theme/{Unlisted → ContentVisibility/Unlisted}/index.d.ts +1 -3
  90. package/lib/theme/ContentVisibility/index.d.ts +8 -0
  91. package/lib/theme/ContentVisibility/index.js +21 -0
  92. package/lib/theme/Details/index.d.ts +0 -2
  93. package/lib/theme/DocBreadcrumbs/Items/Home/index.d.ts +0 -1
  94. package/lib/theme/DocBreadcrumbs/index.d.ts +0 -1
  95. package/lib/theme/DocBreadcrumbs/index.js +2 -4
  96. package/lib/theme/DocCard/index.d.ts +0 -2
  97. package/lib/theme/DocCard/index.js +2 -2
  98. package/lib/theme/DocCardList/index.d.ts +0 -2
  99. package/lib/theme/DocCardList/index.js +1 -1
  100. package/lib/theme/DocCategoryGeneratedIndexPage/index.d.ts +0 -2
  101. package/lib/theme/DocCategoryGeneratedIndexPage/index.js +2 -4
  102. package/lib/theme/DocItem/Content/index.d.ts +0 -2
  103. package/lib/theme/DocItem/Content/index.js +1 -1
  104. package/lib/theme/DocItem/Footer/index.d.ts +0 -1
  105. package/lib/theme/DocItem/Footer/index.js +1 -1
  106. package/lib/theme/DocItem/Layout/index.d.ts +0 -2
  107. package/lib/theme/DocItem/Layout/index.js +4 -6
  108. package/lib/theme/DocItem/Metadata/index.d.ts +0 -1
  109. package/lib/theme/DocItem/Metadata/index.js +1 -1
  110. package/lib/theme/DocItem/Paginator/index.d.ts +0 -1
  111. package/lib/theme/DocItem/Paginator/index.js +1 -1
  112. package/lib/theme/DocItem/TOC/Desktop/index.d.ts +0 -1
  113. package/lib/theme/DocItem/TOC/Desktop/index.js +1 -1
  114. package/lib/theme/DocItem/TOC/Mobile/index.d.ts +0 -1
  115. package/lib/theme/DocItem/TOC/Mobile/index.js +1 -1
  116. package/lib/theme/DocItem/index.d.ts +0 -2
  117. package/lib/theme/DocItem/index.js +1 -1
  118. package/lib/theme/DocPaginator/index.d.ts +0 -2
  119. package/lib/theme/DocRoot/Layout/Main/index.d.ts +0 -2
  120. package/lib/theme/DocRoot/Layout/Main/index.js +1 -1
  121. package/lib/theme/DocRoot/Layout/Sidebar/ExpandButton/index.d.ts +0 -2
  122. package/lib/theme/DocRoot/Layout/Sidebar/index.d.ts +0 -2
  123. package/lib/theme/DocRoot/Layout/Sidebar/index.js +1 -1
  124. package/lib/theme/DocRoot/Layout/index.d.ts +0 -2
  125. package/lib/theme/DocRoot/Layout/index.js +1 -1
  126. package/lib/theme/DocRoot/index.d.ts +0 -2
  127. package/lib/theme/DocRoot/index.js +1 -1
  128. package/lib/theme/DocSidebar/Desktop/CollapseButton/index.d.ts +0 -2
  129. package/lib/theme/DocSidebar/Desktop/Content/index.d.ts +0 -2
  130. package/lib/theme/DocSidebar/Desktop/index.d.ts +0 -1
  131. package/lib/theme/DocSidebar/Mobile/index.d.ts +0 -1
  132. package/lib/theme/DocSidebar/index.d.ts +0 -2
  133. package/lib/theme/DocSidebarItem/Category/index.d.ts +0 -2
  134. package/lib/theme/DocSidebarItem/Category/index.js +2 -2
  135. package/lib/theme/DocSidebarItem/Html/index.d.ts +0 -2
  136. package/lib/theme/DocSidebarItem/Link/index.d.ts +0 -2
  137. package/lib/theme/DocSidebarItem/Link/index.js +1 -1
  138. package/lib/theme/DocSidebarItem/index.d.ts +0 -2
  139. package/lib/theme/DocSidebarItems/index.d.ts +0 -1
  140. package/lib/theme/DocSidebarItems/index.js +1 -1
  141. package/lib/theme/DocTagDocListPage/index.d.ts +0 -2
  142. package/lib/theme/DocTagDocListPage/index.js +1 -1
  143. package/lib/theme/DocTagsListPage/index.d.ts +0 -2
  144. package/lib/theme/DocVersionBadge/index.d.ts +0 -2
  145. package/lib/theme/DocVersionBadge/index.js +1 -1
  146. package/lib/theme/DocVersionBanner/index.d.ts +0 -2
  147. package/lib/theme/DocVersionBanner/index.js +1 -1
  148. package/lib/theme/DocVersionRoot/index.d.ts +0 -2
  149. package/lib/theme/DocVersionRoot/index.js +3 -3
  150. package/lib/theme/DocsRoot/index.d.ts +0 -2
  151. package/lib/theme/EditMetaRow/index.d.ts +0 -2
  152. package/lib/theme/EditThisPage/index.d.ts +0 -2
  153. package/lib/theme/ErrorPageContent.d.ts +0 -2
  154. package/lib/theme/Footer/Copyright/index.d.ts +0 -2
  155. package/lib/theme/Footer/Layout/index.d.ts +0 -2
  156. package/lib/theme/Footer/LinkItem/index.d.ts +0 -2
  157. package/lib/theme/Footer/Links/MultiColumn/index.d.ts +0 -2
  158. package/lib/theme/Footer/Links/Simple/index.d.ts +0 -2
  159. package/lib/theme/Footer/Links/index.d.ts +0 -2
  160. package/lib/theme/Footer/Logo/index.d.ts +0 -2
  161. package/lib/theme/Heading/index.d.ts +0 -2
  162. package/lib/theme/Icon/Arrow/index.d.ts +0 -2
  163. package/lib/theme/Icon/Close/index.d.ts +0 -2
  164. package/lib/theme/Icon/Copy/index.d.ts +0 -2
  165. package/lib/theme/Icon/DarkMode/index.d.ts +0 -2
  166. package/lib/theme/Icon/Edit/index.d.ts +0 -2
  167. package/lib/theme/Icon/ExternalLink/index.d.ts +0 -2
  168. package/lib/theme/Icon/Home/index.d.ts +0 -2
  169. package/lib/theme/Icon/Language/index.d.ts +0 -2
  170. package/lib/theme/Icon/LightMode/index.d.ts +0 -2
  171. package/lib/theme/Icon/Menu/index.d.ts +0 -2
  172. package/lib/theme/Icon/Socials/Default/index.d.ts +9 -0
  173. package/lib/theme/Icon/Socials/Default/index.js +30 -0
  174. package/lib/theme/Icon/Socials/GitHub/index.d.ts +9 -0
  175. package/lib/theme/Icon/Socials/GitHub/index.js +25 -0
  176. package/lib/theme/Icon/Socials/GitHub/styles.module.css +14 -0
  177. package/lib/theme/Icon/Socials/LinkedIn/index.d.ts +9 -0
  178. package/lib/theme/Icon/Socials/LinkedIn/index.js +24 -0
  179. package/lib/theme/Icon/Socials/StackOverflow/index.d.ts +9 -0
  180. package/lib/theme/Icon/Socials/StackOverflow/index.js +27 -0
  181. package/lib/theme/Icon/Socials/Twitter/index.d.ts +9 -0
  182. package/lib/theme/Icon/Socials/Twitter/index.js +24 -0
  183. package/lib/theme/Icon/Socials/X/index.d.ts +9 -0
  184. package/lib/theme/Icon/Socials/X/index.js +25 -0
  185. package/lib/theme/Icon/Socials/X/styles.module.css +14 -0
  186. package/lib/theme/Icon/Success/index.d.ts +0 -2
  187. package/lib/theme/Icon/WordWrap/index.d.ts +0 -2
  188. package/lib/theme/LastUpdated/index.d.ts +0 -2
  189. package/lib/theme/Layout/Provider/index.d.ts +0 -2
  190. package/lib/theme/Layout/Provider/index.js +1 -1
  191. package/lib/theme/Layout/index.d.ts +0 -3
  192. package/lib/theme/Logo/index.d.ts +0 -2
  193. package/lib/theme/MDXComponents/A.d.ts +0 -2
  194. package/lib/theme/MDXComponents/Code.d.ts +0 -2
  195. package/lib/theme/MDXComponents/Details.d.ts +0 -2
  196. package/lib/theme/MDXComponents/Heading.d.ts +0 -2
  197. package/lib/theme/MDXComponents/Img/index.d.ts +0 -2
  198. package/lib/theme/MDXComponents/Li.d.ts +0 -1
  199. package/lib/theme/MDXComponents/Pre.d.ts +0 -1
  200. package/lib/theme/MDXComponents/Ul/index.d.ts +0 -2
  201. package/lib/theme/MDXComponents/index.d.ts +0 -1
  202. package/lib/theme/MDXContent/index.d.ts +0 -2
  203. package/lib/theme/MDXPage/index.d.ts +0 -2
  204. package/lib/theme/MDXPage/index.js +10 -13
  205. package/lib/theme/Mermaid.d.ts +0 -1
  206. package/lib/theme/Navbar/ColorModeToggle/index.d.ts +0 -2
  207. package/lib/theme/Navbar/Content/index.d.ts +0 -1
  208. package/lib/theme/Navbar/Layout/index.d.ts +0 -2
  209. package/lib/theme/Navbar/Logo/index.d.ts +0 -1
  210. package/lib/theme/Navbar/MobileSidebar/Header/index.d.ts +0 -1
  211. package/lib/theme/Navbar/MobileSidebar/Layout/index.d.ts +0 -2
  212. package/lib/theme/Navbar/MobileSidebar/PrimaryMenu/index.d.ts +0 -1
  213. package/lib/theme/Navbar/MobileSidebar/SecondaryMenu/index.d.ts +0 -1
  214. package/lib/theme/Navbar/MobileSidebar/Toggle/index.d.ts +0 -1
  215. package/lib/theme/Navbar/MobileSidebar/index.d.ts +0 -1
  216. package/lib/theme/Navbar/Search/index.d.ts +0 -2
  217. package/lib/theme/Navbar/index.d.ts +0 -1
  218. package/lib/theme/NavbarItem/ComponentTypes.d.ts +0 -1
  219. package/lib/theme/NavbarItem/DefaultNavbarItem.d.ts +0 -2
  220. package/lib/theme/NavbarItem/DocNavbarItem.d.ts +0 -2
  221. package/lib/theme/NavbarItem/DocNavbarItem.js +4 -2
  222. package/lib/theme/NavbarItem/DocSidebarNavbarItem.d.ts +0 -2
  223. package/lib/theme/NavbarItem/DocSidebarNavbarItem.js +4 -2
  224. package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.d.ts +0 -2
  225. package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +19 -14
  226. package/lib/theme/NavbarItem/DocsVersionNavbarItem.d.ts +0 -2
  227. package/lib/theme/NavbarItem/DocsVersionNavbarItem.js +1 -1
  228. package/lib/theme/NavbarItem/DropdownNavbarItem/index.d.ts +0 -2
  229. package/lib/theme/NavbarItem/HtmlNavbarItem.d.ts +0 -2
  230. package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.d.ts +0 -2
  231. package/lib/theme/NavbarItem/NavbarNavLink.d.ts +0 -2
  232. package/lib/theme/NavbarItem/SearchNavbarItem.d.ts +0 -2
  233. package/lib/theme/NavbarItem/index.d.ts +0 -2
  234. package/lib/theme/NotFound/Content/index.d.ts +0 -2
  235. package/lib/theme/NotFound/index.d.ts +0 -1
  236. package/lib/theme/PaginatorNavLink/index.d.ts +0 -2
  237. package/lib/theme/SearchBar.d.ts +0 -1
  238. package/lib/theme/SearchMetadata/index.d.ts +0 -2
  239. package/lib/theme/SiteMetadata/index.d.ts +0 -1
  240. package/lib/theme/SkipToContent/index.d.ts +0 -1
  241. package/lib/theme/TOC/index.d.ts +0 -2
  242. package/lib/theme/TOCCollapsible/CollapseButton/index.d.ts +0 -2
  243. package/lib/theme/TOCCollapsible/index.d.ts +0 -2
  244. package/lib/theme/TOCInline/index.d.ts +0 -2
  245. package/lib/theme/TOCItems/Tree.d.ts +0 -1
  246. package/lib/theme/TOCItems/index.d.ts +0 -2
  247. package/lib/theme/TabItem/index.d.ts +0 -2
  248. package/lib/theme/Tabs/index.d.ts +0 -2
  249. package/lib/theme/Tabs/index.js +3 -1
  250. package/lib/theme/Tag/index.d.ts +0 -2
  251. package/lib/theme/TagsListByLetter/index.d.ts +0 -2
  252. package/lib/theme/TagsListInline/index.d.ts +0 -2
  253. package/lib/theme/ThemedImage/index.d.ts +0 -2
  254. package/lib/translations.js +2 -3
  255. package/package.json +15 -15
  256. package/src/getSwizzleConfig.ts +32 -0
  257. package/src/options.ts +18 -2
  258. package/src/theme/Blog/Components/Author/Socials/index.tsx +66 -0
  259. package/src/theme/Blog/Components/Author/Socials/styles.module.css +39 -0
  260. package/src/theme/Blog/Components/Author/index.tsx +99 -0
  261. package/src/theme/Blog/Components/Author/styles.module.css +74 -0
  262. package/src/theme/Blog/Pages/BlogAuthorsListPage/index.tsx +62 -0
  263. package/src/theme/Blog/Pages/BlogAuthorsListPage/styles.module.css +11 -0
  264. package/src/theme/Blog/Pages/BlogAuthorsPostsPage/index.tsx +73 -0
  265. package/src/theme/BlogListPage/StructuredData/index.tsx +1 -1
  266. package/src/theme/BlogPostItem/Content/index.tsx +1 -1
  267. package/src/theme/BlogPostItem/Footer/index.tsx +1 -1
  268. package/src/theme/BlogPostItem/Header/Authors/index.tsx +5 -4
  269. package/src/theme/BlogPostItem/Header/Authors/styles.module.css +0 -1
  270. package/src/theme/BlogPostItem/Header/Info/index.tsx +2 -4
  271. package/src/theme/BlogPostItem/Header/Title/index.tsx +1 -1
  272. package/src/theme/BlogPostItem/index.tsx +1 -1
  273. package/src/theme/BlogPostItems/index.tsx +1 -1
  274. package/src/theme/BlogPostPage/Metadata/index.tsx +1 -1
  275. package/src/theme/BlogPostPage/StructuredData/index.tsx +1 -1
  276. package/src/theme/BlogPostPage/index.tsx +7 -4
  277. package/src/theme/BlogSidebar/Content/index.tsx +57 -0
  278. package/src/theme/BlogSidebar/Desktop/index.tsx +27 -17
  279. package/src/theme/BlogSidebar/Desktop/styles.module.css +5 -0
  280. package/src/theme/BlogSidebar/Mobile/index.tsx +29 -17
  281. package/src/theme/BlogSidebar/Mobile/styles.module.css +10 -0
  282. package/src/theme/BlogTagsPostsPage/index.tsx +3 -33
  283. package/src/theme/ContentVisibility/Draft/index.tsx +27 -0
  284. package/src/theme/{Unlisted → ContentVisibility/Unlisted}/index.tsx +1 -1
  285. package/src/theme/ContentVisibility/index.tsx +27 -0
  286. package/src/theme/DocBreadcrumbs/index.tsx +2 -4
  287. package/src/theme/DocCard/index.tsx +2 -2
  288. package/src/theme/DocCardList/index.tsx +1 -1
  289. package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +2 -4
  290. package/src/theme/DocItem/Content/index.tsx +1 -1
  291. package/src/theme/DocItem/Footer/index.tsx +1 -1
  292. package/src/theme/DocItem/Layout/index.tsx +4 -6
  293. package/src/theme/DocItem/Metadata/index.tsx +1 -1
  294. package/src/theme/DocItem/Paginator/index.tsx +1 -1
  295. package/src/theme/DocItem/TOC/Desktop/index.tsx +1 -1
  296. package/src/theme/DocItem/TOC/Mobile/index.tsx +1 -1
  297. package/src/theme/DocItem/index.tsx +1 -1
  298. package/src/theme/DocRoot/Layout/Main/index.tsx +1 -1
  299. package/src/theme/DocRoot/Layout/Sidebar/index.tsx +1 -1
  300. package/src/theme/DocRoot/Layout/index.tsx +1 -1
  301. package/src/theme/DocRoot/index.tsx +1 -1
  302. package/src/theme/DocSidebarItem/Category/index.tsx +2 -2
  303. package/src/theme/DocSidebarItem/Link/index.tsx +1 -1
  304. package/src/theme/DocSidebarItems/index.tsx +1 -1
  305. package/src/theme/DocTagDocListPage/index.tsx +1 -1
  306. package/src/theme/DocVersionBadge/index.tsx +1 -1
  307. package/src/theme/DocVersionBanner/index.tsx +1 -1
  308. package/src/theme/DocVersionRoot/index.tsx +3 -3
  309. package/src/theme/Icon/Socials/Default/index.tsx +33 -0
  310. package/src/theme/Icon/Socials/GitHub/index.tsx +29 -0
  311. package/src/theme/Icon/Socials/GitHub/styles.module.css +14 -0
  312. package/src/theme/Icon/Socials/LinkedIn/index.tsx +27 -0
  313. package/src/theme/Icon/Socials/StackOverflow/index.tsx +30 -0
  314. package/src/theme/Icon/Socials/Twitter/index.tsx +27 -0
  315. package/src/theme/Icon/Socials/X/index.tsx +29 -0
  316. package/src/theme/Icon/Socials/X/styles.module.css +14 -0
  317. package/src/theme/Layout/Provider/index.tsx +1 -1
  318. package/src/theme/MDXPage/index.tsx +10 -13
  319. package/src/theme/NavbarItem/DocNavbarItem.tsx +4 -2
  320. package/src/theme/NavbarItem/DocSidebarNavbarItem.tsx +4 -2
  321. package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +32 -16
  322. package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +1 -1
  323. package/src/theme/Tabs/index.tsx +3 -1
  324. package/src/theme-classic.d.ts +106 -12
  325. package/lib/theme/BlogPostItem/Header/Author/index.d.ts +0 -10
  326. package/lib/theme/BlogPostItem/Header/Author/index.js +0 -39
  327. package/src/theme/BlogPostItem/Header/Author/index.tsx +0 -47
  328. /package/lib/theme/{Unlisted → ContentVisibility/Unlisted}/index.js +0 -0
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ import clsx from 'clsx';
9
+ import {
10
+ PageMetadata,
11
+ HtmlClassNameProvider,
12
+ ThemeClassNames,
13
+ } from '@docusaurus/theme-common';
14
+ import {translateBlogAuthorsListPageTitle} from '@docusaurus/theme-common/internal';
15
+ import BlogLayout from '@theme/BlogLayout';
16
+ import SearchMetadata from '@theme/SearchMetadata';
17
+ import Heading from '@theme/Heading';
18
+ import Author from '@theme/Blog/Components/Author';
19
+ import styles from './styles.module.css';
20
+ function AuthorListItem({author}) {
21
+ return (
22
+ <li className={styles.authorListItem}>
23
+ <Author as="h2" author={author} count={author.count} />
24
+ </li>
25
+ );
26
+ }
27
+ function AuthorsList({authors}) {
28
+ return (
29
+ <section className={clsx('margin-vert--lg', styles.authorsListSection)}>
30
+ <ul>
31
+ {authors.map((author) => (
32
+ <AuthorListItem key={author.key} author={author} />
33
+ ))}
34
+ </ul>
35
+ </section>
36
+ );
37
+ }
38
+ export default function BlogAuthorsListPage({authors, sidebar}) {
39
+ const title = translateBlogAuthorsListPageTitle();
40
+ return (
41
+ <HtmlClassNameProvider
42
+ className={clsx(
43
+ ThemeClassNames.wrapper.blogPages,
44
+ ThemeClassNames.page.blogAuthorsListPage,
45
+ )}>
46
+ <PageMetadata title={title} />
47
+ <SearchMetadata tag="blog_authors_list" />
48
+ <BlogLayout sidebar={sidebar}>
49
+ <Heading as="h1">{title}</Heading>
50
+ <AuthorsList authors={authors} />
51
+ </BlogLayout>
52
+ </HtmlClassNameProvider>
53
+ );
54
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ .authorListItem {
9
+ list-style-type: none;
10
+ margin-bottom: 2rem;
11
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import type { Props } from '@theme/Blog/Pages/BlogAuthorsPostsPage';
8
+ export default function BlogAuthorsPostsPage(props: Props): JSX.Element;
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ import clsx from 'clsx';
9
+ import {
10
+ PageMetadata,
11
+ HtmlClassNameProvider,
12
+ ThemeClassNames,
13
+ } from '@docusaurus/theme-common';
14
+ import {
15
+ useBlogAuthorPageTitle,
16
+ BlogAuthorsListViewAllLabel,
17
+ } from '@docusaurus/theme-common/internal';
18
+ import Link from '@docusaurus/Link';
19
+ import {useBlogMetadata} from '@docusaurus/plugin-content-blog/client';
20
+ import BlogLayout from '@theme/BlogLayout';
21
+ import BlogListPaginator from '@theme/BlogListPaginator';
22
+ import SearchMetadata from '@theme/SearchMetadata';
23
+ import BlogPostItems from '@theme/BlogPostItems';
24
+ import Author from '@theme/Blog/Components/Author';
25
+ function Metadata({author}) {
26
+ const title = useBlogAuthorPageTitle(author);
27
+ return (
28
+ <>
29
+ <PageMetadata title={title} />
30
+ <SearchMetadata tag="blog_authors_posts" />
31
+ </>
32
+ );
33
+ }
34
+ function ViewAllAuthorsLink() {
35
+ const {authorsListPath} = useBlogMetadata();
36
+ return (
37
+ <Link href={authorsListPath}>
38
+ <BlogAuthorsListViewAllLabel />
39
+ </Link>
40
+ );
41
+ }
42
+ function Content({author, items, sidebar, listMetadata}) {
43
+ return (
44
+ <BlogLayout sidebar={sidebar}>
45
+ <header className="margin-bottom--xl">
46
+ <Author as="h1" author={author} />
47
+ {author.description && <p>{author.description}</p>}
48
+ <ViewAllAuthorsLink />
49
+ </header>
50
+ <hr />
51
+ <BlogPostItems items={items} />
52
+ <BlogListPaginator metadata={listMetadata} />
53
+ </BlogLayout>
54
+ );
55
+ }
56
+ export default function BlogAuthorsPostsPage(props) {
57
+ return (
58
+ <HtmlClassNameProvider
59
+ className={clsx(
60
+ ThemeClassNames.wrapper.blogPages,
61
+ ThemeClassNames.page.blogAuthorsPostsPage,
62
+ )}>
63
+ <Metadata {...props} />
64
+ <Content {...props} />
65
+ </HtmlClassNameProvider>
66
+ );
67
+ }
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference types="@docusaurus/plugin-content-blog" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogArchivePage';
10
8
  export default function BlogArchive({ archive }: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogLayout';
10
8
  export default function BlogLayout(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference types="@docusaurus/plugin-content-blog" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogListPage/StructuredData';
10
8
  export default function BlogListPageStructuredData(props: Props): JSX.Element;
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import Head from '@docusaurus/Head';
9
- import {useBlogListPageStructuredData} from '@docusaurus/theme-common';
9
+ import {useBlogListPageStructuredData} from '@docusaurus/plugin-content-blog/client';
10
10
  export default function BlogListPageStructuredData(props) {
11
11
  const structuredData = useBlogListPageStructuredData(props);
12
12
  return (
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference types="@docusaurus/plugin-content-blog" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogListPage';
10
8
  export default function BlogListPage(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogListPaginator';
10
8
  export default function BlogListPaginator(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogPostItem/Container';
10
8
  export default function BlogPostItemContainer({ children, className, }: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogPostItem/Content';
10
8
  export default function BlogPostItemContent({ children, className, }: Props): JSX.Element;
@@ -7,7 +7,7 @@
7
7
  import React from 'react';
8
8
  import clsx from 'clsx';
9
9
  import {blogPostContainerID} from '@docusaurus/utils-common';
10
- import {useBlogPost} from '@docusaurus/theme-common/internal';
10
+ import {useBlogPost} from '@docusaurus/plugin-content-blog/client';
11
11
  import MDXContent from '@theme/MDXContent';
12
12
  export default function BlogPostItemContent({children, className}) {
13
13
  const {isBlogPostPage} = useBlogPost();
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogPostItem/Footer/ReadMoreLink';
10
8
  export default function BlogPostItemFooterReadMoreLink(props: Props): JSX.Element;
@@ -4,5 +4,4 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference types="react" />
8
7
  export default function BlogPostItemFooter(): JSX.Element | null;
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import clsx from 'clsx';
9
- import {useBlogPost} from '@docusaurus/theme-common/internal';
9
+ import {useBlogPost} from '@docusaurus/plugin-content-blog/client';
10
10
  import {ThemeClassNames} from '@docusaurus/theme-common';
11
11
  import EditMetaRow from '@theme/EditMetaRow';
12
12
  import TagsListInline from '@theme/TagsListInline';
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogPostItem/Header/Authors';
10
8
  export default function BlogPostItemHeaderAuthors({ className, }: Props): JSX.Element | null;
@@ -6,8 +6,8 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import clsx from 'clsx';
9
- import {useBlogPost} from '@docusaurus/theme-common/internal';
10
- import BlogPostItemHeaderAuthor from '@theme/BlogPostItem/Header/Author';
9
+ import {useBlogPost} from '@docusaurus/plugin-content-blog/client';
10
+ import BlogAuthor from '@theme/Blog/Components/Author';
11
11
  import styles from './styles.module.css';
12
12
  // Component responsible for the authors layout
13
13
  export default function BlogPostItemHeaderAuthors({className}) {
@@ -20,6 +20,7 @@ export default function BlogPostItemHeaderAuthors({className}) {
20
20
  return null;
21
21
  }
22
22
  const imageOnly = authors.every(({name}) => !name);
23
+ const singleAuthor = authors.length === 1;
23
24
  return (
24
25
  <div
25
26
  className={clsx(
@@ -30,11 +31,11 @@ export default function BlogPostItemHeaderAuthors({className}) {
30
31
  {authors.map((author, idx) => (
31
32
  <div
32
33
  className={clsx(
33
- !imageOnly && 'col col--6',
34
+ !imageOnly && (singleAuthor ? 'col col--12' : 'col col--6'),
34
35
  imageOnly ? styles.imageOnlyAuthorCol : styles.authorCol,
35
36
  )}
36
37
  key={idx}>
37
- <BlogPostItemHeaderAuthor
38
+ <BlogAuthor
38
39
  author={{
39
40
  ...author,
40
41
  // Handle author images using relative paths
@@ -7,7 +7,6 @@
7
7
 
8
8
  .authorCol {
9
9
  max-width: inherit !important;
10
- flex-grow: 1 !important;
11
10
  }
12
11
 
13
12
  .imageOnlyAuthorRow {
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogPostItem/Header/Info';
10
8
  export default function BlogPostItemHeaderInfo({ className, }: Props): JSX.Element;
@@ -8,10 +8,8 @@ import React from 'react';
8
8
  import clsx from 'clsx';
9
9
  import {translate} from '@docusaurus/Translate';
10
10
  import {usePluralForm} from '@docusaurus/theme-common';
11
- import {
12
- useBlogPost,
13
- useDateTimeFormat,
14
- } from '@docusaurus/theme-common/internal';
11
+ import {useDateTimeFormat} from '@docusaurus/theme-common/internal';
12
+ import {useBlogPost} from '@docusaurus/plugin-content-blog/client';
15
13
  import styles from './styles.module.css';
16
14
  // Very simple pluralization: probably good enough for now
17
15
  function useReadingTimePlural() {
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogPostItem/Header/Title';
10
8
  export default function BlogPostItemHeaderTitle({ className, }: Props): JSX.Element;
@@ -7,7 +7,7 @@
7
7
  import React from 'react';
8
8
  import clsx from 'clsx';
9
9
  import Link from '@docusaurus/Link';
10
- import {useBlogPost} from '@docusaurus/theme-common/internal';
10
+ import {useBlogPost} from '@docusaurus/plugin-content-blog/client';
11
11
  import styles from './styles.module.css';
12
12
  export default function BlogPostItemHeaderTitle({className}) {
13
13
  const {metadata, isBlogPostPage} = useBlogPost();
@@ -4,5 +4,4 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference types="react" />
8
7
  export default function BlogPostItemHeader(): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogPostItem';
10
8
  export default function BlogPostItem({ children, className, }: Props): JSX.Element;
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import clsx from 'clsx';
9
- import {useBlogPost} from '@docusaurus/theme-common/internal';
9
+ import {useBlogPost} from '@docusaurus/plugin-content-blog/client';
10
10
  import BlogPostItemContainer from '@theme/BlogPostItem/Container';
11
11
  import BlogPostItemHeader from '@theme/BlogPostItem/Header';
12
12
  import BlogPostItemContent from '@theme/BlogPostItem/Content';
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogPostItems';
10
8
  export default function BlogPostItems({ items, component: BlogPostItemComponent, }: Props): JSX.Element;
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
- import {BlogPostProvider} from '@docusaurus/theme-common/internal';
8
+ import {BlogPostProvider} from '@docusaurus/plugin-content-blog/client';
9
9
  import BlogPostItem from '@theme/BlogPostItem';
10
10
  export default function BlogPostItems({
11
11
  items,
@@ -4,5 +4,4 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference types="react" />
8
7
  export default function BlogPostPageMetadata(): JSX.Element;
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import {PageMetadata} from '@docusaurus/theme-common';
9
- import {useBlogPost} from '@docusaurus/theme-common/internal';
9
+ import {useBlogPost} from '@docusaurus/plugin-content-blog/client';
10
10
  export default function BlogPostPageMetadata() {
11
11
  const {assets, metadata} = useBlogPost();
12
12
  const {title, description, date, tags, authors, frontMatter} = metadata;
@@ -4,5 +4,4 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference types="react" />
8
7
  export default function BlogPostStructuredData(): JSX.Element;
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import Head from '@docusaurus/Head';
9
- import {useBlogPostStructuredData} from '@docusaurus/theme-common';
9
+ import {useBlogPostStructuredData} from '@docusaurus/plugin-content-blog/client';
10
10
  export default function BlogPostStructuredData() {
11
11
  const structuredData = useBlogPostStructuredData();
12
12
  return (
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference types="@docusaurus/plugin-content-blog" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogPostPage';
10
8
  export default function BlogPostPage(props: Props): JSX.Element;
@@ -7,17 +7,20 @@
7
7
  import React from 'react';
8
8
  import clsx from 'clsx';
9
9
  import {HtmlClassNameProvider, ThemeClassNames} from '@docusaurus/theme-common';
10
- import {BlogPostProvider, useBlogPost} from '@docusaurus/theme-common/internal';
10
+ import {
11
+ BlogPostProvider,
12
+ useBlogPost,
13
+ } from '@docusaurus/plugin-content-blog/client';
11
14
  import BlogLayout from '@theme/BlogLayout';
12
15
  import BlogPostItem from '@theme/BlogPostItem';
13
16
  import BlogPostPaginator from '@theme/BlogPostPaginator';
14
17
  import BlogPostPageMetadata from '@theme/BlogPostPage/Metadata';
15
18
  import BlogPostPageStructuredData from '@theme/BlogPostPage/StructuredData';
16
19
  import TOC from '@theme/TOC';
17
- import Unlisted from '@theme/Unlisted';
20
+ import ContentVisibility from '@theme/ContentVisibility';
18
21
  function BlogPostPageContent({sidebar, children}) {
19
22
  const {metadata, toc} = useBlogPost();
20
- const {nextItem, prevItem, frontMatter, unlisted} = metadata;
23
+ const {nextItem, prevItem, frontMatter} = metadata;
21
24
  const {
22
25
  hide_table_of_contents: hideTableOfContents,
23
26
  toc_min_heading_level: tocMinHeadingLevel,
@@ -35,7 +38,7 @@ function BlogPostPageContent({sidebar, children}) {
35
38
  />
36
39
  ) : undefined
37
40
  }>
38
- {unlisted && <Unlisted />}
41
+ <ContentVisibility metadata={metadata} />
39
42
 
40
43
  <BlogPostItem>{children}</BlogPostItem>
41
44
 
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/BlogPostPaginator';
10
8
  export default function BlogPostPaginator(props: Props): JSX.Element;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React, { type ReactNode } from 'react';
8
+ import type { Props } from '@theme/BlogSidebar/Content';
9
+ declare function BlogSidebarContent({ items, yearGroupHeadingClassName, ListComponent, }: Props): ReactNode;
10
+ declare const _default: React.MemoExoticComponent<typeof BlogSidebarContent>;
11
+ export default _default;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React, {memo} from 'react';
8
+ import {useThemeConfig} from '@docusaurus/theme-common';
9
+ import {groupBlogSidebarItemsByYear} from '@docusaurus/plugin-content-blog/client';
10
+ import Heading from '@theme/Heading';
11
+ function BlogSidebarYearGroup({year, yearGroupHeadingClassName, children}) {
12
+ return (
13
+ <div role="group">
14
+ <Heading as="h3" className={yearGroupHeadingClassName}>
15
+ {year}
16
+ </Heading>
17
+ {children}
18
+ </div>
19
+ );
20
+ }
21
+ function BlogSidebarContent({items, yearGroupHeadingClassName, ListComponent}) {
22
+ const themeConfig = useThemeConfig();
23
+ if (themeConfig.blog.sidebar.groupByYear) {
24
+ const itemsByYear = groupBlogSidebarItemsByYear(items);
25
+ return (
26
+ <>
27
+ {itemsByYear.map(([year, yearItems]) => (
28
+ <BlogSidebarYearGroup
29
+ key={year}
30
+ year={year}
31
+ yearGroupHeadingClassName={yearGroupHeadingClassName}>
32
+ <ListComponent items={yearItems} />
33
+ </BlogSidebarYearGroup>
34
+ ))}
35
+ </>
36
+ );
37
+ } else {
38
+ return <ListComponent items={items} />;
39
+ }
40
+ }
41
+ export default memo(BlogSidebarContent);
@@ -4,7 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
7
+ import React from 'react';
9
8
  import type { Props } from '@theme/BlogSidebar/Desktop';
10
- export default function BlogSidebarDesktop({ sidebar }: Props): JSX.Element;
9
+ declare function BlogSidebarDesktop({ sidebar }: Props): React.JSX.Element;
10
+ declare const _default: React.MemoExoticComponent<typeof BlogSidebarDesktop>;
11
+ export default _default;
@@ -4,13 +4,27 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import React from 'react';
7
+ import React, {memo} from 'react';
8
8
  import clsx from 'clsx';
9
- import Link from '@docusaurus/Link';
10
9
  import {translate} from '@docusaurus/Translate';
11
- import {useVisibleBlogSidebarItems} from '@docusaurus/theme-common/internal';
10
+ import {
11
+ useVisibleBlogSidebarItems,
12
+ BlogSidebarItemList,
13
+ } from '@docusaurus/plugin-content-blog/client';
14
+ import BlogSidebarContent from '@theme/BlogSidebar/Content';
12
15
  import styles from './styles.module.css';
13
- export default function BlogSidebarDesktop({sidebar}) {
16
+ const ListComponent = ({items}) => {
17
+ return (
18
+ <BlogSidebarItemList
19
+ items={items}
20
+ ulClassName={clsx(styles.sidebarItemList, 'clean-list')}
21
+ liClassName={styles.sidebarItem}
22
+ linkClassName={styles.sidebarItemLink}
23
+ linkActiveClassName={styles.sidebarItemLinkActive}
24
+ />
25
+ );
26
+ };
27
+ function BlogSidebarDesktop({sidebar}) {
14
28
  const items = useVisibleBlogSidebarItems(sidebar.items);
15
29
  return (
16
30
  <aside className="col col--3">
@@ -24,20 +38,13 @@ export default function BlogSidebarDesktop({sidebar}) {
24
38
  <div className={clsx(styles.sidebarItemTitle, 'margin-bottom--md')}>
25
39
  {sidebar.title}
26
40
  </div>
27
- <ul className={clsx(styles.sidebarItemList, 'clean-list')}>
28
- {items.map((item) => (
29
- <li key={item.permalink} className={styles.sidebarItem}>
30
- <Link
31
- isNavLink
32
- to={item.permalink}
33
- className={styles.sidebarItemLink}
34
- activeClassName={styles.sidebarItemLinkActive}>
35
- {item.title}
36
- </Link>
37
- </li>
38
- ))}
39
- </ul>
41
+ <BlogSidebarContent
42
+ items={items}
43
+ ListComponent={ListComponent}
44
+ yearGroupHeadingClassName={styles.yearGroupHeading}
45
+ />
40
46
  </nav>
41
47
  </aside>
42
48
  );
43
49
  }
50
+ export default memo(BlogSidebarDesktop);
@@ -43,3 +43,8 @@
43
43
  display: none;
44
44
  }
45
45
  }
46
+
47
+ .yearGroupHeading {
48
+ margin-top: 1.6rem;
49
+ margin-bottom: 0.4rem;
50
+ }
@@ -4,7 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
7
+ import React from 'react';
9
8
  import type { Props } from '@theme/BlogSidebar/Mobile';
10
- export default function BlogSidebarMobile(props: Props): JSX.Element;
9
+ declare function BlogSidebarMobile(props: Props): JSX.Element;
10
+ declare const _default: React.MemoExoticComponent<typeof BlogSidebarMobile>;
11
+ export default _default;