Live data from Hacker News

Blog with Markdown and Git, and degrade gracefully through time

brandur.org

31–40 of 182 posts

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

#31
This is how the Oil blog is made: it's markdown in git, and it renders fine in Github.

I use a bunch of old Unix tools that will be around forever to make it look nice: http://www.oilshell.org/site.html

The toolchain has changed significantly in 4+ years. It started as literally a shell script invoking Gruber's original markdown.pl. Then I switched to CommonMark, etc.

But the core data hasn't "rotted" at all, which is good. Unix is data-centric, not code-centric.

Previous thread that mentions that Spolsky's blog (one of my favorites) "rotted" after 10+ years, even though it was built on his own CityDesk product (which was built on VB6 and Windows). He switched to WordPress. Not saying this is bad but just interesting. https://news.ycombinator.com/item?id=25675869

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

#32
post #8

I used to have my blog source on GitHub, but then it turned out I didn't want my half-finished works-in-progress public. To use a private repository would rather defeat the point; using a private repo and a public fork is inviting confusion. Now I just use a private repo on my own server, cloned to my dev machine. Does anyone have a usable solution for that problem?

I put my drafts in branches and only push the main branch to GitHub.

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

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

you do realize you can hot reload and preview in a local browser before deploying? pretty inefficient to deploy just to check your changes

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

#34

I am using Gatsby for my site https://www.bobbydreamer.com and saving the markdowns at git here https://github.com/bobbydreamer/bdv32 I haven't setup CI pipeline yet. It true whats said in the post, I used to save links thinking it won't disappear. But most the links, I had saved, it's no more.

I have a similar setup for my blog and I'm using Netlify for both CI and hosting (free). It's been great! GitHub Actions could probably work well for you if you already have decent hosting.

Any particular guide or set of docs you recommend for that? I've heard a lot of good things about Netlify as far as hosting, and I've been wanting to set up a blog; seems like as good a time as ever to start learning.

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

#35
post #31

This is how the Oil blog is made: it's markdown in git, and it renders fine in Github. I use a bunch of old Unix tools that will be around forever to make it look nice: http://www.oilshell.org/site.html The toolchain has changed significantly in 4+ years. It started as literally a shell script invoking Gruber's original markdown.pl. Then I switched to CommonMark, etc. But the core data hasn't "rotted" at all, which i…

> The toolchain has changed significantly in 4+ years. It started as literally a shell script invoking Gruber's original markdown.pl. Then I switched to CommonMark, etc.

Wouldn't switching formats like that break peoples pages? That's one concern I have with using markdown for a site like this. For anything non-trivial, you either end up using HTML (in which case, what's the point) or some dielect-specific feature.

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

#36

For all the (deserved) complaints people have about wordpress, it's been around since before git or markdown was even a thing. For all its faults, its been pretty resilient to time. The real reason most websites disappear is a much more human one.

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.

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

#37
post #9

Earlier quoted context omitted.

why?

"free/opensource" -> !M$

Setting aside how weary I am of "M$" (it's just about tied with using "sheep" to describe Apple users), what on God's green earth does Microsoft have to do with the OP's point? GitHub itself is not and was never open source. It's not like Microsoft bought it and closed off the source. Do you think using Microsoft tools demonically injects anti-FSF sentiment into your work? ("I started using VS Code, and now whenever I try to work on GPL 3 software, my keyboard becomes too hot to touch until I close the window!")

Personally, I have a different take than the OP, although I'm not sure this is really a disagreement. I would argue open data formats are more important in this context. If I write text in Markdown, it doesn't matter whether I'm using Emacs or a closed-source, proprietary commercial editor; the text isn't tied in any meaningful way to the editor. Likewise, a Git repository hosted on GitHub isn't tied in any meaningful way to GitHub. It's... a git repo.

As long as GitHub isn't doing anything that I particularly object to -- and "oh woe, it is owned by Microsoft" is not an objection I share -- there's a pretty good case for continuing to use it. I'm taking a calculated risk that it's both unlikely to go away anytime soon and to markedly change business direction in an unfriendly way, but if it does? As long as my local copy is up to date, I can re-publish it anywhere and just, well, stop using GitHub.

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

#39
post #34

Earlier quoted context omitted.

I have a similar setup for my blog and I'm using Netlify for both CI and hosting (free). It's been great! GitHub Actions could probably work well for you if you already have decent hosting.

Any particular guide or set of docs you recommend for that? I've heard a lot of good things about Netlify as far as hosting, and I've been wanting to set up a blog; seems like as good a time as ever to start learning.

I've evaluated Netlify for my blog at https://jdsalaro.com and I'd advise against that unless you're missing a CMS on your static site generator. Other than that I personally felt it didn't bring much to the table. I do admit that their CMS is slick, but it wasn't really a feature I needed.

Of course I'm not sure what other people are using them for, but in my case GitLab/GitHub covered all my bases pretty well since I wasn't looking for a pelican/hugo CMS and you still host somewhere else (not Netlify).

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

#40
that's exactly what I did for my blog and achieved 90+ on lighthouse audit. Google is considering core web vitals to rank pages from this year (may 21). I don't want to rely on an external hosting provider who usually loads tons of tracking code, analytics scripts, irrelevant scripts to hosted sites (looking at you Wix).

blog: https://gourav.io/blog repo: https://github.com/GorvGoyl/Personal-Site-Gourav.io/tree/mas...

Build with next.js, mdx, tailwind and deployed on vercel.

Post reply on HN