|
@@ -0,0 +1,61 @@
|
|
|
+---
|
|
|
+title: Docusaurus v3.0.0
|
|
|
+description: Today I learned to migrate docusaurus to v3.0.0
|
|
|
+slug: docusaurus-3
|
|
|
+<!--- authors:
|
|
|
+ - name: David Windham
|
|
|
+ title: Something Else
|
|
|
+ url: https://davidawindham.com
|
|
|
+ image_url: https://davidawindham.com/wp-content/themes/daw/img/opengraph_image.jpg -->
|
|
|
+tags: [software, web]
|
|
|
+image: https://davidawindham.com/wp-content/themes/daw/img/opengraph_image.jpg
|
|
|
+hide_table_of_contents: true
|
|
|
+---
|
|
|
+
|
|
|
+Today I learned to upgrade this site to Docusaurus v3.0.0<sub>1</sub> and there were some breaking changes that had to be fixed<sub>2</sub>.
|
|
|
+
|
|
|
+<!--truncate-->
|
|
|
+
|
|
|
+The biggest changes are that version 3 requires React 18 and Typescript 5. The majority of breaking changes for me were related to the MDX<sub>3</sub> upgrade from v1 to v3 and the subsequent markdown formatting. Indented code blocks, `{brackets}`, and `<hyperlinks>` were kicking errors which took a bit of manual labor to clean up.
|
|
|
+
|
|
|
+The Prism React Renderer was also upgraded to v2 so I switched the highlighting over to the OneDark theme. I made notes in the site log<sub>4</sub> and this is now the current list of packages for this site ππΌ
|
|
|
+
|
|
|
+```js
|
|
|
+david@ovidπ :~/sites/daw_til(mainβ‘) Β» npm list
|
|
|
+daw-til-2@0.0.1 /Users/david/Sites/daw_til
|
|
|
+βββ @docusaurus/core@3.0.0
|
|
|
+βββ @docusaurus/plugin-content-blog@3.0.0
|
|
|
+βββ @docusaurus/preset-classic@3.0.0
|
|
|
+βββ @docusaurus/theme-mermaid@3.0.0
|
|
|
+βββ @mdx-js/mdx@3.0.0
|
|
|
+βββ @mdx-js/react@3.0.0
|
|
|
+βββ clsx@2.0.0
|
|
|
+βββ docusaurus-lunr-search@3.3.0
|
|
|
+βββ docusaurus-plugin-matomo@0.0.6
|
|
|
+βββ markprompt@0.1.7
|
|
|
+βββ plugin-image-zoom@1.1.0 (git+ssh://git@github.com/flexanalytics/plugin-image-zoom.git#8e1b866c79ed6d42cefc4c52f851f1dfd1d0c7de)
|
|
|
+βββ react-dom@18.2.0
|
|
|
+βββ react-player@2.13.0
|
|
|
+βββ react@18.2.0
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+I originally started this site as just a set of local markdown and text files. I migrated it to gitbook when I started storing the files in a repo and publishing them. I migrated it to Docusaurus when gitbook stopped being supported as an open source project. Nowadays, I use it constantly because it's easy to keep my docs and notes updated, in sync, and online.
|
|
|
+
|
|
|
+One of the biggest assets about keeping all of the copy (data) of these site in plain markdown files is that it's relatively easy to dump them into a vector database to use against an AI model as compared to having various flavored markup interspersed into the database of a more traditional CMS. The default Docusaurus front-end theme now handles async rendering and at some point, I might consider integrating other data sources into it.
|
|
|
+
|
|
|
+:::tip
|
|
|
+
|
|
|
+Big thanks ππΌ to SΓ©bastien Lorber<sub>5</sub> who does 90+% of the work on it.
|
|
|
+
|
|
|
+:::
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+---
|
|
|
+
|
|
|
+1. Preparing your site for Docusaurus v3 - https://docusaurus.io/blog/preparing-your-site-for-docusaurus-v3
|
|
|
+2. Docusaurus v3.0.0 Breaking Changes - https://github.com/facebook/docusaurus/discussions/9312
|
|
|
+3. MDX - https://mdxjs.com
|
|
|
+4. TIL _Help_ - [til/help](/help)
|
|
|
+5. SΓ©bastien Lorber - https://github.com/slorber
|