Tuesday, September 29, 2015

golang template system AND an rsync deployment script!

So, I started my first foray into go-lang for my http://nata.li launch.

The idea is that I am creating a little templating system similar to Template Toolkit out of golang's text/template library.

Here's what I have so far:

https://gist.github.com/beta0x64/c7f634a164e5a6180270

Now remember, I'm a total noob at Go. Just getting things reading and writing was a huge pain. Expect some improvements as time goes on, and I try to do more and more complex things with http://nata.li

Here's the rsync I use for copying from my local machine to my web host:

https://gist.github.com/beta0x64/056c60752fa07a1eab3c

The basic idea is to replace your_local_site_directory with where you store your HTML, CSS, JS etc.. Replace username and example.com with your web host credentials just like you're SSHing in. And of course replace ~/public_html/site_directory with the location that your web host reads your static site's HTML from.