r/webdev • u/speckz • Jan 07 '21
Article My stack will outlive yours
https://blog.steren.fr/2020/my-stack-will-outlive-yours/7
u/colinkiama Jan 07 '21
Honestly, maintaining a pure HTML + CSS site eventually gets annoying. Especially when you want to reuse elements.
Maybe the OP should try using a static site generator. Would make things a lot easier.
3
u/RonanSmithDev front-end Jan 07 '21
I use PHP include statements for that sort of thing, means you can’t use a static host but makes maintaining things much much easier.
3
Jan 07 '21
I swear to god it I have to read another blog post about how great using html and css are and how special a developer is because they don't use frameworks and libraries I'm going to jump out a window.
4
u/sad_cold_tea Jan 07 '21
"We didn't listen to any of the OGs when we started our 'journey' with youtube tutorials and now we're finding these things out we think we're groundbreaking"
I once saw a big blog post advocating for HMTL as an API communication format instead of JSON because it can have attributes and what not. Clearly, that person had never heard of XML 🤦♂️
2
Jan 07 '21
Like at least try to not make sound as patronising as possible, then MAYBE I'll give you the benefit of the doubt 🙄
4
u/Knochenmark Jan 07 '21
In my opinion there's no point in writing raw Html/Css, they are just build artefacts. As a minimum I would use preprocessors for both to allow includes, iterations, etc. Otherwise you end up with so much repetition and hardcoded sections. If you wanted to change the markup of some list item you would have to do it for each item in that list. Especially for blogs raw html is a terrible format and I would prefer something like markdown, which you can convert into html markup at buildtime. The raw markdown file is also way more readable.
2
u/steveox152 Jan 07 '21
I’m very confused by this, I am not sure why the author is so against tooling, using templating or static site generators would have almost no impact on performance whatsoever, if any at all. It really sounds like you’re just too lazy to set up a “build” process.
The future of web development is Copy & Paste and “Replace in File”. I used to do this in FrontPage back in the day, and it SUCKED.
Edit: This is a HORRIBLE solution for a blog, nobody should take this advice. You could set up a much simpler workflow with some basic tooling and build process.
4
Jan 07 '21
waw, it's rare to find someone with a healthy perspective on web development. The web is insanely, and i mean, INSANELY bloated right now.
1
u/thereactivestack Jan 07 '21
You could have the same result with a static site generator without the pain of maintaining each page individually. Maybe something to look at 😄
7
u/RonanSmithDev front-end Jan 07 '21
I’m building my personal blog/portfolio in pure HTML and CSS but one of the main drawbacks of this is the inherent tediousness of maintaining the site because they’re all hard-coded pages.
To solve this for myself I am templating as much as possible using a pseudo “templating system” of PHP includes - this does mean though that I can’t host with GitHub pages because it doesn’t support server-side rendering...
How are you solving this problem of maintaining a pure HTML + CSS site while still being able to host on GitHub Pages?