fontsource / search-directory

A search directory website for the Fontsource monorepo.

Home Page:https://fontsource.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Next.js + MDX Migration

ayuhito opened this issue · comments

commented

This is a suggestion that I could personally handle if approved by all other parties.

I believe it may be good for us to migrate over to Next.js as the base framework for the directory, rather than building our own tech stack from scratch. I don't believe the refactoring will be too difficult, and the beauty of Next.js is that it is fairly close to regular React code and is fairly easy to pick up without prior experience. It's just a change in organisation for a lot of files.

Main benefits for the transition:

  • Reduce dependency management. No need to keep track and maintain Webpack and its large number of other dependencies (babel, loaders, etc.) via Dependabot or manually. Simply keep track of the sole Next.js dependency that manages the tech stack for us.
  • Pre-optimised settings will likely lead to smaller bundles for viewers.
  • TypeScript safety.
  • Better developer experience with Fast Refresh.
  • More sustainable and maintainable code that stays closer to industry standards over the long term.
  • And all sort of small improvements and potential feature additions bundled with Next.

Something that can also simplify the whole directory implementation is relying on MDX, which also Next has the relative integrations for, to build all the pages and docs. Will need a bit more research into.

Deployment could also be simplified via Vercel, where we could get an Open Source partnership to gain access to all the team features without expense. The deployment will be pointed to the domain fontsource.org.

Thoughts on this @jwr12135?

That sounds like a good idea. I was thinking we could take advantage of their custom App component and inject the nav and AppBar into that. Originally I was going to implement React Router, but this seems like a much better idea.

commented

Awesome. It's something I can undertake once #57 and #61 are resolved. Since I'm not very familiar with Material UI, I'll just be porting over the styles without any changes.

commented

I'm working on this in the docs/website branch of the main Fontsource repo.

MDX is working so far but still lots of work to do before it's anything presentable.