Live data from Hacker News

Rewriting my website in plain HTML and CSS

vijayp.dev

171–180 of 218 posts

Re: Rewriting my website in plain HTML and CSS

#171

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

See my reply about the object tag. Suffers from lack of press I guess.

Re: Rewriting my website in plain HTML and CSS

#172

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's the csv look like?

Re: Rewriting my website in plain HTML and CSS

#173
post #137

Earlier quoted context omitted.

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…

What do you have in mind? 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.

I think that would become unwieldy very fast. I think it's alright for a lightweight site like this one with very little content.

If you don't want to use a static site generator I think you're better off with just html files for each page/blog entry, or you could use something like htmx and load stuff in that way.

Re: Rewriting my website in plain HTML and CSS

#174
post #23

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

I don't maintain a blog so my opinion may not count for much, but I feel like if what you are trying to do doesn't fit neatly into an SSG's existing templates/themes, it may in fact be easier just to use pandoc and some simple tooling around it. Certainly when I looked into a few SSGs for the purpose of making a simple personal website (without a blog) I found I would spend more time trying to bend them to my will th…

Most of them bend to your will very easily if you are the one writing the HTML and not trying to use an existing template/theme. Even Jekyll the "themes" are optional and you can entirely ignore them.

Also most of the complexity disappears if you aren't trying to make a blog. They generally all have "simple pages" support that is much simpler than trying to figure out their blog mechanics.

Of course the hard part is picking an SSG you like, and it is easier to just build your own which is a big part of why SSG proliferation happens. Too many options? Make a new one.

My main sites are still in Jekyll for now, for historic reasons of GitHub Pages support.

My latest discovery and new love in this space is Lume [0]. It's definitely on the simpler side of the scale. I haven't tried it for a full blog yet, but the simple website I have built with it has indeed continued to feel simple throughout the process and even using some of the features Lume's documentation labels "Advanced".

[0] https://lume.land/

Re: Rewriting my website in plain HTML and CSS

#175

Earlier quoted context omitted.

The other solutions are even easier and don’t double latency. > be cached for subsequent access. So now you need to setup cache control?

Nope and nope.

Good explanation. I’ll stick with cat.

Re: Rewriting my website in plain HTML and CSS

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

> It can generate headers and the like dynamically so you don't have to change it on every single pa Yeah, I noped out of that and use a client-side include (webcomponent) so that my html can have ` ` instead. Sure, it requires JS to be enabled for the webcomponent to work, but I'm fine with that. See https://www.lelanthran.com for an example. [EDIT: Dammit, my blog doesn't use that webcomponent anymore! Here's an ac…

yeah clearly there's a lot of ways to solve this issue if javascript is enabled. But there's a big overlap between the folks who wanna use vanilla web technologies and the folks who want their site to run without javascript

Re: Rewriting my website in plain HTML and CSS

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

I didn't know you could use object tags in that way! Thanks. That seems like a great solution if you're cool with an extra request

Re: Rewriting my website in plain HTML and CSS

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

Not remotely! Unless you meant Preact. React ships an entire rendering engine to the front-end. Most sites that use React won't load anything if javascript isn't enabled

Re: Rewriting my website in plain HTML and CSS

#179
The website of one of the most influential IT person, who won the court battle against U.S. Government, allowing for widespread cryptography, professor Daniel J. Bernstein, is and always has been plain HTML mostly with no CSS.

https://cr.yp.to/

It's served using his own HTTP server - publicfile, and the DNS domain is served using his own DNS server - djbdns. E-mail is handled using his own SMTP server - qmail. He invented the Maildir e-mail format, de facto standard in all e-mail products. All e-mail mailing lists for his products are handled by his own mailing list server - ezmlm. All of this is managed using his replacements to /etc/rc or /etc/init.d or systemd - daemontools.

He invented ChaCha and Salsa stream ciphers, now in widespread use, as well as elliptic curves, especially the famous Curve25519, and the Poly1305 MAC.

He also invented TCP SYN cookies.

Pretty impressive, no?

Re: Rewriting my website in plain HTML and CSS

#180

Glad to hear you migrated to plain HTML and CSS, I think this creates a healthier environment: it removes bloat and is more efficient. My question is how do you update your feed, sitemap and other stuff? I've been doing it by shell scripts, I'm not 100% satisfied, I also create gemini pages from HTML, which changes content a lot. Another question: how do you handle comments to your posts? Because my blog is a static…

>My question is how do you update your feed, sitemap and other stuff? haven't tried this but maybe you could do that all in PHP and run `php feed.php > feed.html` or something regularly . and now I just realized you said you've been doing it with shell scripts and that's pretty much the same thing, maybe you could use a cron job or something. I know a lot of people don't like PHP but I believe it's still the best/sim…

it goes like this:

    
      
      Responses:
       
       
         reply
       
    

so when I receive an email it is appended to this mail/uptime.html file.

I don't like it because I wanted it to be just one p for each email, but the object has a whole page, like head, stylesheet, and it's separated from the outside context in some ways, not really sure.

Post reply on HN