- Development related content such as developer guide, benchmark documentation, tools description, ... will be simple Markdown files in e.g. /web/content/docs
- You can preview documentation locally with Hugo – a static site generator
- You can mark benchmarks to be automatically and interactively visualized in the documentation inside your browser via vtk.js! 🍻 CURRENTLY DISABLED!
- Download Hugo and put it in your
PATH
- Install Pandoc
- Inside the source-directory
ogs/web
:- Run
hugo server
- Open http://localhost:1313
- Run
As you make modifications to the site it will be rebuild and the page in the browser gets reloaded.
By using hugo new
you can create a new page with the correct frontmatter for that kind of page:
hugo new docs/benchmarks/elliptic/groundwater-flow-dirichlet.pandoc
- path is relative to
content/
and determines the URL of the page
Or you can simply create a new .pandoc
-file in the correct location and fill it by yourself.
The are submenus (shown in the left sidebar) for specific sections such as for benchmarks. The submenus consist of groups (e.g. Elliptic) and page entries. Groups are defined in config.toml
:
[[menu.benchmarks]]
name = "Elliptic"
identifier = "elliptic"
weight = 1
To add your page to a group as an entry add the following frontmatter:
weight = 101
[menu]
[menu.benchmarks]
parent = "elliptic"
weight
specifies the order of groups and pages in ascending order (top -> down).
We use Pandoc Markdown for the actual content.
It is an enhanced version of the original Markdown. Please consult both guides!
Use regular Markdown syntax:

The path to the image can be absolute (by preceding with /
) or relative. The relative path starts at your current URL. If your image is in the same directory as your .pandoc
-file you have to prefix your path with ../
as in the example above.
See the Pandoc Help for more options on e.g. image size and captions.
CURRENTLY DISABLED!
Use shortcode vis
:
{{< vis path="Elliptic/square_1x1_GroundWaterFlow/square_1e2_pcs_0_ts_1_t_1.000000.vtu" [height="300"] >}}
path
is relative to ogs/web/static/vis/
and points to a converted data set, see below.
Optional parameters:
height
- In px
You can convert VTK output files to vtk.js format with:
npm run convert -- -e -i vtk-file.vtu -o output/path
Run npm run convert
to get a list of possible arguments.
Equations can be set with typical LaTeX syntax by using MathJax. Blocks are defined by $$
at the beginning and $$
at the end of the block. Inline math uses one $
as the delimiter. For more usage instructions see the MathJax LaTeX help.
Files belonging directly to a page (e.g. images shown on that same page) should be added directly (they are stored by git lfs). Other stuff such as linked PDF files, book chapter input files should be uploaded elsewhere and linked to. You can ask @bilke to host these files for you (on Azure cloud storage).
Bibliography items from Documentation/bibliography.bib can be referenced by their id with the bib
-shortcode:
{{< bib id="Kolditz2012" >}}
The bib-file has to be converted into a json-file with the pandoc-citeproc-tool:
[cd to ogs/web]
pandoc-citeproc --bib2json ../Documentation/bibliography.bib > data/bibliography.json
This json-file is then used by the shortcode.
- Install Yarn; for downloading required JavaScript & CSS development packages
- Install ParaView; for converting VTK output files to vtk.js-format for interactive web visualization, check if
pvpython
is either in thePATH
or ParaView is installed in/Applications/
on macOS or/usr/local/opt/paraview
on Linux. CURRENTLY DISABLED!
- Inside the source-directory
ogs/web
:- Install packages with
yarn
- Re-run CMake and build the
ctest
-target, OPTIONAL for benchmark visualizations
- Re-run CMake and build the
- Run
npm run build
to build the site which is created inpublic/
- Install packages with
ALGOLIA_WRITE_KEY=XXX node_modules/.bin/hugo-algolia --toml -s
- Hugo - Web site generator
- Tailwind - CSS framework
- vtk.js - 3D Visualizations, CURRENTLY DISABLED!
- FontAwesome - Icons, see icon search
- Slick Carousel & FancyBox for image galleries
- Algolia for site search
npm install -g @hashicorp/broken-links-checker
hugo
broken-links-checker --path ./public --baseUrl https://www.opengeosys.org