Live data from Hacker News

Rewriting my website in plain HTML and CSS

vijayp.dev

61–70 of 218 posts

Re: Rewriting my website in plain HTML and CSS

#61

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

Why not use server side includes? Most web servers support it, and it dates back to one of the early features of webservers.

    
    
    
    ... main content here
    
    

Re: Rewriting my website in plain HTML and CSS

#62

Earlier quoted context omitted.

> 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

Why not use server side includes? Most web servers support it, and it dates back to one of the early features of webservers. ... main content here

Because that requires a server with the proper config and this is an HTML file. So it works in every environment, like locally on your machine, or GitHub pages.

Re: Rewriting my website in plain HTML and CSS

#63
post #24

Earlier quoted context omitted.

> Yes, you must copy and paste content Many people who maintain their own sites in vanilla web technologies tend to create reusable functions to handle this for them. It can generate headers and the like dynamically so you don't have to change it on every single page. Though that does kill the "no javascript required" aspect a lot of people like Of course you could simply add a build step to your pure HTML site inste…

I've adopted the idea that a blog post is archived when it's published; I don't want to tinker with it again. Old pages may have an old style, but that's OK, it's an archive. Copy/paste works great for this. The only reason I use a blog engine now (Hugo) is for RSS. I kept messing up or forgetting manual RSS edits.

I really love this! I've seen it in action a couple times in the wild, and it's super cool seeing how the site's design has evolved over time.

It also has the benefit of forcing you to keep your URIs stable. Cool URIs don't change: https://www.w3.org/Provider/Style/URI.html

Re: Rewriting my website in plain HTML and CSS

#64
To contribute to the authors open questions at the bottom: for reusability, use web components [1] and for hot reload use a file watcher with a websocket, or just lean on your ide if possible (e.g. jetbrains).

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Web_compone...

Re: Rewriting my website in plain HTML and CSS

#66

Earlier quoted context omitted.

I recently learned the object tag can do what I wished for in the 90s... work as an include tag: Turn your back for twenty-five years, and be amazed at what they've come up with! ;-) Should reduce a lot of boilerplate that would get out of sync on my next project, without need for templating.

Unfortunately that will require the client to make additional web requests to load the page, effectively doubling latency at a minimum.

Sounds like premature optimization for a simple page. If the objects are sized their regions should be fillable afterward without need to resize and be cached for subsequent access.

Re: Rewriting my website in plain HTML and CSS

#69

I started a portfolio website with Netlify (iirc), then I moved to Vue + Gridsome (on GitHub pages), then Next.js with Tailwind CSS, and was about to move to Vite.js over winter break. That's 4 stacks over the course of 5-6 years. Not worth it. Decided to do the sensible thing and use GitHub's README functionality. I prefer this approach and wish more folks in the tech community adopted it: https://github.com/Subopti…

sounds like a self-inflicted problem really. Why do you even change stack that much if what you want is a simple functionality?
Post reply on HN