Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ jobs:
python3 -m pip install pdm
pdm install --verbose
- name: Build the site
run: pdm run build
run: |
pdm run build
pdm run add_htaccess

# Create artifact containing output
- name: Create archive for website output
Expand Down
145 changes: 145 additions & 0 deletions mod_rewrite/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
RewriteBase "/"

RewriteRule "^documentation/dev/sphinx/html/_static/doc-versions.json$" "dev/_static/doc-versions.json" [R,L]

RewriteRule "^assets/img/(.*).png" "_static/img/$1.png" [R,L]
RewriteRule "^assets/css/(.*).css" "_static/css/legacy/$1.css" [R,L]
RewriteRule "^assets/js/copybutton.js" "_static/js/copybutton.js" [R,L]
RewriteRule "^favicon.ico" "_static/img/favicon.png" [R,L]

RewriteRule "^documentation/docs-(\d\.\d/.*)" "$1" [R=permanent,L]
RewriteRule "^documentation/release_notes/v(\d\.\d)\.\d\.html" "stable/reference/releasenotes/v$1.html" [R=permanent,L]
RewriteRule "^documentation/dev/doxygen/html/(.+)" "dev/cxx/$1" [R=permanent,L]
RewriteRule "^documentation/dev/sphinx/html/_tags/(.+)" "stable/_tags/$1" [R=permanent,L]
RewriteRule "^documentation/?" "stable/reference/" [R=permanent,L]

RewriteRule "^docs/sphinx/html/index.html" "stable/reference/index.html" [R=permanent,L]
RewriteRule "^docs/sphinx/html/faq.html" "stable/userguide/faq.html" [R=permanent,L]
RewriteRule "^docs/doxygen/html/(.+)" "stable/cxx/$1" [R=permanent,L]
RewriteRule "^stable/index.html" "stable/reference/index.html" [R=permanent,L]
RewriteRule "^dev/index.html" "dev/reference/index.html" [R=permanent,L]
RewriteRule "^3.1/index.html" "3.1/reference/index.html" [R=permanent,L]

RewriteRule "^science/?$" "stable/reference/index.html" [R=permanent,L]
RewriteRule "^science/index.html" "stable/reference/index.html" [R=permanent,L]
RewriteRule "^science/phases.html" "stable/reference/thermo/phase-thermo.html" [R=permanent,L]
RewriteRule "^science/science-species.html" "stable/reference/thermo/species-thermo.html" [R=permanent,L]
RewriteRule "^science/reactions.html" "stable/reference/kinetics/index.html" [R=permanent,L]
RewriteRule "^science/reactors.html" "stable/reference/reactors/index.html" [R=permanent,L]
RewriteRule "^science/flames.html" "stable/reference/onedim/index.html" [R=permanent,L]
RewriteRule "^science/kinetics.html" "stable/reference/kinetics/index.html" [R=permanent,L]
RewriteRule "^science/(\w+)-thermo.html" "stable/reference/thermo/$1-thermo.html" [R=permanent,L]
RewriteRule "^science/thermodynamics.html" "stable/reference/thermo/index.html" [R=permanent,L]
RewriteRule "^science/thermo.html" "stable/reference/thermo/index.html" [R=permanent,L]
RewriteRule "^science/transport.html" "stable/reference/transport/index.html" [R=permanent,L]
RewriteRule "^docs/sphinx/html/flames.html" "stable/reference/onedim/index.html" [R=permanent,L]
RewriteRule "^docs/sphinx/html/reactors.html" "stable/reference/reactors/index.html" [R=permanent,L]
RewriteRule "^docs/sphinx/html/python/(.+).html" "stable/python/$1.html" [R=permanent,L]

RewriteRule "^tutorials/input-files.html" "stable/userguide/input-tutorial.html" [R=permanent,L]
RewriteRule "^tutorials/legacy2yaml.html" "stable/userguide/legacy2yaml-tutorial.html" [R=permanent,L]
RewriteRule "^tutorials/yaml/yaml-format.html" "stable/userguide/input-tutorial.html" [R=permanent,L]
RewriteRule "^tutorials/yaml/.*" "stable/userguide/creating-mechanisms.html" [R=permanent,L]
RewriteRule "^(tutorials|docs/sphinx/html)/cxx-guide/compiling.html" "stable/userguide/compiling-cxx.html" [R=permanent,L]
RewriteRule "^(tutorials|docs/sphinx/html)/cxx-guide" "stable/userguide/cxx-tutorial.html" [R=permanent,L]
RewriteRule "^tutorials(.*)" "stable/userguide$1" [R=permanent,L]

RewriteRule "^develop/index.html" "stable/develop/index.html" [R=permanent,L]
RewriteRule "^install/compiling-install.html" "stable/develop/index.html" [R=permanent,L]
RewriteRule "^install/(macos|windows)-install.html" "stable/install/index.html" [R=permanent,L]
RewriteRule "^install/(.+)-install.html" "stable/install/$1.html" [R=permanent,L]
RewriteRule "^install(.*)" "stable/install$1" [R=permanent,L]
RewriteRule "^downloads?.html" "stable/install/index.html" [R=permanent,L]
RewriteRule "^docs/sphinx/html/install.html" "stable/install/index.html" [R=permanent,L]

RewriteRule "^(docs/sphinx/html/)?compiling/installation-reqs.html" "stable/develop/compiling/compilation-reqs.html" [R=permanent,L]
RewriteRule "^sphinx/html/compiling.html"
RewriteRule "^(docs/sphinx/html/)?compiling/(scons-)?(.+?)(-dev)?.html" "stable/develop/compiling/$3.html" [R=permanent,L]
RewriteRule "^docs/sphinx/html/compiling.html" "stable/develop/index.html" [R=permanent,L]
Rewriterule "^sphinx/html/search.html(.*)" "stable/search.html$1" [R,L]

RewriteRule "^blog/index.html" "news-index.html" [R=permanent,L]
RewriteRule "^blog/?$" "news-index.html" [R=permanent,L]
RewriteRule "^blog/(.+)" "news/$1" [R=permanent,L]
RewriteRule "^categories/website.html" "news/category/website.html" [R=permanent,L]
RewriteRule "^categories/(.+)\.html" "news/tag/$1.html" [R=permanent,L]
RewriteRule "^authors/(.+)\.html" "news/author/$1.html" [R=permanent,L]
RewriteRule "^dave.html" "dave-goodwin.html" [R=permanent,L]
RewriteRule "^affiliated-packages.html" "affiliated.html" [R=permanent,L]
RewriteRule "^reference/index.html" "stable/reference/index.html" [R=permanent,L]

RewriteRule "^science/reactors/constpresmolereactor.html" "stable/reference/reactors/constant-pressure-mole-reactor.html" [R=permanent,L]
RewriteRule "^science/reactors/constpresreactor.html" "stable/reference/reactors/constant-pressure-reactor.html" [R=permanent,L]
RewriteRule "^science/reactors/controlreactor.html" "stable/reference/reactors/controlreactor.html" [R=permanent,L]
RewriteRule "^science/reactors/idealgasconstpresmolereactor.html" "stable/reference/reactors/ideal-gas-constant-pressure-mole-reactor.html" [R=permanent,L]
RewriteRule "^science/reactors/idealgasconstpresreactor.html" "stable/reference/reactors/ideal-gas-constant-pressure-reactor.html" [R=permanent,L]
RewriteRule "^science/reactors/idealgasmolereactor.html" "stable/reference/reactors/ideal-gas-mole-reactor.html" [R=permanent,L]
RewriteRule "^science/reactors/idealgasreactor.html" "stable/reference/reactors/ideal-gas-reactor.html" [R=permanent,L]
RewriteRule "^science/reactors/reactors.html" "stable/reference/reactors/index.html" [R=permanent,L]
RewriteRule "^science/reactors/molereactor.html" "stable/reference/reactors/mole-reactor.html" [R=permanent,L]
RewriteRule "^science/reactors/pfr.html" "stable/reference/reactors/pfr.html" [R=permanent,L]
RewriteRule "^science/reactors/cvodes.html" "stable/develop/reactor-integration.html" [R=permanent,L]
RewriteRule "^science/reactors/extensiblereactor.html" "stable/userguide/extensible-reactor.html" [R=permanent,L]
RewriteRule "^science/reactors/customreactor.html" "stable/userguide/extensible-reactor.html" [R=permanent,L]
RewriteRule "^science/reactors/delegatedreactor.html" "stable/userguide/extensible-reactor.html" [R=permanent,L]

RewriteRule "^(3.1|dev)/cython/(.+)" "$1/python/$2" [R=permanent,L]
RewriteRule "^docs/sphinx/html/cython/examples/(\w+?)_(.*).html" "stable/examples/python/$1/$2.html" [R=permanent,L]
RewriteRule "^docs/sphinx/html/cython/(.+)" "stable/python/$1" [R=permanent,L]

RewriteRule "^3.0/sphinx/html/python/(.+)" "3.0/sphinx/html/cython/$1" [R,L]

RewriteRule "^2.1/doxygen/html/jquery.js" "2.1/sphinx/html/_static/jquery.js" [R,L]
RewriteRule "^(2.\d)/sphinx/html/cython/doxygen/html/(.*)" "$1/doxygen/html/$2" [R,L]

RewriteRule "^python/(onedim|kinetics|reactors|thermo|transport)/(.*)" "stable/examples/python/$1/$2" [R=permanent,L]

RewriteRule "^examples(|/|/index.html)$" "stable/examples/index.html" [R=permanent,L]
RewriteRule "^examples/python(|/|/index.html)$" "stable/examples/python/index.html" [R=permanent,L]

RewriteRule "^examples/python/surface_chemistry/1D_pfr_surfchem.py.html" "stable/examples/python/reactors/1D_pfr_surfchem.html" [R=permanent,L]
RewriteRule "^examples/python/surface_chemistry/catalytic_combustion.py.html" "stable/examples/python/onedim/catalytic_combustion.html" [R=permanent,L]
RewriteRule "^examples/python/surface_chemistry/diamond_cvd.py.html" "stable/examples/python/kinetics/diamond_cvd.html" [R=permanent,L]
RewriteRule "^examples/python/surface_chemistry/lithium_ion_battery.py.html" "stable/examples/python/kinetics/lithium_ion_battery.html" [R=permanent,L]
RewriteRule "^examples/jupyter/electrochemistry/lithium_ion_battery.ipynb.html" "stable/examples/python/kinetics/lithium_ion_battery.html" [R=permanent,L]
RewriteRule "^examples/python/surface_chemistry/sofc.py.html" "stable/examples/python/kinetics/sofc.html" [R=permanent,L]
RewriteRule "^examples/python/multiphase/(.+)\.py\.html" "stable/examples/python/thermo/$1.html" [R=permanent,L]
RewriteRule "^examples/python/multiphase/(.+)\.py" "stable/examples/python/thermo/$1.html" [R=permanent,L]
RewriteRule "^examples/python/(\w+)/(.+)\.py\.html" "stable/examples/python/$1/$2.html" [R=permanent,L]
RewriteRule "^examples/python/(\w+)/(.+)\.py" "stable/examples/python/$1/$2.html" [R=permanent,L]

RewriteRule "^examples/jupyter/flames/flame_speed_with_convergence_analysis.ipynb.html" "stable/examples/python/onedim/flame_speed_convergence_analysis.html" [R=permanent,L]
RewriteRule "^examples/jupyter/flames/flame_speed_with_sensitivity_analysis.ipynb.html" "stable/examples/python/onedim/flamespeed_sensitivity.html" [R=permanent,L]
RewriteRule "^examples/jupyter/flames/twin_premixed_flame_axisymmetric.ipynb.html" "stable/examples/python/onedim/premixed_counterflow_twin_flame.html" [R=permanent,L]
RewriteRule "^examples/jupyter/input/ck2yaml_demo.ipynb.html" "stable/userguide/ck2yaml-tutorial.html" [R=permanent,L]

RewriteRule "^examples/jupyter/reactors/1D_packbed.ipynb.html" "stable/examples/python/reactors/1D_packed_bed.html" [R=permanent,L]
RewriteRule "^examples/jupyter/reactors/1D_pfr_surfchem.ipynb.html" "stable/examples/python/reactors/1D_pfr_surfchem.html" [R=permanent,L]
RewriteRule "^examples/jupyter/reactors/batch_reactor_ignition_delay_NTC.ipynb.html" "stable/examples/python/reactors/NonIdealShockTube.html" [R=permanent,L]
RewriteRule "^examples/jupyter/reactors/interactive_path_diagram.ipynb.html" "stable/examples/python/kinetics/interactive_path_diagram.html" [R=permanent,L]
RewriteRule "^examples/jupyter/reactors/nonideal_shock_tube.ipynb.html" "stable/examples/python/reactors/NonIdealShockTube.html" [R=permanent,L]
RewriteRule "^examples/jupyter/reactors/stirred_reactor.ipynb.html" "stable/examples/python/reactors/continuous_reactor.html" [R=permanent,L]

RewriteRule "^examples/jupyter/thermo/equations_of_state.ipynb.html" "stable/examples/python/thermo/equations_of_state.html" [R=permanent,L]
RewriteRule "^examples/jupyter/thermo/flame_temperature.ipynb.html" "stable/userguide/flame-temperature.html" [R=permanent,L]
RewriteRule "^examples/jupyter/thermo/heating_value.ipynb.html" "stable/userguide/heating-value.html" [R=permanent,L]
RewriteRule "^examples/jupyter.*" "stable/examples/python/index.html" [R=permanent,L]

# Someday, these MATLAB rules will be updated to point to a non-experimental version of the toolbox
RewriteRule "^examples/matlab/surfreactor\.m\.html" "stable/examples/matlab_experimental/surf_reactor.html" [R,L]
RewriteRule "^examples/matlab/diffflame\.m\.html" "stable/examples/matlab_experimental/diff_flame.html" [R,L]
RewriteRule "^examples/matlab/Plug_Flow_Reactor\.m\.html" "stable/examples/matlab_experimental/plug_flow_reactor.html" [R,L]
RewriteRule "^examples/matlab/index\.html" "stable/examples/matlab_experimental/index.html" [R,L]
RewriteRule "^examples/matlab/(.+)\.m\.html" "stable/examples/matlab_experimental/$1.html" [R,L]

RewriteRule "^examples/cxx/LiC6-electrode.html" "stable/examples/cxx/LiC6_electrode.html" [R=permanent,L]
RewriteRule "^examples/cxx/gas-transport.html" "stable/examples/cxx/gas_transport.html" [R=permanent,L]
RewriteRule "^examples/cxx/openmp-ignition.html" "stable/examples/cxx/openmp_ignition.html" [R=permanent,L]
RewriteRule "^examples/cxx/bvp.html" "stable/examples/cxx/blasius.html" [R=permanent,L]
RewriteRule "^examples/cxx/jacobian.html" "stable/examples/cxx/derivative_speed.html" [R=permanent,L]
RewriteRule "^examples/cxx/(.+)\.html" "stable/examples/cxx/$1.html" [R=permanent,L]
RewriteRule "^examples/cxx/(.+)-(.+)\.html" "stable/examples/cxx/$1_$2.html" [R=permanent,L]

RewriteRule "^examples/fortran/demo.f.html" "stable/examples/fortran/f77_demo.html" [R=permanent,L]
RewriteRule "^examples/fortran/index.html" "stable/examples/fortran/index.html" [R=permanent,L]
RewriteRule "^examples/fortran/(\w+)\.(f|f90|cpp).html" "stable/examples/fortran/$1.html" [R=permanent,L]
3 changes: 3 additions & 0 deletions mod_rewrite/2.4/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RewriteBase "/2.4/"

RewriteRule "^sphinx/_static/(.+)" "sphinx/html/_static/$1" [R,L]
3 changes: 3 additions & 0 deletions mod_rewrite/3.0/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RewriteBase "/3.0/"

RewriteRule "^sphinx/html/python/(.+)" "sphinx/html/cython/$1" [R]
5 changes: 5 additions & 0 deletions mod_rewrite/3.1/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
RewriteBase "/3.1/"

RewriteRule "^cython/(.+)" "python/$1" [R]
RewriteRule "^cxx/d7/d32/classCantera_1_1Poly1(.*)" "cxx/d2/db3/classCantera_1_1Poly13$1" [L]
RewriteRule "^cxx/dd/d77/classCantera_1_1ConnectorFactory(.*)" "cxx/d0/dc8/classCantera_1_1FlowDeviceFactory$1" [L]
5 changes: 5 additions & 0 deletions mod_rewrite/dev/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
RewriteBase "/dev/"

RewriteRule "^cython/(.+)" "python/$1" [R]
RewriteRule "^cxx/d2/db3/classCantera_1_1Poly13(.*)" "cxx/d7/d32/classCantera_1_1Poly1$1" [L]
RewriteRule "^cxx/d0/dc8/classCantera_1_1FlowDeviceFactory(.*)" "cxx/dd/d77/classCantera_1_1ConnectorFactory$1" [L]
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ rebuild = { cmd = [
"0",
"--open-browser",
] }
add_htaccess = { cmd = "cp -r mod_rewrite/. build/html" }
Loading