Skip to content

ci: upgrade Docusaurus V2 -> V3#1573

Open
PhilippeR26 wants to merge 1 commit intostarknet-io:developfrom
PhilippeR26:docusaurus3
Open

ci: upgrade Docusaurus V2 -> V3#1573
PhilippeR26 wants to merge 1 commit intostarknet-io:developfrom
PhilippeR26:docusaurus3

Conversation

@PhilippeR26
Copy link
Copy Markdown
Collaborator

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

  • typedoc with param --outputFileStrategy members is generating all sidebar inputs, but many items are called INDEX in namespaces (sidebar is unusable).
  • typedoc with param --outputFileStrategy modules is generating properly the namespaces menu, but many things are missing.
    The solution is to use members option, 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 by npm run .
  • typedoc is first launched to generate the docs/API/structure.
  • Some easy corrections of the sidebar are made by bash scripts.
  • Some complex corrections are performed by a .ts script (1800 corrections of dead links).
  • Then Docusaurus build / start is performed

Checklist:

  • Performed a self-review of the code
  • Rebased to the last commit of the target branch (or merged it into my branch)

@tabaktoni
Copy link
Copy Markdown
Member

@penovicp this collide with your work?

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.

2 participants