Live data from Hacker News

Rewriting my website in plain HTML and CSS

vijayp.dev

51–60 of 218 posts

Re: Rewriting my website in plain HTML and CSS

#51
Love this. Building a website this way really teaches you why we started having all the complexities in web frameworks today. For certain simple websites like this one, the tradeoffs are worth it. I rebuilt our company website this way too. (Sescollc.com)

Re: Rewriting my website in plain HTML and CSS

#53

There's a lot you can do with just plain html these days if you just need a clean site. Here's an example from my recipe site ( https://xilic.com/recipia/sauces/pesto_traditional.html ), mostly for my personal use or sharing with friends, with only html/css. It has expandable boxes, a menu system, etc. A simple script converts a directory structure of .csv files to these recipe cards with a template, and this way you…

What a beautiful website ! Feels carefully crafted, full of nice moments like the > turning the a - when sections are open in the TOC. Would love to hear more detail on how you went about making it. Did you ever consider sharing parts of the source code ?

Re: Rewriting my website in plain HTML and CSS

#54
post #23

Did he reinvent a static-site generator? Markdown, pandoc, makefile... Sounds like a job for hugo/eleventy/jekyll/whatever.

Yeah, obviously this is literally what something like Jekyll or Hugo does. It's just (at least to me) a simpler version of that where you can fully see what's happening. Also I didn't want all the theme-ing overhead that comes with those - just something I could inject into my existing site.

Re: Rewriting my website in plain HTML and CSS

#55

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…

This is an interesting idea! Honestly I didn't even know Github had a per-user readme until you mentioned it

Re: Rewriting my website in plain HTML and CSS

#56
post #24

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 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?

Re: Rewriting my website in plain HTML and CSS

#57
> It took me hours of Googling and trying out different options to come up with this awful piece of code that worked to load the contents of a file and give them to my page [CODE]

Do I have Stockholm syndrome or is the code here completely fine?

Re: Rewriting my website in plain HTML and CSS

#58

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

Re: Rewriting my website in plain HTML and CSS

#59
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 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.

Re: Rewriting my website in plain HTML and CSS

#60
post #57

> It took me hours of Googling and trying out different options to come up with this awful piece of code that worked to load the contents of a file and give them to my page [CODE] Do I have Stockholm syndrome or is the code here completely fine?

This whole piece kind of feels like the author just doesn't understand Svelte, so they threw it out and used something they do understand.

Yes, it probably is a good idea to use technologies you understand. But you not understanding Svelte isn't a Svelte problem.

Post reply on HN