Maintain this documentation
Contact/responsible: Marton Ady
This documentation is written using MKDocs, a static content generator which converts Markdown (.md) documents into html pages. In its CERN integration, the entire site's files are hosted on a Gitlab repo, and when a change (commit) happens, the public site is rebuilt and updated with using Gitlab automation.
All content, except the "blog" part, is static.
The blog section shows posts in the docs/blog
folder in the order of Git commits using the MKDocs Blogging Plugin.
Markdown syntax
Gitlab repo
All files of this website are hosted in this repository, clone it to have a local copy.
CERN MKDocs (internal)
Helps to create your own MKDocs-based website hosted at CERN, with the above setup (Gitlab repo published by Openshift).
Material for MKDocs
The MKDocs theme used for this website, supported by the CERN Openshift deployment.
MKDocs project
Official website of the MKDocs project powering this documentation.
To have a real-time local render of this documentation
You can display the documentation in your browser locally, without having to push commits and wait until they get published. Useful for "real-time" editing.
-
Clone the repository to a local folder:
git clone https://gitlab.cern.ch/molflow_synrad/docs
-
Install python3, if you haven't already
- Windows:
- Get Chocolatey package manager
- In command line or PowerShell, run
choco install python
(Python3 is already the default version)
- Mac:
- Get HomeBrew package manager
- In Terminal run
brew install python
- Linux:
- Debian: run
sudo apt install python3
- Debian: run
- Windows:
-
Install Pip (Python package manager), if you haven't (through brew, apt or choco)
-
Install mkdocs (through brew, apt or choco)
-
Install the Material module:
-
Windows:
pip install mkdocs-material
-
Mac:
python3 -m pip install mkdocs-material
-
Install plugins in the
requirements.txt
file (direct link) with Pip, for examplepip install mkdocs-git-revision-date-localized-plugin
-
For the blog engine, you have to install a plugin, usage and demo site at https://github.com/liang2kl/mkdocs-blogging-plugin.
For this site, the install procedure was:
- Run default install command as administrator:
pip install mkdocs-blogging-plugin
- Edit
mkdocs.yml
:- Add site url in the file's header:
site_url: https://molflow.docs.cern.ch/
- Refer to the plugin:
plugins: - blogging: dirs: # The directories to be included - blog
- Add site url in the file's header:
- For CERN Gitlab Pages deployment, add the plugin
mkdocs-blogging-plugin
torequirements.txt
as a new line - You can then create
.md
notes in thedocs/blog
subfolder, which will be sorted by Git commit date
- Run default install command as administrator:
-
Run
mkdocs serve
-
Open your browser at the address indicated by
mkdocs serve
, by defaulthttp://127.0.0.1:8000/
Render tests
Latex expression:
\(\frac{1}{\sin(x)}\)
Admonitions
Info
an info bubble
with code inline
Emojis
- Material design:
- FontAwesome:
- Octicons:
Full searchable list: https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/