The BCGov Digital Toolkit is the reference repository for digital best practices across our teams. Most of our guides are open source, and you are free to use them as you wish.
Our hope is that other digital service teams, both inside and outside of the BC government, will adopt or modify the practices outlined here.
By developing this material in the open, we hope to encourage expert review and contributions from members of the tech community, furthering our goal of improving how government works through increased civic engagement with tech specialists.
This site was developed using approved BC Government standards in respect to branding, functionality, and information architecture.
See the wiki for a full set of instructions on how to contribute to the guides hosted here.
In order to install this website and the collection of digital guides onto your local computer, follow the instructions below. Please note that while contributions to the guides and front-end code of the website are welcome, the Government of British Columbia does not authorize the public publication of this website on any top level domains external to gov.bc.ca
or internal domains other than .bcgov
You may install and run this website locally and you may use its source code as the foundation for a project of your own. However, copying and redistributing the source code without modifications is prohibited.
git clone https://github.com/bcgov/digital-toolkit.git
cd digital-toolkit
bundle exec jekyll serve --watch
Run bundle exec jekyll serve --watch
in order to serve the site locally and to watch the source files for changes. Re-saving a file will cause the site to be re-generated when using the --watch
option.
Pull requests to the source code of the website are welcomed and appriciated. In order to contribute to the content of the site see the wiki.
Static images and CSS, JS, etc. are served from the /static
folder off of the root of the project. Move any static files to this directory and when Jekyll builds the site, the files will end up at: <example-site.com>/static/<file-name.file>
For example, if you place foo.jpg
inside /static/img
, the file will be served from example-site.com/static/img/foo.jpg
Some changes made to the BC Gov Skeleton (of which this site is based off) are:
src/js/bc-gov/misc.js
is commented out - This line intentionally offset the scroll position when scrolling to an anchor on the page. This was done because the default theme has a "sticky" header/navigation while this site does not.Important! Set the JEKYLL_ENV
variable to production
via the command line by adding it to your build command, like this: JEKYLL_ENV=production bundle exec jekyll serve
or JEKYLL_ENV=production jekyll build
Setting the JEKYLL_ENV
to production
will compile the site with certain features enabled, such as analytics.
For a full list of dependancies, or to use with Docker, see the Dockerfile
We pull the publishing source code from the os-pages
branch. (Do not delete this branch, the build will break).
The public and employees of the BCPS will make changes to the master
branch. When these changes have been reviewed and approved, simply merge them to the os-pages
branch with git or GitHub (instructions for GitHub follow). This will trigger a webhook that will publish the changes live to https://digital-toolkit.pathfinder.gov.bc.ca/.
In order to merge changes directly on GitHub:
os-pages
branch (aka https://digital-toolkit.pathfinder.gov.bc.ca/)