3 ms·
Using Git to Maintain Your Website
- mpk 17y agoI used to use svn, but these days I use git for maintaining static websites. Maybe I missed something in this article, but the key to static websites (as far as I see it) is using a templating system. Put your templates, content and configuration under version control and you're pretty much done. The website itself is a generated artifact.
- ryanwaggoner 17y agoHmmm...interesting, but it seems like this takes automation a bit far. I also use Git as a single developer on a project of mine, and I have staging and production environments on my server, but I have simple deployment scripts that I run to update the changes on the server, clear any cache files, etc. It's not that much more complicated than what he does here, but it gives me the peace of mind of knowing that I can commit my changes without the world seeing them automatically.
- fizx 17y agoPresumably, he works in a branch.
- ryanwaggoner 17y agoActually, if you read the post, it's clear that he doesn't, unless he stripped all that out for the purpose of simplicity when explaining. But that's my whole point: doing this the right way is hardly more complicated.
- woid 17y agothese days I use github+github pages, even although I wrote http://drydrop.binaryage.com http://drydrop.binaryage.com ;)
- yangman 17y agoI do something similar with my site, but without the extra intermediary repository. On a push, the server-side hook simply hard resets the content of the folder to the tip of a specific branch. The website itself acts as the canonical repository of, well, itself. http://yangman.ca/blog/2009/08/06/website-management-with-git/ http://yangman.ca/blog/2009/08/06/website-management-with-gi...
- KevBurnsJr 17y agoI have a very similar setup with post-receive deploys on remotes "stage" and "production". git push stage master click around staging environment to make sure nothing's broken git push production master you're live.
- bravura 17y agoOr, use ikiwiki (http://ikiwiki.info/ http://ikiwiki.info/). It takes your git repository, a directory hierarchy of Markdown files, and will automatically compile them to HTML each time you push. Even more elegant.
- known 17y agoUsing CVS to Update a Web Site http://www.kegel.com/cvs.html http://www.kegel.com/cvs.html
- jamesbritt 17y agoThe Ruby Best Practices blog (blog.rubybestpractices.com ) uses a a git-based system that's quite nice. http://github.com/sandal/korma http://github.com/sandal/korma I wrote up some background on it here: http://blog.rubybestpractices.com/posts/jamesbritt/2009-04-13-solving-the-problem.rc.html http://blog.rubybestpractices.com/posts/jamesbritt/2009-04-1...