Git based static page hosting package

Hello again,
I’ve made a git based hosting for things such as Pelican, octopress.org and other static page hosting needs as the “Custom Web app with SFTP access” wasn’t quite what I as looking for.

I’ve not tested it on my “live” server yet but, I have tried it over and over on VirtualBox machines.

The code can be found on github and demo Youtube demo

###usage

  • write a static page or use something like Pelican, jekyllrb, octopress, Hugo and many more!
  • git remote add origin git@hostname:~/gitsourcecode/
  • git add index.html style.css
  • git commit -a -m "my first commit"
  • git push #login with the password you set at install
  • Visit your site and enjoy :slight_smile:

###features

  • all the goodness of git version control.
  • a hook to move the pages from the repo to the www serving folder.
  • tested with Pelican, but I assume all the other static page generators will work.

###features missing

  • ldap integration is missing (can git even be integrated with ldap without breaking everything?)
  • Backup and Restore doesn’t work! but, the site is held locally so just reinstall and git push again
  • unable to set up public key authentication ( I spent hours trying, and just couldn’t get it to work).
  • multiple installs
4 Likes

I’m now using it on my “live” system with no issues, Other than the ones I created myself by making the ssh a little more secure manually using ssh keys and limiting to a few users.

it seems to work perfectly with Pelican-CMS even if I am using an Ugly theme.

Nice idea !

I really like the idea too. Since I’ve packaged gogs, I’d like to try to make a similar apps that can serve a gogs repository. That way we can leave all the git stuff to gogs and link the nginx config to the local repo.

thank you, both of you!

I wanted to use yunohost and pelican (the default seems to be Github for hosting)
so it made sense to combine the two things.

I already have a working prototype here: https://github.com/mbugeia/gogs_webhost_ynh

For now it publish the master branch at each commit.

I still lack some testing and more flexibility like

  • being able to serve a site which is not at the root of the repo (ex: /public)
  • being able to modify the git hook, for now its overwrite at each update. I think when using a static generator some may want to run commands to build the static pages on a commit.