Live data from Hacker News

Rewriting my website in plain HTML and CSS

vijayp.dev

131–140 of 218 posts

Re: Rewriting my website in plain HTML and CSS

#131

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…

This is my workflow for my site, too, just replacing MS Word with Obsidian since it syncs over all my devices allowing me to write/edit my future content wherever I am at, then upload later.

I tried things like bashblog for awhile, but it has some quirks like sometimes placing posts out of order when building the index page. That and I have zero use for the built in analytics options or things like Discus comments, so it seemed like I was really only using about 30% of what it was meant to do.

Here's a link to that for anyone interested. It's quite tweakable.

https://github.com/cfenollosa/bashblog

Re: Rewriting my website in plain HTML and CSS

#133
post #112

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…

Really appreciate that you're doing mass-based recipes, and in metric too. I'm tired of all the American recipes with quantities like "2 1/3 cups"; the proliferation of units and fractions makes work needlessly hard compared to just grams and millilitres.

Furthermore, when it comes to recipes for baking, if it's not using weight as a measure, then it's wrong. Baking is chemistry, so if you want consistent controlled results, stop measuring anything by volume.

Sorry, pet peeve of mine as a hobby baker.

Re: Rewriting my website in plain HTML and CSS

#134
post #23

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

Another way of looking at it is that Hugo, eleventy, etc. are reinventions of pandoc, makefile etc. The latter things came first!

Re: Rewriting my website in plain HTML and CSS

#135
post #96
post #26

I write my website and blog directly and entirely in HTML using BBEdit. For me, this is just much easier than any other method. I don't have to rely on any external system.

And does your blog have RSS or Atom feed? That's usually where it becomes a little tedious.

You just need a build system in place - generating RSS from your collection of html files isn't difficult.

Re: Rewriting my website in plain HTML and CSS

#136
post #96
post #26

I write my website and blog directly and entirely in HTML using BBEdit. For me, this is just much easier than any other method. I don't have to rely on any external system.

And does your blog have RSS or Atom feed? That's usually where it becomes a little tedious.

Of course. It's not a blog without RSS!

Believe it or not, I also manually edit that in BBEdit.

Re: Rewriting my website in plain HTML and CSS

#137

I 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/#/pageid, so the id is "/pageid". Looks a bit better I think.

Re: Rewriting my website in plain HTML and CSS

#138

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

Re: Rewriting my website in plain HTML and CSS

#139
post #23

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

Another way of looking at it is that Hugo, eleventy, etc. are reinventions of pandoc, makefile etc. The latter things came first!

I would rather say that the former group are wrappers around the latter group. Using an SSG doesn't just mean converting Markdown etc. source and orchestrating a build process of some sort, but also filling in templates and providing useful build steps to orchestrate (such as generating additional pages that reference the actual article content: archives, collections grouped by tags or categories, etc.). They also generally implement things like the live reloading that the author mentioned as missing.

I'm currently using Nikola and have done quite a bit of customization - by hacking around and learning modern web stuff as I go (the last time I did this stuff seriously, jQuery was dominant and Bootstrap was brand new - of course I'm not writing a bunch of JavaScript for a blog, but that also presumably dates my understanding of HTML and CSS). I've found that even though there's way more stuff in here than I really want, it's really nice to have that kind of scaffolding to start, and I can strip it away as I customize.

Post reply on HN