This repository contains the source code for the cantera.org website. The site is built using the Nikola static site generator.
git clone https://github.com/Cantera/cantera.git
git clone https://github.com/Cantera/cantera-jupyter.git
git clone https://github.com/Cantera/cantera-website.git
cd cantera-website
curl -O https://cantera.org/documentation/dev/dev-docs.tar.bz2
tar jxf dev-docs.tar.bz2 --strip-components=1 -C api-docs/dev
pip install -r requirements.txt
nikola auto -b
or use nikola serve -p 9000 -b
for different portrender_*_examples.py
and render_*_examples.plugin
EXAMPLES_FOLDERS
dictionary in conf.py
render_*_examples.py
file to build the examples*_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 examplename
key in the nested dictionary and set the files
and summaries
keys to the empty list and empty dictionary, respectivelynikola new_release
nikola new_release -t {tag_name}
nikola new_release -t v2.4.0
nikola new_release -i {id}
nikola new_release -i 12508904
Governing Equations for Single Reactors
_YAML 1.2 <https://yaml.org/spec/1.2/spec.html>
__ConstPressureReactor
ThermoPhase <{{% ct_docs doxygen/html/dc/d38/classCantera_1_1ThermoPhase.html %}}>
__IC engine example </examples/python/reactors/ic_engine.py.html>
__three-body <sec-yaml-three-body>
To allow the version switcher to work smoothly between Cantera =< 3.0 and Cantera >= 3.1
(where the directory structure changed significantly), we rely on several mod_rewrite
rules, implemented in .htaccess
files:
/dev/.htaccess
:
RewriteBase "/dev/"
RewriteRule "^cython/(.+)" "python/$1" [R]
* `/documentation/.htaccess`:
```conf
RewriteBase "/documentation/"
RewriteRule "^dev/sphinx/html/cython/(.*)" "../dev/python/$1" [R]
RewriteRule "^docs-3.0/sphinx/html/python/(.*)" "docs-3.0/sphinx/html/cython/$1" [R]
RewriteRule "^dev/sphinx/html/(.+)" "../dev/$1" [R]
/stable/.htaccess
:
RewriteBase "/stable/"
RewriteRule "^cxx(.)" "../documentation/docs-3.0/doxygen/html/$1" RewriteRule "^(.)" "../documentation/docs-3.0/sphinx/html/$1"