Live data from Hacker News

My stack is HTML+CSS

blog.steren.fr

71–80 of 194 posts

Re: My stack is HTML+CSS

#71
post #66

Sure, it's super easy when your page doesn't have even a header and/or a footer. Try having a top-menu in your design, or some banners/ads, and then you need to change ALL the pages to change a single url. This is how we used to do things long time ago, and it sucked BIG TIME, and that's why people invented server-side includes and cgi and mod_php and all of that... it saves time, and your time costs much more than h…

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

Re: My stack is HTML+CSS

#72
post #66

Sure, it's super easy when your page doesn't have even a header and/or a footer. Try having a top-menu in your design, or some banners/ads, and then you need to change ALL the pages to change a single url. This is how we used to do things long time ago, and it sucked BIG TIME, and that's why people invented server-side includes and cgi and mod_php and all of that... it saves time, and your time costs much more than h…

My article covers that:

> So... if I don’t use any templating system, how do I update my header, footer or nav? Well, simply by using the ”Replace in files” feature of any good text editor. They don’t need frequent updates anyway. The benefits of using a templating system is not worth the cost of introducing the tooling it requires.

Re: My stack is HTML+CSS

#73
post #66

Sure, it's super easy when your page doesn't have even a header and/or a footer. Try having a top-menu in your design, or some banners/ads, and then you need to change ALL the pages to change a single url. This is how we used to do things long time ago, and it sucked BIG TIME, and that's why people invented server-side includes and cgi and mod_php and all of that... it saves time, and your time costs much more than h…

This is the exact thing I experienced and have been dealing with the past couple days. I wanted to create a small collection of pages as my website, intending to keep everything as small and simple as possible since it was (mostly) just to display some basic info and "posts". Well as soon as I wanted that menu for pages it was a whole new can of worms.

Sure, I could just copy/paste/replace content as it changes. But I don't want to have to be doing that any time I decide I want to change or add something. And I'm known to be a source of human error.

I ended up going Node+Express+EJS for the includes and certain more dynamic content on pages. It works well enough, page sizes are still small. Also considered some static site generators but at the time they seemed like overkill for what I wanted. Maybe there's a tool out there that will compile to plain old HTML files that I'm unaware of, I don't keep up much on front-end things.

Re: My stack is HTML+CSS

#74
I use Markdown and HTML, CSS, and Python (just stdlib, no packages) to generate static files. I think that will last just about the same length of time.

http://www.oilshell.org/blog/

Markdown is a significant win, and CommonMark made it a lot better.

CommonMark is a Useful, High-Quality Project http://www.oilshell.org/blog/2018/02/14.html

Admittedly I need a Makefile, and Make is pretty impoverished for this use, and I want to replace it with something else. Shell isn't quite good enough because I don't want to rebuild the entire site on every edit, and I don't want to remember which files to rebuild. http://www.oilshell.org/site.html

Re: My stack is HTML+CSS

#76
> You don’t need Wordpress, or Hugo to put a blog online

It took me about 25-30 minutes to publish my website with Hugo, from scratch. I can't even estimate how long will it take if i try to build something like the current one.

> Angular, React or Next.js to put a web page online. Raw HTML and CSS do the job.

If you see someone who uses Angular for a blog, go straight to the DEA and report him/her.

Re: My stack is HTML+CSS

#77

Writing HTML and CSS by hand?! Those are just the output. OOTB Wordpress didn't have a perfect Lighthouse score, so it's worthless? > I didn’t need 99% of its features anyway Oh, then it was already a terrible fit. So why are you advising people on how to replace Wordpress?

> How could you possibly consider writing HTML and CSS by hand? Those are just the output. You know, HTML is rooted in SGML and digital humanism. The entire point of it is that you use it as a simple means for self-publishing of digital text (and HTML 5 "standards" portray it in that role, in case you've never had a look). Granted, that isn't quite apparent when looking at the trainwreck that is HTML/CSS/JS. The solu…

You make sense. The high-leveling and not refactoring adds to the service industry of jobs and con-Z-umerism. Since they look in the mirror showing of, the mirror answers "awsome" for any new flimsy blob addition. It all starts with both: hardware and software, both should be tuned within your philosophy. See my initial post on this page.

Re: My stack is HTML+CSS

#78
This. But also, the point here IMO isn't just about performance but about tooling choices. There's so much tendency in the dev community (and has been since 1996 when I started doing web stuff) to jump on the latest thing without thinking about context or applicability. Perl then CFM then asp then Flash then js then...it goes on.

Thing is, you don't need some jamstack hellhole of complexity if you're serving simple content pages. Need a common header, just do a find replace as he says or write a php include.

It's always been the same: choosing overcomplex solutions may be fun and groovy - and good to learn and interesting - and this may be enough of a reason to do it, but it's always worth asking what you're trying to achieve and whether the toolset fits. So often that doesn't happen, and almost always the simplest solution is the very best one.

Re: My stack is HTML+CSS

#79
post #66

Sure, it's super easy when your page doesn't have even a header and/or a footer. Try having a top-menu in your design, or some banners/ads, and then you need to change ALL the pages to change a single url. This is how we used to do things long time ago, and it sucked BIG TIME, and that's why people invented server-side includes and cgi and mod_php and all of that... it saves time, and your time costs much more than h…

> it's super easy when your page doesn't have even a header and/or a footer.

It's not that hard even with.

My stack consists of HTML/CSS, and a small program to stitch headers and footers onto documents generated with markdown.

If anyone would like to see it, it should be in the Sourcehut page linked in my profile. The program is a hacky (but functional) piece of garbage however.

E: Spelling

Re: My stack is HTML+CSS

#80
post #24
post #16

While I really like the idea of serving raw HTML and CSS, I think that on the authoring side, a static site generator that ingests Markdown and generates HTML is a more practical way to go. I think writing raw HTML can work fine for small pages, and arguably it can be better than Markdown for pages with a lot of design elements, like landing pages. But for the typical blog post, or especially if the blog post has cod…

There are lots of different MD flavours, though. And even with Pandoc extensions you cannot really have an image inside with and alt text and title text.

I just use the small reference C implementation of CommonMark and it works great:

https://github.com/commonmark/cmark

There is an example where you load it via shared library in Python, i.e. send a Markdown string and get back an HTML string.

Post reply on HN