-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
I've written a number of rehype plugins for Docusaurus which I use on my blog. Here's a screenshot of https://johnnyreilly.com/azure-open-ai-generate-article-metadata-with-typescript with devtools open. Notice the <img loading="eager" fetchpriority="high" alt="..." src="..." width="800" height="450" class="img_CujE"> image tag. The loading="eager" and fetchpriority="high" are a result of the rehype plugin:
I've migrated the rehype plugin across to Docusaurus v3. However, the plugin is not invoked for the server build - only the client.
Reproducible demo
johnnyreilly/blog.johnnyreilly.com#712
Steps to reproduce
Look at the build in the pull request. If you clone that repo and checkout the docusaurus3-beta branch you can reproduce this by:
cd blog-website
yarn
yarn build
Expected behavior
We would end up with a build which demonstrates the rehype plugin has run; the outputs in the build folder featuring fetchpriority etc on image attributes.
Actual behavior
Unchanged images in output
Your environment
- Public source code: chore: upgrade to docusaurus 3 johnnyreilly/blog.johnnyreilly.com#712
- Public site URL:
- Docusaurus version used:
- Environment name and version (e.g. Chrome 89, Node.js 16.4):
- Operating system and version (e.g. Ubuntu 20.04.2 LTS):
Self-service
- I'd be willing to fix this bug myself.
