This repository contains the source code for the cantera.org website. The site is built using the Nikola static site generator.
- Create a virtual environment for Nikola (i.e., using conda or virtualenv)
- Clone the Cantera source:
git clone https://github.com/Cantera/cantera.git
- Clone the Cantera Jupyter examples:
git clone https://github.com/Cantera/cantera-jupyter.git
- Clone the Cantera website source:
git clone https://github.com/Cantera/cantera-website.git
- Enter the website repo:
cd cantera-website
- Copy the current development documentation:
curl -O https://cantera.org/documentation/dev/dev-docs.tar.bz2
- Extract the dev docs:
tar jxf dev-docs.tar.bz2 --strip-components=1 -C api-docs/dev
- Inside the website repo, install the required packages:
pip install -r requirements.txt
- Build the website and open in browser:
nikola auto -b
or usenikola serve -p 9000 -b
for different port
- Copy one of the existing
render_*_examples.py
andrender_*_examples.plugin
- Add the source folder as the key and destination folder to the
EXAMPLES_FOLDERS
dictionary inconf.py
- Edit the
render_*_examples.py
file to build the examples - See this blog post for more information about building Nikola tasks
- New example categories are stored in folders in the Jupyter and Python example repositories
- If new categories (folders) are added to the examples, the appropriate renderer needs to be updated
- In the Jupyter and Python examples, there's a dictionary called
*_headers
. Each folder of examples has a key in that dictionary. The values are a nested dictionary with three keys:name
: The name used on the index page for that categoryfiles
: An empty list that gets filled with the names of the examples in this categorysummaries
: A empty dictionary that gets filled with keys that are the example filename and values that are the summary from that example
- Add a new key to that dictionary with the folder name as the key and fill in the
name
key in the nested dictionary and set thefiles
andsummaries
keys to the empty list and empty dictionary, respectively
- To add the latest version's release notes:
nikola new_release
- To add release notes for a version by its tag name:
nikola new_release -t {tag_name}
- Example:
nikola new_release -t v2.4.0
- Example:
- To add release notes for a version by its release ID:
nikola new_release -i {id}
- Example:
nikola new_release -i 12508904
- Example: