Live data from Hacker News

Blog with Markdown and Git, and degrade gracefully through time

brandur.org

71–80 of 182 posts

Re: Blog with Markdown and Git, and degrade gracefully through time

#71
Some 15 years ago or so I made a PHP script that took a Word document, saved in XML format, and turned into a static HTML page as part of my blog. It would rely on the paragraph style, turning "Header 1" into etc, as well as extract images and such.

Lately I've been seriously thinking of reimplementing that, as I just can't seem to find a decent static site generator. They all seem to require a bunch of plugins and configuration just to do the bare minimum a blog requires.

I just want to write, add some code or images, have it look somewhat decent and publish it without worrying about getting hacked due to some WordPress security issue.

Re: Blog with Markdown and Git, and degrade gracefully through time

#72
post #36

Earlier quoted context omitted.

Yes, if you constantly update your installation, which is the exact opposite of what this blog post is about. Otherwise you run a pretty good risk of your installation being hijacked, overtaken by spam bots or similar after a few years.

Yep. I run a few WordPress sites and the amount of maintenance with them is crazy. The plugin model makes maintenance brutal too since it's all independent devs with different release cycles, testing practices, etc.

Following the philosophy of simple hosting + MD outlined in the OP then the WP equivalent would be something like a simple (official twenty*, or your own custom) WP theme with zero (or minimal amount of) plugins. Enable auto-updates on WP and you're done.

The more plugins you use, the faster entropy kicks in without maintenance.

With WP in general though I definitely agree.

Re: Blog with Markdown and Git, and degrade gracefully through time

#73
post #62

Earlier quoted context omitted.

If you use "bundle exec jekyll serve" you shouldn't have too much problems locally as it just rebuilds the pages that change on every save. A minute to deploy the finished version is not terrible by any stretch for a blog IMO.

I used to think the same until I tried Hugo and it generates my site in milliseconds . Deploying from there also takes less than a second. It is really astonishing what power our devices have and how little that power is utilised by many tool chains.

You are spot on. I had the same experience. I wrote about it here: https://gavinhoward.com/2019/12/performance-matters-jekyll-v...

Re: Blog with Markdown and Git, and degrade gracefully through time

#74
post #60

Earlier quoted context omitted.

One explanation comes from just looking from the content creator's point of view: they kinda don't care what previous iterations of the work really look like (draft-final-v5-oct27-FINAL.doc anyone?) The things a content creator might be more interested in aren't really core git strengths: SEO, publishing schedules, editorial back-and-forth, social media, etc.

"SEO, publishing schedules, editorial back-and-forth, social media" Hmm, not really core PostgreSQL strengths either. What am I missing?

Postgres can automatically optimize those things.

Re: Blog with Markdown and Git, and degrade gracefully through time

#76
post #65

Earlier quoted context omitted.

Something similar happened to me when I was using static site generators. In fact one that I was really enjoying even switched programming languages between 1.x and 2.0. Since that time I look for the people and community behind the project, and try to find signs of stability and long-term care. After that I look at open formats rather than open and flexible architecture-chains. For example, I'd rather use my LibreOf…

Just want to chime in that one can use a static site generator without upgrading it. Or upgrading it infrequently. I’m currently on Hugo 0.80.0 and who knows, it might take years before I upgrade it.

That makes sense to me. No dis on static site generators, it just so happens that those were the lessons I learned while trying them out.

Re: Blog with Markdown and Git, and degrade gracefully through time

#77
Self Promotion: You can use GitJournal [0][1] to manage the blog posts from your mobile. It's just a convenient git + markdown client on mobile.

I'd built this for managing notes, but it seems that many many people use it for their websites. (Including me)

[0] https://gitjournal.io

[1] https://github.com/GitJournal/GitJournal

Re: Blog with Markdown and Git, and degrade gracefully through time

#78
post #49
post #12

I started my blog about python/django ( https://simpleisbetterthancomplex.com ) using Jekyll and hosting on Github Pages and it was pretty good to get started because back then I wasn't sure if I would keep it up or not. After a year or so I migrated to a 5 USD droplet on Digital Ocean (back then GH Pages didn't offer https for custom domains) and integrated with Github webhooks to automate the deployment when pushin…

Don’t know about Jekyll but with Hugo you just run hugo server in the Git repo and it will give a a live preview that you can view in the browser, served locally. It’s very fast. I have a mockup blog with ~90 pages and it takes 190 ms to generate the whole site.

Jekyll would probably handle that in a few seconds.

But, once you approach two to four or five hundreds, it can quickly add up to a minute or two, making it impractical to say the least.

One solution is to run `jekyll build`, which will just build HTML to a directory, and then just removing old Markdowns and serving those generated HTMLs directly via nginx or something.

I've honestly given up and switched to Ghost, where I don't have to worry about that sort of stuff.

Re: Blog with Markdown and Git, and degrade gracefully through time

#79

Anyone have any experience with Hugo? It started out as a fast single binary static site generator but it seems it is now dependent on Go being installed on the host...

....no, it's not? It still works just fine as a static generator.

Re: Blog with Markdown and Git, and degrade gracefully through time

#80
I've found much the same. I hadn't touched my site in 2 years, and just started working on it again and was able to nearly seamlessly pick up where I left off thanks to it all being done in Markdown. The flip-side is that many of the resources I'd previously linked to are gone. I'm starting to take a more archival approach to source materials and references as I write about them in the future.
Post reply on HN