This is a skeleton repo containing the CFPB/DOCter-based Jekyll template for BC Gov Guides.
To create a new guide, where fancy-new-guide is the name of your new repository:
- create a new repo on GitHub. (Since we're prentending it's called 'fancy-new-guide' and it's in the bcgov organization, the repo's URL is https://github.com/bcgov/fancy-new-guide.git)
$ git clone --bare https://github.com/bcgov/guides-template.git
$ cd guides-template.git
$ git push --mirror https://github.com/bcgov/fancy-new-guide.git
$ cd ..
$ rm -rf guides-template.git
$ git clone https://github.com/bcgov/fancy-new-guide.gitIf you're ruby-savvy and you've followed "Approach 2" below, you can follow the instructions here.
$ git clone https://github.com/bcgov/guides-template.git MY-NEW-GUIDE
$ cd MY-NEW-GUIDEYou can then serve your guide locally using one of the approaches below.
You may want to preview your guide as you are working on the content. We provide a pretty simple way to do this via Docker To get set up to preview your guide as you are working on it, follow the steps below:
- install Kitematic
- launch Kitematic
- click the "DOCKER CLI" button at the bottom left of the Kitematic window

- type:
cd <location of your guide repo>- type:
docker build --tag guide:latest --file Dockerfile-local ./- then type:
docker run -p 4000:4000 -d -v $PWD:/guide --name guide guide:latest- open your web browser to http://192.168.99.100:4000/ and you should see the latest version of your guide as it will appear when published.
At this point, as you update content and want to see the results reflected in the preview site, you can do the following:
- select your container from the Container list on the right hand column of the Kitematic app (it will be labelled "guide").

- click the "Restart" button in the Kitematic app. (We'd prefer to have published content auto-updated without restarting, but haven't quite nailed that yet.)

You will need Ruby ( > version 2.1.5 ). To check
whether it's already installed on a UNIX-like system, open up a terminal
window (e.g. Terminal on OS X) and type ruby -v at the command prompt. For
example, you should see something similar to the following:
$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]If the version number is less than 2.1.5, or instead you see something like:
$ ruby -v
-bash: ruby: command not foundThen Ruby is not installed, and you should choose one of the installation methods below. The "Installing Ruby" page of the official Ruby language web site explains how to do this in a number of ways across many different systems.
On OS X, you can use Homebrew to install Ruby in
/usr/local/bin, which may require you to update your $PATH environment
variable:
$ brew update
$ brew install rubyWhether or not Ruby is already installed, we strongly recommend using a Ruby version manager such as rbenv or rvm to help ensure that Ruby version upgrades don't mean all your gems will need to be rebuilt.
To serve serve the locally, where MY-NEW-GUIDE is the name
of your new repository:
$ cd MY-NEW-GUIDE
$ ./go serveThe ./go script will check that your Ruby version is supported, install the
Bundler gem if it is not yet installed, install all the
gems needed by the template, and launch a running instance on
http://localhost:4000/.
The Guides Template (either running locally or the published version) will walk you through the rest of the steps to edit and publish your guide.
This project is in the worldwide public domain. As stated in CONTRIBUTING:
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.