microsoft / typespec

https://typespec.io/
MIT License
4.51k stars 217 forks source link

Migrate website to astro #2564

Open timotheeguerin opened 1 year ago

timotheeguerin commented 1 year ago

After some quick investigation migrating to astro would both improve build performance and runtime performance.

Astro main selling point is everything is rendered on the server(unless go through extra step to have dynamic content) This means it result in a completely static website without the need for javascript. Somethings like light/dark theme switch still use js but the core of the website is available.

Pros:

Issues:

- [x] Initial side by side migration https://github.com/microsoft/typespec/pull/4587
- [x] Migrate more react component to astro https://github.com/microsoft/typespec/pull/4710
- [x] Add blog https://github.com/microsoft/typespec/pull/4797
- [x] Header responsive https://github.com/microsoft/typespec/pull/4800
- [x] astro prettier plugin
- [x] Switch which version gets published
- [ ] Remove docusaurus
- [ ] Move docs/ folder? https://github.com/microsoft/typespec/pull/4928
rishi-raj-jain commented 7 months ago

I'd love to be part of this effort.

timotheeguerin commented 7 months ago

@rishi-raj-jain thanks for your intrest, I did go through this a while ago but there was some deal breaking issues https://github.com/microsoft/typespec/pull/2562

  1. Actually terrible perf when including the sidebar ( i believe this has been fixed since)
  2. Doesn't support multi versions

So I don't think this is something we can do right now

rishi-raj-jain commented 7 months ago

Doesn't support multi versions

Why's that the case? I believe you can use https://starlight.astro.build and just create folders for versioning, ain't it?

timotheeguerin commented 7 months ago

Yeah we can just need to then do the selection ourself. The first item was the biggest deal breaker the version might just need more or less work from us