Closed dmsnell closed 9 years ago
To test:
git clone https://github.com/CodeForTucson/codefortucson-site.git
git checkout enhance/local-dev-process
make
[open browser to http://localhost:4000]
Update: After the
Makefile
commit I have updated the testing instructions to reflect the fact that you no longer need to run Jekyll manually with the proper switches, but can instead run a simplemake
from the project root to start the local server.
Thank you @dmsnell this is beautiful :dancer: :dancer: :dancer:
When I started to try and get this site going on my machine I discovered that it's pretty hard to setup correctly. A few of the issues with hosting on GitHub Pages and Jekyll collided leading to some funky instructions for doing local dev: commenting out variables in the build config and also in CSS files. This process was a bit fragile with regards to accidentally deploying changes that could take down the production site.
Now, the build process has changed by the introduction of some automatic variables that setup the environment in place of the developer.
jekyll serve --config _config.yml, _config_local.yml --baseurl '' --watch
style.css
production
, available which holdstrue
for production builds andfalse
for development builds, as specified by the inclusion of the local config file.The local config file does not replace
_config.yml
, but merely redefines a few variables, so both are needed.I have also updated
README.md
to reflect these changes. Along the way there were a few updates, such as using thegithub-pages
gem instead of installing all the dependencies separately.Additionally I have linked some git tutorials in case this is all very unfamiliar to some contributors.