Skip to content
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

Docusaurus v3 upgrade #223

Merged
merged 14 commits into from
Nov 30, 2024
Merged

Docusaurus v3 upgrade #223

merged 14 commits into from
Nov 30, 2024

Conversation

james-kaguru
Copy link
Contributor

Description

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

Related Issues

#212

Check List

@james-kaguru
Copy link
Contributor Author

@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.

@@ -1 +1,187 @@
[]
[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the version* files should not be committed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well noted

@Eomm
Copy link
Member

Eomm commented May 20, 2024

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
Copy link
Contributor Author

james-kaguru commented May 20, 2024

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
Copy link
Member

Eomm commented May 21, 2024

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?

await fixHtmlTags(versionedFolder)
await fixBrokenLinks(versionedFolder)
// We can't run this fix on version >=3 because it would make the code blocks ugly
const v1Docs = orderedVersions.find((v) => v.startsWith('v1.'))
await fixCodeBlocks(join(versionedFolder, `version-${v1Docs}`))
const v2Docs = orderedVersions.find((v) => v.startsWith('v2.'))
await fixCodeBlocks(join(versionedFolder, `version-${v2Docs}`))

@james-kaguru
Copy link
Contributor Author

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
Copy link
Member

Eomm commented Jul 27, 2024

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

@Eomm Eomm self-assigned this Jul 27, 2024
@james-kaguru
Copy link
Contributor Author

@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

Signed-off-by: Manuel Spigolon <behemoth89@gmail.com>
@Eomm
Copy link
Member

Eomm commented Nov 17, 2024

Sorry @james-kaguru , I want to ship this PR very soon 😮‍💨

@Eomm Eomm linked an issue Nov 30, 2024 that may be closed by this pull request
2 tasks
Copy link
Member

@Eomm Eomm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FINALLY!

Thanks @james-kaguru

@Eomm Eomm merged commit 2ff7fe8 into fastify:main Nov 30, 2024
4 checks passed
AndreAngelantoni pushed a commit to AndreAngelantoni/fastify-website that referenced this pull request Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to docusaurus v3
2 participants