This repository holds the custom theme for https://github.com/openownership/data-standard
It also holds various files and tools to build this theme.
If you are writing docs only and don't need to change the theme then please follow the instructions at https://github.com/openownership/data-standard/blob/master/README.md
You will need Vagrant and VirtualBox (or equivalent).
Edit any files you want, then repeat the last 2 steps!
Simply pass a variable:
BODSLANG=ru build
Q: Pip install fails saying "ERROR: Could not install packages due to an EnvironmentError: [Errno 39] Directory not empty"? A: Just run the command again. If the error persists, run
rm -rf /vagrant/data-standard/.ve
and try again.
When you are connected to the vagrant box (after running "vagrant ssh"), run:
build
At the end this will check all internal links and echo a report. Hopefully you will see:
SUCCESS Crawled 91 urls in 2.53 seconds
This will only check internal links. If you want to check external links to, run:
build
pylinkvalidate.py --test-outside --output=/tmp/report.txt http://localhost/
cat /tmp/report.txt
Any errors reported in external links must be checked by hand - sometimes a website will block our automatic checker but let a human through.
If you add English text to a theme (including in title
attributes or similar), make sure to wrap it in {% trans %}
/ {% endtrans %}
blocks.
You need to get a Transifex API key, make sure you have access to the BODS Theme project on Transifex.
After you add translatable strings to the theme templates:
oods/locale/sphinx.pot
): python setup.py extract_messages
tx push -s
tx pull -a
sphinx-build -b html -D language={lang} . _build/html/{lang}
(from the data-standard/docs
directory)