3 ms·
My output is HTML and CSS, but my stack is React with Next.JS. I just tell Next to not emit JS at build time. This is the best of both worlds. You get an excel
by city41 6y ago
My output is HTML and CSS, but my stack is React with Next.JS. I just tell Next to not emit JS at build time.
This is the best of both worlds. You get an excellent dev experience with TypeScript, fast refresh, the world of React components (granted many don't work when reduced to being static HTML), and I can also opt back into React on a page by page basis if I have the need.
With Next's static site generation and export, the output is just HTML and CSS (and optionally JavaScript), no need for a server.
If anyone is curious, my personal site was done this way: https://mattgreer.dev https://mattgreer.dev
- freedomben 6y agoBeautiful site! Do you write your articles in markdown or something like that and render them into pages at build time? Is your source available by chance? I've been wanting to do this exact thing but while the Next.js docs are great, what would really help is to just see an example site that does exactly what I want to do. All the good examples are either too trivial to be useful or to complex to be useful.
- city41 6y agoThanks! I am using MDX for the articles. I don't really like it though. MDX is fiddly and causes some headaches here and there. I am exploring other options. The MDX files are here: https://github.com/city41/mattgreer.dev/tree/main/pages/articles https://github.com/city41/mattgreer.dev/tree/main/pages/arti... And I just now wrote a new post about how I did the static HTML: https://mattgreer.dev/articles/how-i-built-this-static-site-with-nextjs/ https://mattgreer.dev/articles/how-i-built-this-static-site-...
- freedomben 6y agoWow, thank you so much! That's a great post, very helpful :-)
- anderspitman 6y agoI too, enjoy Dependabot reminding me my blog exists.