Live data from Hacker News

My stack is HTML+CSS

blog.steren.fr

131–140 of 194 posts

Re: My stack is HTML+CSS

#131
post #13

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…

I too, enjoy Dependabot reminding me my blog exists.

Re: My stack is HTML+CSS

#133
post #70

The 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…

Yes, I remember seeing this idea. Some blog was making new design for each of the post. I really liked that, but I did not see it getting popular ever back in the days when FB was not yet a thing and websites used uniques designs instead of the cookie-cutter so popular today.

Re: My stack is HTML+CSS

#134
post #117

Earlier 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-...

Wow, thank you so much! That's a great post, very helpful :-)

Re: My stack is HTML+CSS

#135
I've found a nice middleground to be writing a custom static site generator for each site. They can be quite small (here's one[0] in ~50 lines). Usually it just loops through a directory and turns Markdown files into HTML (with header injected), and syntax highlighting.

Also, 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-...

[2]: https://boringproxy.io/

Re: My stack is HTML+CSS

#136
post #114

Earlier 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.

I’m not a web guy—- this should be safe from php vulnerabilities I would think, because there is no db and it’s just taking advantage of very limited/basic features of php right?

Re: My stack is HTML+CSS

#137

The 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?

[deleted]

Re: My stack is HTML+CSS

#138
post #126
post #28

Earlier 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

Nice job!

Re: My stack is HTML+CSS

#139

Earlier 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.

Not necessarily, because I didn't specify the tool. You can even use pure bash to generate it if you want.

Re: My stack is HTML+CSS

#140
post #93

Why 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

Not exactly HTML, but webservers typically support server-side includes (SSI).

https://en.wikipedia.org/wiki/Server_Side_Includes

Post reply on HN