cd
into the Jupyter-Alabaster-Theme directoryvirtualenv
or conda environment
to manage packages.pip install -r dev-requirements.txt
cd
into the docs directorymake clean && make html_theme
The docs will be built in build/html
. They can be viewed by starting an HTTP
server and navigating to 0.0.0.0:8000 in your web browser.
python3 -m http.server
Modifying CSS:
Do not change CSS directly, instead change Post CSS files. This project is using Post CSS, specifically the css-next module. Post CSS allows us to have nested CSS selectors and makes it easier to read them.
To Add a Post CSS file:
foo.pcss
in jupyter_alabaster_theme/statuc/pcss
@mimport foo.css
to index.css
.package.json
add a script with a name css:foo
and action
"postcss jupyter_alabaster_theme/static/pcss/foo.pcss -o jupyter_alabaster_theme/static/css/foo.css",
css
script in package.json
to include npm run css:foo
.To compile Post CSS into CSS:
npm run css
Modifying Sphinx templates:
jupyter_alabaster_theme
:pip uninstall jupyter_alabaster_theme
pip install .
make clean && make html