I've been maintaining my personal website as plain HTML for five years now. I must say, I quite like this method. There's no substitute for practice when it comes to maintaining your skills at editing HTML and CSS. Yes, you must copy and paste content and not having layout page is annoying at times. But the overhead of just doing it yourself is surprisingly small in terms of the time commitment. Typically, I'll draft…
> Yes, you must copy and paste content Manual work is almost never a good solution. Try this: for PAGE in *.page do cat header.html "$PAGE" footer.html > “$PAGE.html” done
Rewriting my website in plain HTML and CSS
151–160 of 218 posts
Re: Rewriting my website in plain HTML and CSS
#152I've been maintaining my personal website as plain HTML for five years now. I must say, I quite like this method. There's no substitute for practice when it comes to maintaining your skills at editing HTML and CSS. Yes, you must copy and paste content and not having layout page is annoying at times. But the overhead of just doing it yourself is surprisingly small in terms of the time commitment. Typically, I'll draft…
I've started the Slab templating language[0] to be able to define reusable HTML fragments. It means using a dedicated tool but hopefully not needing to resort to a real programming language.
Re: Rewriting my website in plain HTML and CSS
#153I've been maintaining my personal website as plain HTML for five years now. I must say, I quite like this method. There's no substitute for practice when it comes to maintaining your skills at editing HTML and CSS. Yes, you must copy and paste content and not having layout page is annoying at times. But the overhead of just doing it yourself is surprisingly small in terms of the time commitment. Typically, I'll draft…
> Yes, you must copy and paste content and not having layout page is annoying at time I think this was one of the most common usages of PHP in the beginning, at least for those who basically wrote static HTML/CSS and needed a header/footer. It was probably a gateway into more advanced dynamic pages, eventually ending up using databases and other advanced functionality. Here's a list of my favourite movies ... It woul…
> I think this was one of the most common usages of PHP in the beginning,
>
And other tools beforehand: basic CGI or even more basic server-side includes (https://en.wikipedia.org/wiki/Server_Side_Includes)
To reduce CPU and IO load on the server (or just in circumstances where SSI was not enabled on the server they had available) some would pre-process the SSI directives (obviously this doesn't work for dynamic results such as the output from many #exec examples), so all that is being served is simple static files ‑ a precursor to more complex modern static site builders.
> It would be great if HTML had a similar capability. People have asked for it for over 30 years, so it's unlikely that it will be implemented now.
That doesn't really fit with the intentions of HTML, and could impose a bunch of extra network latency overhead compared to using SSI instead, leading to either complete rendering delays or jumpy pages as included content is merged in in steps, though I have seen it implemented multiple ways using a bit of JS (some significantly more janky than others).
Re: Rewriting my website in plain HTML and CSS
#154I have found someone who uses the anchor suffix to solve the problem: https://john-doe.neocities.org/ I am not html expert, so I have no idea how complicate or what implications would that have.
I love this site and concept and have been thinking about moving to this method for my own site
Re: Rewriting my website in plain HTML and CSS
#155While I am a programmer, I will continue to write code that injects html text with another... like a layout having a title and body html, etc.
I certianly limit my client-side codebase. Most of my javascript code is really focused on GUI/UI, even if I have to use a specific library. I dont bother with React or the like.
I will use htmx if I want to do partial updates. Other pages might be a tad more complicated if fetching data from SQL. However, I also have pages that are SIMPLY HTML+CSS!!
As I say - plain and simple.
Re: Rewriting my website in plain HTML and CSS
#156Did he reinvent a static-site generator? Markdown, pandoc, makefile... Sounds like a job for hugo/eleventy/jekyll/whatever.
Re: Rewriting my website in plain HTML and CSS
#157I've been maintaining my personal website as plain HTML for five years now. I must say, I quite like this method. There's no substitute for practice when it comes to maintaining your skills at editing HTML and CSS. Yes, you must copy and paste content and not having layout page is annoying at times. But the overhead of just doing it yourself is surprisingly small in terms of the time commitment. Typically, I'll draft…
> Yes, you must copy and paste content and not having layout page is annoying at times. But the overhead of just doing it yourself is surprisingly small in terms of the time commitment. This calls out for server side includes[0]. I so loved server side includes back in the late 90s. You still work in plain HTML and CSS, boilerplate can be centralized and not repeated, and clients receive the entire page in a single r…
Holy cow. The sole reason I learned SSI and then PHP in 1998 was because I was sick of this after like 2 weeks.
This person has more patience in their pinky than I have ever had.
Re: Rewriting my website in plain HTML and CSS
#158I have found someone who uses the anchor suffix to solve the problem: https://john-doe.neocities.org/ I am not html expert, so I have no idea how complicate or what implications would that have.
This is quite neat. Every page is a and css is section {display:none} section:target {display:block} So they use the target selector which becomes active when #pageid is in the url. But the html for all the pages is outputted, so this won't scale with a big blog. I wonder how SEO is for this, and if there's a way to make this better with something like the element. I would also make it so the url was example.com/#/pa…
I was thinking in using it for a blog, but I am afraid of having everything in a single file, and that making some mistake will render the whole site useless.
Also not sure how hard would be to manage once it starts to grow... Maybe it needs to grow significantly more than I can before this is a road block.
Re: Rewriting my website in plain HTML and CSS
#159Good on ya! HTML+JS is plenty performant for a blog and I'm always happy to see more people eschewing frameworks when they're not necessary. I've been writing a progressive web app that is, itself, a "web component" (custom element), built entirely with custom elements, so I feel like I've got a pretty good idea of how you can tackle that header reuse bullet point. Happy to give pointers if you're interested in that…
Re: Rewriting my website in plain HTML and CSS
#1601) You can use watchexec https://watchexec.github.io/ to live reload during development. 2) Also, please add a clickable image preview (you can use this lib for example https://github.com/francoischalifour/medium-zoom) 3) No commenting feature, luckily I found your post here on HN. But it would be better to have comment blocks, like from https://giscus.app/ or just a link where readers can comment. 4) No RSS feed. I'd like to subscribe to your updates, but there is no such option right now. RSS is one of the points why site generators are used for static blogs (e.g. Hugo, Zola, Astro, etc.)