Follow

Looking for a simple git-based blog system. I.E., “git push” and the stuff in the repo turns into some static content at the remote.

I’m thinking something that is triggered by a commit hook or some such, ideally turning markdown into markup, although I could deal with HTML in the repo if necessary.

Considering writing the whole thing myself but figured I’d ask just in case I don’t have to :)

Use ikiwiki, Hugo or Jekyll together with GitLab pages?

hackerpublicradio.org/eps.php?…

For self-hosting, yeah, just pushing to your http server and running the generator in post-commit will do the trick.

Using symlinks you can make the flip from previous rendering to current rendering atomic.

@clacke definitely want to go the self-hosted route, preferably using static files for performance, lower overhead, etc.

When you say “the generator”, are you referring to something specific?

@clacke ah I think I got it, thanks for the suggestions!

@clacke @jjg

+1 for Hugo

Sugest: Shell script to check for changes, then run Hugo + Rsync the docs folder to http Server. Hugo + Rsync works great here for all m y sites. Checking for changes should be easy

For fractalide.com it's extra easy for us, because we use Styx, and Nix handles caching and versions and symlinking for us. We simply have a service that runs every X minutes, checks what HEAD of the github repo is, builds the latest commit with the webroot as output link.

nix-build github.com/our/repo/archive/$h… --out-link /var/lib/www

Where head_commit=$(git ls-remote ... HEAD | awk '{print $1}'. You can't use master.tar.gz, because nix-build caches too aggressively. A URL based on the immutable commit id is the best cache buster.

Actually you don't even need Styx, you can get all the Nix goodies with any site generator with a thin Nix wrapper. The thing is that we don't check for changes, we just build the latest commit all the time, and if it's already built because it didn't change, then Nix knows that and it's a no-op.

@jjg The search keyword to start with is probably "static site generator".

One of the oldest, best known examples is Jekyll, written in Ruby. GitHub's GitHub Pages system will auto-build Jekyll-based git repositories on git push and host them on GitHub.io. You can even CNAME a domain to them. (This is how I host my personal blog, for instance.)

Many newer options such as Hugo (written in golang), Gatsby (React-based), etc. Newer static page hosts like surge.sh and Zeit's Now.

@jjg roll your own! it's fun. :)

here's mine (i don't use a commit hook, but it'd be easy enough): code.p1k3.com/gitea/brennen/wr

@jjg I'm going with jekyll personally. Had used it on github.io for a long time, but finally grew out of that due to wanting formatting plugins. Workflow is build-test-push, which suits me as I usually want to fix a dozen typos before I push. (Also currently busted.)

@jjg @gemlog Might be a bit more technical than you are looking for, but I use Hugo to deploy my site. It’s just a single statically compiled binary on the server end. I edit my local repository, push to master and a git hook clones the repository, builds it and deploys to /var/www

@jamie @jjg Perfectly straightforward and appropriate to this thread. Hugo and git hooks came up in a related thread.

@jjg I just set up Hugo to push to Netlify and it is exactly this. Lots of nice templates to start from as well

gohugo.io/hosting-and-deployme

Not really a lot of content yet, but here’s my site for reference: firewally.net

@jjg Plerd is something like that, except triggered by moving files into a (possibly remote/Dropboxed/etc) directory. Author is pretty responsive, might have some thoughts about git integration.

@jjg I don't know if this could be a component of your system or not. I use something called MDwiki to take markdown pages and render them as HTML. It's entirely client-side (HTML and JS), installation is literally dropping an HTML file on your server.

dynalon.github.io/mdwiki/#!ind

Decided to give Hugo a shot, thanks for all the suggestions!

Found this tutorial that looks pretty good in case anyone else is looking for such a thing:

digitalocean.com/community/tut

@jjg It's been pretty easy to deal with so far. And being able to tweak the #golang code if necessary is a plus.

I would be dead in the water fiddling with Wordpress PHP spaghetti.

@h that's where I'm departing from (WP).

So far so good.

@h maybe you can help me out with something that I think might be Go-specific?

Working on the server-side of the deployment and I get:

"Error: Error copying static files: chtimes <private details>, operation not permitted" during the hugo command.

Of course it works with sudo, but that's not cool :)

I've confirmed that the user is in the right group, and that the directory permissions are cool, etc. (cp, mkdir all work) but I'm not sure what "chtimes" is trying to do?

@jjg Should be able to 'touch' though. Baffles me.

@h @jjg That's strange, as Chtimes() basically just does the same thing that touch does. Maybe the filesystem you're running the software on doesn't support utimes(2) system calls?

@vertigo @jjg

It could be a Hugo bug too, if it's fiddling with invalid timestamps for a given filesystem... but that seems highly unlikely.

@vertigo @h

I thought maybe some weird FS thing but sudo works so...had to be permissions?

Anyway I was able to work-around it by telling Hugo to stop messing with timestamps :)

@vertigo @h

...now to find a way to migrate wordpress content without agony 😂

@jjg A database export should be enough, and generate output as markdown or the usual Hugo inout format from that.
@vertigo

@jjg I would personally avoid PHP, the xmlrpc api, and plugins like the pest. A database export should suffice.

@vertigo

@jjg If I'm to guess from this information alone, it's trying to perform something equivalent to a unix 'touch'
golang.org/pkg/os/#example_Cht

@jjg Hey, thanks for that. Been looking for a good tutorial!

@xmanmonk @jjg
I didn't find DO to be a good deal for me, but I have availed myself of some of their tutorials since I left them.

@gemlog @xmanmonk same here, I use a different VPS but still use their tutorials because they are soooo good.

Kind of feel guilty about it 😇

@jjg @gemlog @xmanmonk
Ah. That's what that feeling was - it was kind of vague.
Seriously, I did buy a droplet from them once, but didn't think it was a very good deal compared to other providers.

@jjg The functionality is already in the Open Live Writer (with completely different technology).

Sign in to participate in the conversation
social.coop

social.coop is a cooperatively-run corner of the Fediverse. The instance is democratically governed by its members, who generally share an interest in the co-op model, but topics of discussion range widely.

If you are interested in joining our community, please review our Bylaws and Code of Conduct. If you agree with them, you may apply for membership on our instance via this link

Our instance is supported by sliding scale contributions of $1-10/mo made via Open Collective. You must have an active Open Collective account to apply for membership; you may set one up here