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

RFC: developer docs #1011

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

RFC: developer docs #1011

wants to merge 7 commits into from

Conversation

tefkah
Copy link
Member

@tefkah tefkah commented Mar 3, 2025

  • feat: add docusaurus docs
  • feat: add nextra docs
  • chore: update pnpm files
  • chore: add autoprefixer to catalog
  • fix: improve
  • fix: add built in serve for nextra export

Issue(s) Resolved

Developers find it difficult to keep an overview of documentation.

High-level Explanation of PR

This PR adds two options for providing a nice frontend for all of our internal documentation:

  • Docusaurus (/docs)
  • Nextra (/docs-nextra)

I chose to include both because both have pros and cons, and I'd like to invite you to have a look and see which feels better.

In my opinion:

Docusaurus Nextra
Search Good, slightly faster Good, uses less bandwidth
Looks Meh, but clear Nice, but maybe too minimal
Framework Custom framework Just Next
Dependencies 2000->2700 2000->2300
Dev/Build duration Quick Next, so not that fast
Site snappiness Good Good
Output Static Static/Dynamic (static atm)
Hostability Anywhere, eg pages Anywhere, eg pages

I'm a bit torn: on the one hand I like the look of Docusaurus less, but it's slightly more clear to me (Nextra is quite minimalist). Search on both works quite okay, I do know from experience that the docusaurus one uses quite a bit of bandwith (basically downloads the entire documentation at once). Nextra is just a Next app, so it's quite familiar, and we don't need to introduce a bunch of new dependencies as we can sync that with the rest of the app. (the 2300 number there will be even lower if we choose to pick it, as Nextra currently requires Tailwind v4, but we are still on v3). I do think that's a point worth considering, as it'll likely add some time to our builds, as they need to install all dependencies.

The Docusaurus build/dev duration really nice though, Nextra takes ages in comparison.
Both currently output to a fully static site. Nextra could optionally be configured to be dynamic/have Incremental Static Regeneration, but I don't think that's worth it.

Curious what you all think! I will not merge this PR, i'll merge the one we end up going with.

Test Plan

Docusuarus

  1. pnpm --filter docs build && pnpm --filter docs start (need to build, otherwise search does not work)
  2. It should open on :3005.
  3. Explore

  1. pnpm --filter core dev
  2. Play around with modifying the files a bit, see quick reload speeds.

Nextra

  1. pnpm --filter docs-nextra build && pnpm --filter docs-nextra start (need to build, otherwise search does not work)
  2. Go to localhost:3006
  3. Explore! Use search.

Screenshots (if applicable)

Docusaurus

image

image

Nextra

image
image

Notes

@tefkah tefkah requested review from kalilsn, 3mcd and allisonking March 3, 2025 12:27
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.

1 participant