fastify / website

https://fastify.dev/
MIT License
60 stars 54 forks source link

Docusaurus v3 upgrade #223

Open james-kaguru opened 3 months ago

james-kaguru commented 3 months ago

Description

This upgraded the project dependancies to match up to what is required in docusaurus v3

Related Issues

212

Check List

james-kaguru commented 3 months ago

@Eomm There are some issues causes by upgrading docusaurus to v3 noteable the formatting from some files in the fastify/fastify docs. The previous versions of the docs have formarting (notably ones identified by running npx docusaurus-mdx-checker). The updrage to v3 might have to include seperate docs for v2 and below and v3 and above. Not sure how to achieve this but I just wanted to raise a potential bottleneck. In addition orama plugin for docusaurua moved from @orama/plugin-docusaurus to @orama/plugin-docusaurus-v3 . I have temporarily commented out the plugin in docusaurus config because it brought up some issues but Im currently working to resolve it.

Eomm commented 3 months ago

There are some issues causes by upgrading docusaurus to v3 noteable the formatting from some files in the fastify/fastify docs

Some example?

I don't get if it breaks the website build or the linting. In the latter case, no problem if we must upgrade the linting in this repo

james-kaguru commented 3 months ago

The docs from the previous versions have errors that have to be solved so that they can be run by docusaurus v3. I recently updated the docs in fastify/fastify to match the docusaurus requirements for v3 but since the docs prior to that were not correctly formated there is an error when i run npm start dev as shown below.

Screenshot 2024-05-20 at 9 53 21 PM

They are minor errors but Im not sure how we are going to update the previous docs and have the same version numbers

Eomm commented 3 months ago

They are minor errors but Im not sure how we are going to update the previous docs and have the same version numbers

Can we do some regexp magic like this?

https://github.com/fastify/website/blob/e3e433a2f50abb2020a16bdf2a5754181d80b11d/scripts/process-releases.js#L105-L113

james-kaguru commented 3 months ago

Really smart approach...Lemmi try to come up with some magic to address the issue. Also Ive just remembered that to ensure the docs in fastify/fastify continue to be compatible with docusaurus v3 we also need to ensure it runs

npx docusaurus-mdx-checker

as a requirement during build time

Eomm commented 3 weeks ago

Need to check this PR - I will do it - I'm just doing to many things 🥲

james-kaguru commented 3 weeks ago

@Eomm I also got a bit held up but Im back on it to ensure we have passing build before you review it..there some hitches as I was trying to upgrade but will notify you incase I make a breakthrough