Live data from Hacker News

Blog with Markdown and Git, and degrade gracefully through time

brandur.org

141–150 of 182 posts

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

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

Thanks for your Blog! It's a great resource - I love the generic form template and signal blog post. It is really great and I recommend it to anyone who uses django

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

#142
post #64

Earlier quoted context omitted.

Can't good old make do partial recompilation with ease?

Correct me if I'm wrong, but don't you have to formally map out all of your inputs and outputs for partial recompilation to work? I believe the last time I touched make was to fix an exceedingly badly mapped out chain of cause and effect that would consistently compile too much and yet occasionally miss the one thing you actually needed. Partial evaluation works out the dependencies by evaluating all of the condition…

> Correct me if I'm wrong, but don't you have to formally map out all of your inputs and outputs for partial recompilation to work?

Make needs that information, but that doesn't mean you need to be the one to catalog it. I found this article pretty useful [1]; in a nutshell, many compilation tools (including gcc, clang, and erlc) are happy to write a file that lists the compile time resources they used, and you can use that file to tell Make what the dependencies are. It's a bit meta, so it made my brain hurt a bit, but it can work pretty well, and you can use it with templated rules to really slim down your Makefile.

(I've tested this with GNU Make; don't know if it's workable with BSD Make)

[1] http://make.mad-scientist.net/papers/advanced-auto-dependenc...

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

#143
post #82

Earlier quoted context omitted.

> I just can't seem to find a decent static site generator. Maybe you and I have very different ideas of what is required to write a blog, but it sounds like you should be able to use Hugo + the theme of your choice and just go with it. It's /very/ easy, and posts are all written in Markdown.

Thanks for the input. For me a bare-bones blog needs to support simple-to-use images, that is auto-resizing images with link to full etc without a ton of hoopla, syntax highlighter for code and some tex-ish thing for math. From what I can see Hugo does seem to have a lot of that these days, so I'll try that. One immediate issue is the highlighter not supporting my language at work (Delphi/Pascal) but I assume it bein…

Those features in Hugo are mostly reliant on themes. Hugo has a concept called "shortcodes" which allow you to add capabilities that rely on adding additional JS, or HTML blocks in at specific points in your Markdown.

The theme I use on my website for instance has a shortcode called "fluid_imgs" which handles images pretty well, and I also wrote my own shortcode addition to support embedding images from Flickr more easily. Additionally the theme I'm using integrates MathJax and HighlightJS, which it utilizes in the standard way for Markdown (e.g. in most Markdown implementations you can specify the language after triple backticks to start a code block) by invoking highlighting on code blocks.

Getting what you're asking for should be pretty simple in Hugo with the appropriate theme or minimal effort anyway.

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

#144
My blog is Django and PostgreSQL on Heroku, but last year I decided I wanted a reliable long-term public backup... so I set up a scheduled GitHub Actions workflow to back it up to a git repository.

Bonus feature: since it runs nightly it gives me diffs of changes I make to my content, including edits to old posts.

The backups are in this repo: https://github.com/simonw/simonwillisonblog-backup

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

#145
I disagree with the core tenet of the article. Does everything really have to live forever? Most blogs are probably not worth preserving, just like most speeches in history are not worth preserving. Most books are never reprinted.

Time is a great filter. Yes important stuff gets lost but not each thought or word is worth preserving and not every moment in life needs to be captured and kept for posterity.

I would prefer if more SO answers, more old tweets, more outdated tech blogs, more old unflattering photographs, ... disappear in the void. The death of geocities meant some valuable stuff was lost, but it also meant that much much more crap was lost.

The world does not gain from keeping every scrap, rather the filter of 'did someone care enough to preserve this' adds value as the signal to noise ratio improves over time.

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

#146
I like the approach but prefer it more consequent: every tooling breaks over time, if not statically linked.

Even better: no tooling at all. Just files. Means HTML then. And self-contained e.g. per year.

So you don't need to touch old stuff when changing style or production tool.

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

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

I just wanted to say how much I've enjoyed using simpleisbetterthancomplex over the years.

I run a Django development agency, and I've passed around links to your tutorials more times than I can reliably estimate; hundreds of times :)

It's a great resource, thank you for it.

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

#148
post #83

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

It's not dependent on Go being installed on the host... I'm not sure why you think this is the case. Like most Go applications, it's compiled into a single static binary.

https://gohugo.io/hugo-modules/use-modules/#prerequisite

And it seems some themes are using this feature, therefore one can not say that Hugo is a single-binary static site generator anymore.

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

#149
I feel like the author makes a good point, but it does not solve the original problem he was describing. The only reason why those websites disappeared is because the owner was no longer interested in maintaining it. It's a human factor, not a technological one. Even if they had written their files in markdown and git, the website would have disappeared anyway if they stopped paying the domain/hosting fees.

Now if you're arguing for putting the website source on GitHub, that's an entirely different matter. GitHub addresses the human factor by being entirely free with no effort required for site upkeep. That's why it's durable, it's not about keeping it as git and markdown.

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

#150

I disagree with the core tenet of the article. Does everything really have to live forever? Most blogs are probably not worth preserving, just like most speeches in history are not worth preserving. Most books are never reprinted. Time is a great filter. Yes important stuff gets lost but not each thought or word is worth preserving and not every moment in life needs to be captured and kept for posterity. I would pref…

Ancient Roman graffiti is seen as being valuable enough that significant time and resource has been spent on studying it. The anthropological value of it seems obvious to me. Perhaps low effort thought-leadership or social media drivel has little contemporary value, but it could be a fantastic historical resource. The selection bias of history that was chosen to be preserved (and the people who were doing the choosing) puts a rather firm set of constraints on our ability to understand the past.
Post reply on HN