Header

Last Update: 12.07.2023

Locations

MkDocs is installed on the VM gdc-linux.ethz.ch (RHEL Server 7.9).

URL: http://gdc-docs.ethz.ch/<NAME>/site/

MkDocs (version 1.4.3)

source /usr/local/miniconda2/bin/activate mkdocs23
mkdocs -V # Version

MkDocs (version 1.1.2)

source /usr/local/miniconda2/bin/activate mkdocs20
mkdocs -V # Version

MkDocs (version 1.0.4)

source /usr/local/miniconda2/bin/activate mkdocs
mkdocs -h # help

Build Page

Location: /var/www/html/<course>

## Source Environment
source /usr/local/miniconda/bin/activate mkdocs
## Build MkDocs
mkdocs -v build

alias: sm23 (old: sm20, sm)

Minimal Project Folders

-docs    markdown documents
-site    site after build
-images  images for documents - [<name>](images/<name>.png)

Tips and Tricks

Solution pulldown with code:

<details><summary>Suggestion</summary>
<p>
 <pre><code>
  echo "=== Safe My History ===" >  MyHistory.txt
  echo "${USER}"                 >> MyHistory.txt
  echo "-----------------------" >> MyHistory.txt
  history | tail -n 20           >> MyHistory.txt
  echo "-----------------------" >> MyHistory.txt
  date "+%A, %d.%B %Y"           >> MyHistory.txt
  clear; cat Chapter8.txt
 </code></pre>
</p>
</details>

Image captions:

<figure markdown>
  ![Image title](https://dummyimage.com/600x400/){ width="300" }
  <figcaption>Image caption</figcaption>
</figure>

Flowcharts (mermaid):

graph LR
  A[Start] --> B{Error?};
  B -->|Yes| C[Hmm...];
  C --> D[Debug];
  D --> B;
  B ---->|No| E[Yay!];

Sub- and superscripts:

H~2~O N^E^

Keyboard keys:

++ctrl+alt+del++

Settings

All settings are stored in mkdocs.yml

Settings-Template for Version 1.4.3

# Project information
site_name: 'Genetic Diversity Centre (GDC) - Course Webpage'
site_description: 'Support Site'
site_author: 'Jean-Claude Walser / Niklaus Zemp'
site_url: 'https://www.gdc-docs.ethz.ch/GeneticDiversityAnalysis/GDA/site'

# Documentation layout
nav:
  - 'Start': 'index.md'
  - 'Requirements': 'requirements.md'
  - 'Linux 1 - Local Terminal': 'local_terminal.md'
  - 'Linux 2 - Remote Terminal': 'ssh.md'
  - 'Biocomputing': 'biocomputing.md'
  - 'Biocomputing with R': 'biocomputing_R.md'
  - 'Reproducible Research': 'reproduciable_research.md'
  - 'MPS (NGS)': 'mps.md'
  - 'Quality Control (QC)': 'qc.md'
  -  'Quality Filtering (QF)': 'qf.md'
  - 'Alignments': 'alignments.md'
  - 'RNA-Seq': 'rnaseq.md'
  - 'SNPs': 'snps.md'
  - 'RADseq': 'radseq.md'
  - 'AmpSeq': 'ampseq.md'
  - 'Paper Discussion': 'litclub.md'
  - 'Project': 'project.md'
  - 'Acknowledgement': 'acknowledgement.md'

# Copyright
copyright: 'Copyright &copy; 2023 JCW/NZ/GHN'

# Configuration
theme:
  name: material
  highlightjs: true
  features:
    - navigation.sections
    - navigation.expand
    - header.autohide
  palette:
    primary: teal
    accent: teal
  font:
    text: Roboto
    code: Roboto Mono
  language: en
  icon:
    logo: material/library

plugins:
  - search

markdown_extensions:
  - tables
  - attr_list
  - md_in_html
  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji
      emoji_generator: !!python/name:materialx.emoji.to_svg
  - admonition
  - pymdownx.details        # Creates Collapsible Elementsi
  - pymdownx.critic         # Critic Markup (text highlighting)
  - pymdownx.caret          # Underline (^^inserted^^ / A^T^A simple text highlighting)
  - pymdownx.mark           # Marker (==marked== simple text highlighting)
  - pymdownx.tilde          # Strike Through (~~deleted~~ H~2~0 simple text highlighting)
  - pymdownx.keys           # ++ctrl++ ++ctrl+c++
  - pymdownx.betterem       # Emphasis (bold and italic)
  - pymdownx.highlight      # Code highlighting
  - pymdownx.superfences:   # Features
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_code_format
  - pymdownx.arithmatex     # LaTeX math equations
  - pymdownx.emoji          # Emoji extension
  - pymdownx.escapeall      # Escape everything
  - pymdownx.smartsymbols   # Creating special characters
  - pymdownx.tasklist:      # Task list
      custom_checkbox: True
      clickable_checkbox: True

extra_javascript:
  - js/extra.js
  - https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML
  - mathjaxhelper.js

Settings-Template for Version 1.1.2

# Project information
site_name: 'GDC Help for Docs'
site_description: 'Docs-Site'
site_author: 'Jean-Claude Walser'
site_url: 'https://www.gdc-docs.ethz.ch/Projects/pTEST/site/'

# Documentation layout
nav:
  - 'Index': 'index.md'
  - 'Start': 'start.md'

# Copyright
copyright: 'Copyright &copy; 2021 GDC'

# Configuration
theme:
  name: material
  highlightjs: true
  features:
    #- search.highlight
    #- search.suggest
    - navigation.sections
    - navigation.expand
    #- toc.integrate
    #- navigation.instant
    #- navigation.tabs
    - header.autohide
  palette:
    primary: pink
    accent: cyan
  font:
    text: Roboto
    code: Roboto Mono
  language: en
  icon:
    logo: material/help
    #https://material.io/resources/icons/?style=baseline

plugins:
  - search
  #- mermaid2:
  #    arguments:
  #      securityLevel: 'loose'
  #      theme: dark
  #- markdownmermaid
  #- search:
  #    prebuild_index: true

markdown_extensions:
  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji
      emoji_generator: !!python/name:materialx.emoji.to_svg
  - admonition
  # pymdownx: https://facelessuser.github.io/pymdown-extensions/extensions
  - pymdownx.details        # Creates Collapsible Elements
  - pymdownx.caret          # Superscript
  - pymdownx.tilde          # Tilde extension
  - pymdownx.betterem       # Emphasis (bold and italic)
  - pymdownx.mark           # Marker
  - pymdownx.highlight      # Code highlighting
  - pymdownx.superfences    # Features
  ## mermaid2 settings:
  #- pymdownx.highlight     # Code highlighting
  #- pymdownx.superfences:   # Features
    # make exceptions to highlighting of code:
    #  custom_fences:
    #    - name: mermaid
    #      class: mermaid
    #      format: !!python/name:mermaid2.fence_mermaid_custom
  - pymdownx.critic         # Critic Markup
  - pymdownx.arithmatex     # LaTeX math equations
  - pymdownx.emoji          # Emoji extension
  - pymdownx.escapeall      # Escape everything
  - pymdownx.smartsymbols   # Creating special characters
  - pymdownx.tasklist:      # Task list
      custom_checkbox: True
      clickable_checkbox: True

extra_javascript:
  #- https://unpkg.com/mermaid/dist/mermaid.min.js
  - js/extra.js

Settings-Template for Version 1.0.4

# Documentation layout
nav:
  - 'Welcome'. : 'index.md'
  - 'Chapter 1': 'Chapter01.md'
  - 'Chapter 2': 'Chapter02.md'
  - 'Chapter 3': 'Chapter03.md'
# Copyright
copyright: 'Copyright &copy; 2019 GDC'

# Configuration
theme:
  name: 'material'
  palette:
    primary: 'cyan'
    accent: 'lime'
  font:
    text: 'Roboto'
    code: 'Roboto Mono'
  language: 'en'
  logo:
    icon: 'explicit'
  feature:
    tabs: false

# Extensions
markdown_extensions:
  - admonition
  - codehilite:
      guess_lang: false
  - toc:
      permalink: true
  - pymdownx.betterem:
      smart_enable: all
  - pymdownx.caret
  - pymdownx.critic
  - pymdownx.details
  - pymdownx.arithmatex
  - pymdownx.emoji:
      emoji_generator: !!python/name:pymdownx.emoji.to_svg
  - pymdownx.smartsymbols
  - pymdownx.tasklist:
      custom_checkbox: true
  - pymdownx.tilde
extra_javascript:
  - 'javascripts/extra.js'
  - 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'

Online Help