summaryrefslogtreecommitdiff
path: root/_posts/2014-05-31-less-file-compilation-for-jekyll-github-pages.markdown
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2015-11-14 14:25:23 -0500
committerBen Burwell <ben@benburwell.com>2015-11-14 14:25:23 -0500
commit8856c415d16ae558609b615873826816c6718f42 (patch)
treee7a3a83e7cf0fbb75da3fb1517046207917630b8 /_posts/2014-05-31-less-file-compilation-for-jekyll-github-pages.markdown
parentce236fec927e1ca7991588a374607e53172844e6 (diff)
redesign
Diffstat (limited to '_posts/2014-05-31-less-file-compilation-for-jekyll-github-pages.markdown')
-rw-r--r--_posts/2014-05-31-less-file-compilation-for-jekyll-github-pages.markdown10
1 files changed, 9 insertions, 1 deletions
diff --git a/_posts/2014-05-31-less-file-compilation-for-jekyll-github-pages.markdown b/_posts/2014-05-31-less-file-compilation-for-jekyll-github-pages.markdown
index c4d9eb7..3bd3e78 100644
--- a/_posts/2014-05-31-less-file-compilation-for-jekyll-github-pages.markdown
+++ b/_posts/2014-05-31-less-file-compilation-for-jekyll-github-pages.markdown
@@ -13,6 +13,14 @@ I recently wrote about [migrating my website to GitHub Pages](/writing/migrating
Using [Git hooks](http://git-scm.com/book/en/Customizing-Git-Git-Hooks), it’s possible to run a script at certain points during the Git workflow. To take advantage of this in my case, I added a small bash script to `.git/hooks/pre-commit`:
-{% gist benburwell/0ef673f6311b5191186e %}
+{% highlight shell %}
+#!/bin/sh
+
+export PATH=/usr/local/bin:$PATH
+cd /Users/Ben/Documents/Code/benburwell.github.io/assets/less
+lessc --clean-css style.less ../css/style.css
+cd /Users/Ben/Documents/Code/benburwell.github.io
+git add /Users/Ben/Documents/Code/benburwell.github.io/assets/css/style.css
+{% endhighlight %}
This is a pretty rough script, but it gets the job done for me. For a much more thorough script, see [this article by TJ VanToll](http://tjvantoll.com/2012/07/07/the-ideal-less-workflow-with-git/).