3

I just created my first test site with Jekyll and am hosting it on GitHub Pages.

I've been playing around with it, but I'm having a hard time figuring out the best way to set up CodeKit to work with Jekyll so that it does code injection on the _site/css file and also saves the changes on the /sitename/css file so that the style changes are reflected on the hosted site on GitHub Pages (which re-output the file based on the CSS from the parent directory.

So far, I figured out that I can work locally by going into config.rb and changing

css_dir = "css"

to

css_dir = "/_site/css"

and then changing it back when I want to push to GitHub.

This is extremely janky though, so I figured someone else had a better way to make this work.

1 Answers1

0
  1. Start your codekit project from within your jekyll project's root directory (ie: the path from which you would run $ jekyll build --watch to generate your static site).

  2. In the codekit project settings, go to the Browser Refreshing menu, and in the Website Root Subpath field, type the destination where jekyll outputs the static site (which is _site by default).

This will work whether or not you are using CSS pre-processors (sass, scss, less).

Brian Zelip
  • 2,909
  • 4
  • 33
  • 45