-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: upgrade to docusaurus 3 #712
Conversation
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
⚡️ Lighthouse report for the deploy preview of this PR
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
…lly.com into docusaurus3-beta
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
…lly.com into docusaurus3-beta
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
1 similar comment
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-sky-0bfc7e803-712.westeurope.1.azurestaticapps.net |
This PR migrates the blog to Docusaurus v3; specifically 3.0.0-rc.1. plugins blog post: #717
image-fetchpriority-rehype-plugin
This PR migrates the rehype plugin: image-fetchpriority-rehype-plugin. See image-fetchpriority-rehype-plugin.mjs
image-cloudinary-rehype-plugin
I have been unsuccessful in attempting to migrate the the cloudinary rehype plugin which I've surfaced in the discord forum: https://discord.com/channels/398180168688074762/1154771869094912090/1158839648366383104Don't be fooled by blog-website/image-cloudinary-rehype-plugin.mjs - that's my failed experiment.I realise this is all very tough to understand. Essentially I'm trying to update the src of an image. You can read about it here: https://johnnyreilly.com/docusaurus-image-cloudinary-rehype-plugin#introducing-rehype-cloudinary-docusaurus and here: https://github.com/johnnyreilly/rehype-cloudinary-docusaurusThat src of an image, because this is webpack, is arequire
statement; an expression which when executed will resolve the filename of the asset on disk; something likeassets/images/title-image-3374754db55f364cd0bce20c5ff1c2c4.png
With MDX 1 I could just update the expression in the AST and it would be executed in its modified form. In MDX 2 it appears not to be and that seems to be the case because alongside the node, the
data/estree
element contains the AST of that expression. So to do a modification, there's probably a need to create a new AST for that expression.And I want to take it from something like:
require("!/home/john/code/github/blog.johnnyreilly.com/blog-website/node_modules/url-loader/dist/cjs.js?limit=0&name=assets/images/[name]-[contenthash].[ext]&fallback=/home/john/code/github/blog.johnnyreilly.com/blog-website/node_modules/file-loader/dist/cjs.js!./title-image.png").default
to:
https://res.cloudinary.com/priou/image/fetch/f_auto,q_auto,w_auto,dpr_auto/https://johnnyreilly.com${require("!/home/john/code/github/blog.johnnyreilly.com/blog-website/node_modules/url-loader/dist/cjs.js?limit=0&name=assets/images/[name]-[contenthash].[ext]&fallback=/home/john/code/github/blog.johnnyreilly.com/blog-website/node_modules/file-loader/dist/cjs.js!./title-image.png").default}
Cracked it: johnnyreilly/rehype-cloudinary-docusaurus#9