This is the Sphinx theme used for the Open Contracting Standard documentation. It is a fork of the Read the Docs Sphinx Theme, the original readme for that can be found at RTD_THEME_README.rst.
We forked the theme rather than inheriting from it, because Sphinx's Jinja templates only allow one level of overrides. By having our own (forked) theme, we can have one theme for all versions of the standard, but make version-specific overrides on the appropriate branch.
The instructions in the original README are for macOS. On a recent version of Ubuntu (like 15.10), you can run:
sudo aptitude install nodejs npm ruby-sass
npm config set prefix '~/.npm-packages'
export PATH="$PATH:$HOME/.npm-packages/bin" # and put this line in your ~/.bashrc
# (if running 'node' doesn't bring up a command prompt (>)
sudo ln -s /usr/bin/nodejs /usr/bin/node
On older versions (like 14.04), run gem install sass instead of installing ruby-sass with aptitude.
Then, as in the original README:
npm install -g bower grunt-cli
npm install
Create a working branch:
- Checkout the
open_contractingbranch (masteris upstream) - Checkout a working branch
- Run
gruntto automatically detect changes and recompile CSS files
Make changes:
- Make changes to SASS files
Preview changes:
- Change to the
standard's directory - Run
pip install -e pathwherepathis the path to the theme's directory - Run
make(ormake sourcefor English only) - Run
python -m http.server --directory build - Repeat from "Make changes" until done
Commit changes:
- Stop
grunt(Ctrl-C) - Run
grunt build - Commit changes
pybabel extract . -F pyproject.toml -o locale/sphinx.pot -k '_ l_ lazy_gettext'
pybabel update -N -i locale/sphinx.pot -d locale -D sphinx