advanced usage of jpy-flette¶
jpy-flette works without any configuration. Just run it in the folder of your .ipynb notebooks, or pass the directory as command line argument.
configuration file¶
If you find yourself re-typing the same command line arguments, or want something oh là là, use a configuration file: Put a fletteconf.yaml somewhere close to your .ipynb files. When jpy-flette runs, it looks for a configuration file in the folder you supplied (or the working directory, if you did not pass a path to jpy-flette). With
jpy-flette ~/my/directory/notebooks
it would find ~/my/directory/notebooks/fletteconf.yaml, if it's there.
The configuration file is written in YAML format. The default configuration is
source: ""
target: "../docs"
theme: "flette"
title_prefix: ""
title_suffix: ""
title_sidebar: "<auto>"
inject: ""
You can overwrite any, or all, of the configuration options in your custom file.
source(the directory with the.ipynbnotebooks) andtarget(the directory with the.htmlfiles) are relative to the configuration file.- If
title_sidebaris set to"<auto>", the sidebar title is set based on the first header of the first page (usually your00.index.ipynb). - The HTML code in
injectis copied at the end of every generated HTML file (before</body>)
themes¶
You can vroum jpy-flette with your own themes! Specify the theme to use in the fletteconf.yaml file. jpy-flette looks inside its root directory (the directory you installed jpy-flette to) for a folder called theme-<your theme name>/. You can also specify a full path to your theme directory in the config.
The default theme theme-flette is built with
- spectre.css css framework
- SCSS pre-processor
- cash as a light replacement for jQuery
- Domine font
- yarn package manager
If you would like to modify the theme, install its develoment dependencies with yarn install.
technology¶
If you're curious, jpy-flette uses