Live data from Hacker News

Rewriting my website in plain HTML and CSS

vijayp.dev

71–80 of 218 posts

Re: Rewriting my website in plain HTML and CSS

#71
> spending too much time on Hacker News gave me the misconception that writing a website using plain HTML and CSS would be a relatively well-paved path in 2025. I spent some time looking around for guides or a “canonical” way of doing this and found that there isn’t really one.

I had this exact same surprise last year! For whatever reason, there really isn't any sort of standard way of creating a vanilla site in 2025!

Re: Rewriting my website in plain HTML and CSS

#72

I also decided to develop my personal website in plain HTML. I looked into a bunch of static site generators and found that direction to be too complicated and slow for me. I still wanted the ability to have a common headers and footers and unique sections without repeating myself in every file. So I created a very small PHP application (just 5 files) and each page or blog post is a single PHP file in a directory. Th…

If you OK using a tiny tad JavaScript, it should be able to re-write that portion of the DOM to have HEADER and FOOTER common. Nonetheless, if you are also OK using Github, it has built-in setup where you blog in Plain-text (MarkDown) and things just works. You don't even need to build it on your local machine.

I wrote about it when I moved from WordPress to Jekyll. https://brajeshwar.com/2021/brajeshwar.com-2021/

Re: Rewriting my website in plain HTML and CSS

#74
I think PhpStorm/WebStorm has LiveReload built into it. It's been years since I've used it since I don't usually write plain HTML/CSS. But it was just a button click away IIRC. You shouldn't need to restart any servers no matter what you do anyway, just press F5. Still not hard.

I use PHP+Twig on my simple websites just so I don't have to copy-paste the header/footer/nav. It's still incredibly simple, very close to HTML+CSS and no build times. You can FTP upload your files if you want it works.

Re: Rewriting my website in plain HTML and CSS

#75

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

`cat` supports multiple files, no? The whole point is that it concatenates. Why use 3 commands?

Re: Rewriting my website in plain HTML and CSS

#77

Why on earth would you use something like sveltekit in the first place for such a simple website? I know people will say for the learning experience but learning what? How to basically "hello, world" in sveltekit?

why wouldn't one use sveltekit if they only have html and css? sveltekit compiles to a static site with a nice client-side router.

sveltekit is basically html + css in a .svelte file if you don't use javascript.

Re: Rewriting my website in plain HTML and CSS

#78
post #18
post #12

Earlier quoted context omitted.

GitHub was just down the other day. Why would you want your personal website/portfolio to be tied to GitHub? Crazy "modern web dev" stacks are likely overkill, but that's not an argument against self-hosting.

Personal websites can be down a few days a month without a problem.

+1. Not like my $5 hosting plan has less downtime than Github. Well... maybe? Fewer moving parts perhaps. But it's not immune.

Re: Rewriting my website in plain HTML and CSS

#79
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…

Isn't using React with a static site generator framework basically the same thing but better?

Yes, if you want to throw up in your mouth.
Post reply on HN