The Lazy Way to Update Static HTML
So you have a website. How charmingly antique. I have one too! And you’re using static HTML instead of a CSS—good for you! Much harder to hack, or so I’ve been led to believe.
Maybe you’ve built a whole site with a theme. Maybe you’re using a static site generator like Hugo, or Jekyll, or Gatsby, or Rubella, but probably not that last one which I made up just now. If you are using a site generator, then the only way to update pages without messing everything up is to do what the site generator needs you to do. Update that Markdown file or whatever, then do a full build. If you update pages in some other way, the next build obliterates them. You have to tell the site generator what you’re doing.
But what if you’re not using a site generator? What if you just have, y’know, a little directory of HTML files and you’d like to keep a “What’s New” section up to date? Do you have to edit raw HTML? Is there an easier way?
Yes indeed!
You’ll want to get yourself a copy of Pandoc and a nice text editor. I like Atom, myself, but its future is uncertain, so you might either use VS Code or a simple Markdown editor like Ghostwriter or Mark Text.
Now: open up the HTML file you want to edit. Search for the text you want to change, and surround it with a big old pair of comments like this: