Live data from Hacker News

Blog with Markdown and Git, and degrade gracefully through time

brandur.org

161–170 of 182 posts

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

#161
Any kind of source that requires rendering is inherently fragile. We’ve all seen old posts messed up by a template change. There is no reason to think that GitHub will live (and continue to render markdown) much longer than, say, GeoCities.

The simplest subset of HTML you can manage coupled with an uncomplicated layout and no external assets is better in terms of longevity.

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

#162

IMO the biggest barrier to blogging (and the cause of most blogs dying) is inconvenience, and minimizing that if the biggest advantage of Markdown + Git. If there's any inconvenience at all, it naturally drags on the process of writing, and writing takes enough time and focus that if there's any friction it's too easy to push things off to the next day. My co-author and I use Markdown and Git as the author suggests,…

Any suggestions for static site generators / where to host? I'm thinking about starting a new blog with Hugo / Digital Ocean. I have a popular Spark blog on Wordpress ( https://mungingdata.com/ ) and can relate to your sentiment that any inconvenience can hold up the writing process. Your post is motivating me to streamline my publishing process.

Hugo is great, and they have a section with tutorials on how to host on a bunch of different platforms, so pick the one that you're most comfortable with or seems best/cheapest:

https://gohugo.io/hosting-and-deployment/

If you have no idea, Netlify is good and with a good free tier.

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

#163

There is a problem in the CMS industry. Everyone wants to build a headless CMS to power Jamstack sites—only the content itself lives in databases and the CMS is usually a proprietary SaaS. Doesn't leverage Git for content in any way. This is deeply problematic. We should have dozens, if not hundreds of contenders for "the next WordPress" that leverage Git as a foundational aspect of content management. Instead we hav…

> We should have dozens, if not hundreds of contenders for "the next WordPress" that leverage Git as a foundational aspect of content management.

If you want a new CMS, give it a shot. But nobody's made a better free version of Jenkins either. It's hard to do and completely unrewarding/unmonetizeable (as FOSS), which is probably why nobody has done it.

However, insisting it leverage a difficult source code version control system is artificially restricting. Start with an MVP of flat files for content and add a plugin system. Somebody will write Git support, but they'll also add other content backends. I'll bet you a million dollars that a custom SQL plugin that does version control will be preferred over Git by 99% of users. But they may wise up and use an S3 plugin instead. Or maybe all three. They'll have choices, and your project will become more useful.

Don't start your project with an artificial restriction and it will be better for it.

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

#164
To go one step further you can add an HTTP redirect for /info/refs to direct to wherever the GIT repo is hosted. For example, if hosting with gitlab pages or on Netlify you can put in a file called _redirects containing something like:-

/info/refs service=:service /.git/info/refs?service=:service" rel="nofollow">https://gitlab.com//.git/info/refs?service=:s... 301

Then if your website is at https://example.com someone can just 'git clone https://example.com'. They can periodically do 'git pull origin master' and you can also push changes that way. There's no problem moving to a different git repo provider (github/gitlab/whatever).

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

#165
post #164

To go one step further you can add an HTTP redirect for /info/refs to direct to wherever the GIT repo is hosted. For example, if hosting with gitlab pages or on Netlify you can put in a file called _redirects containing something like:- /info/refs service=:service / .git/info/refs?service=:service" rel="nofollow">https://gitlab.com/ / .git/info/refs?service=:s... 301 Then if your website is at https://example.com som…

Well, this works if publishing via Netlify anyway. Gitlab doesn't like the query parameters, but it also errors with 'no domain-level redirects to outside sites'

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

#166

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 c…

> Lately I've been seriously thinking of reimplementing that, as I just can't seem to find a decent static site generator.

If that's the case, go with that instead of trying to assimilate into workflows around existing static site generators. The world benefits from diversity, even diversity in software. Consider pouring your effort into making OpenLiveWriter work the way you want, if it doesn't already.

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

#167

If you want something to live on the web long after you've lost interest in it static HTML/GitHub pages seems like the way to go. The chess board I built in high school to learn JavaScript is still going strong: https://github.com/PJ-Finlay/JavaScript-Chess-Board

Per the timestamp, that's ~5 years. I've got a personal domain I've had for 20 years now. GitHub wasn't there, and I wouldn't bet a whole lot it will be there in another 20. I think it's likely, but nothing close to guaranteed. Git didn't exist then, either.

It's pretty easy to mirror your own git repos, so that's a nice option, and to have stuff hosted on GitHub, your own, and maybe BitBucket as well. But nothing is going to beat having your own backups--which I DO still have, from as early as 2000.

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

#168

Earlier quoted context omitted.

WordPress core yes, and it's pretty safe, but if you use many plugins (which most people do) that gets a lot riskier. Premium plugs are pretty safe but still I've had stuff break.

The kind of person whose needs would be satisfied by a static site generator doesn't seem likely to need 20 plugins, so it doesn't sound like an apples-to-apples comparison.

Just to be clear, 20 plugins was not my words.

I don't base on number of plugins, I base on complexity personally.

I mostly agree with you, but in my experience most (not all) people who are capable of using a static site generator will do so. Those who aren't comfortable with it use WordPress. I'm not slamming WordPress, just making an observation.

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

#169
post #114

Earlier quoted context omitted.

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…

Github's main business is not Github Pages or be a CDN. Netlify's main business is. Netlify also provides deployment previews for commits and PRs, and a complete CI/CD pipeline that you would have to implement yourself with Github Actions or something else. The CMS isn't what I need either, but there is so much more than just hosting.

Netlify also gives a healthy free tier of serverless functions if you need them.

They can also manage your domain/ssl which is nice so I can manage everything related to my site on Netlify.

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

#170

There is a problem in the CMS industry. Everyone wants to build a headless CMS to power Jamstack sites—only the content itself lives in databases and the CMS is usually a proprietary SaaS. Doesn't leverage Git for content in any way. This is deeply problematic. We should have dozens, if not hundreds of contenders for "the next WordPress" that leverage Git as a foundational aspect of content management. Instead we hav…

I’m under the impression there is still plenty more you can do with a database backed CMS then you can with markdown files. For instance difficulty marking pages as related to one another. You could use the slug, but if you later change the slug, you must track down all of the pages that relate to it and update the slug there too. Aka no normalisation.
Post reply on HN