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 e…
My stack is HTML+CSS
131–140 of 194 posts
Re: My stack is HTML+CSS
#132p.s.: hire me pls.
Re: My stack is HTML+CSS
#133The main issues are the ergonomics of authoring and maintaining consistency around a site. A minimal static site generator would keep internal links and boilerplate consistent. Connecting that with markdown, Org mode, or reStructured Text would help with the ergonomics. But then you lose the goal of having no necesary tools. Anyhow, if there's one general purpose tool that predates the web and will probably be around…
> A minimal static site generator would keep internal links and boilerplate consistent. Maybe not. There's an argument to be made that says you should treat a blog as a series of pages, each modeling something corresponding to what you might call a "publication event" in the real world, e.g. printing a magazine or passing around a physical memo. The consistency angle is probably overvalued (not worth its cost). When…
Re: My stack is HTML+CSS
#134Earlier quoted context omitted.
Beautiful 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.
Thanks! 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/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-...
Re: My stack is HTML+CSS
#135Also, if you're really committed, you might be surprised how app-like you can make HTML+CSS, using things like checkbox and :target hacks[1]. The UI demoed in the video on this site[2] has no JS. These techniques pretty much require a generator, and there are obviously tradeoffs.
[0]: https://github.com/boringproxy/boringproxy.io/blob/master/ss...
[1]: https://www.mattzeunert.com/2017/10/30/javascript-free-todo-...
Re: My stack is HTML+CSS
#136Earlier quoted context omitted.
To be fair, static site generators are a thing and are very much underused in cooperations. He could have the same scores/performance and still get the full advantages you mentioned. But yes, handcrafting html is pointless at some point, especially if you have to update the contents every so often
He mentions that SSGs require tooling and dependencies. And if all you need are dynamic headers and footers, just wrap those in 'php include' tags and rename the files to .php. It's still HTML and CSS that's getting rendered.
Re: My stack is HTML+CSS
#137The one thing I really feel like I'm missing out on, in my own no-build-system Github Pages site, is an RSS feed. A couple of people have emailed me asking if there's a way to be notified if I make a new post, but I don't see how I can do it without bringing in an external service.
What about your commits' RSS feed; assuming most of your commits are only to add a page?
Re: My stack is HTML+CSS
#138Earlier quoted context omitted.
Twitter embeds are equally bad. Ended up remaking them to output static HTML + CSS to improve perf ( https://leerob.io/tweets ).
Same, I get ~500 tweets displayed with: - No JavaScript necessary - All profile images turned into one massive sprite - Minimal payload size Here are what the tweets look like when rendered: https://umaar.com/dev-tips/feedback Here's the code to achieve that: https://github.com/umaar/better-twitter-embed
Re: My stack is HTML+CSS
#139Earlier quoted context omitted.
To be fair, static site generators are a thing and are very much underused in cooperations. He could have the same scores/performance and still get the full advantages you mentioned. But yes, handcrafting html is pointless at some point, especially if you have to update the contents every so often
> To be fair, static site generators are a thing There goes your super-lean stack and we're back to square-one.
Re: My stack is HTML+CSS
#140Why can't HTML some kind of templating system, or even simple includes? Then I wouldn't need to use a static generator and could just author HTML directly. e.g. (with hypothetical and tags) template.html My Fancy Blog index.html Hello world Maybe this would compromise browser performance or add some kind of vulnerability, but authoring DRY HTML directly is my fantasy