ci: upgrade Docusaurus V2 -> V3#1573
Open
PhilippeR26 wants to merge 1 commit intostarknet-io:developfrom
Open
Conversation
Member
|
@penovicp this collide with your work? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Resolution
Documentation is currently built with Docusaurus v2.4.
v2 is now under maintenance, and all evolutions are made in v3.
It has been already tried in the past to upgrade to v3, but there where serious problems in API sidebar display.
This PR is solving this problem.
Docusaurus v3.9 is implemented, using more modern libs (React 18, MDX3, Node 20+, typescript 5,...).
v3 is AI friendly, and is able to use askAI (not implemented here) in the Algolia search extension.
Usage related changes
N/A
Development related changes
MDX v3 is much more strict for .md files:
<and{characters have to be escaped in many cases. So, it was necessary to implement corrections in JSDoc in /src, in guides (corrected also outsideExecution guide), and above all in versioned-docs (hundreds of corrections).typedocwith param--outputFileStrategy membersis generating all sidebar inputs, but many items are calledINDEXin namespaces (sidebar is unusable).typedocwith param--outputFileStrategy modulesis generating properly the namespaces menu, but many things are missing.The solution is to use
membersoption, and to post process the docs/API directory to solve all sidebar problems, before to build the static site.So, typedoc has been removed from
www/docusaurus.config.ts, and is launched bynpm run.typedocis first launched to generate the docs/API/structure.Checklist: