News for hackers. Stuff that matters.
Re:Blog with Markdown and Git, and degrade gracefully throug... by hhdave on Tuesday February 09, 2021 @07:38AM (#26076756)
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 https://gitlab.com/<user>/<project>.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 throug... by hhdave on Tuesday February 09, 2021 @08:02AM (#26076976)
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'