Skip to content

3.Mkdocs

Mkdocs

MkDocs is a fast, simple and downright gorgeous static site generator that’s geared towards building project documentation. Documentation source files are written in Markdown, and configured with a single YAML configuration file.

Writing your docs

(How to layout and write your Markdown source files.)

Your documentation source should be written as regular Markdown files (see Writing with Markdown below), and placed in the documentation directory. By default, this directory will be named docs and will exist at the top level of your project, alongside the mkdocs.yml configuration file.

The simplest project you can create will look something like this:

mkdocs.yml
docs/
    index.md

By convention your project homepage should always be named index. Any of the following extensions may be used for your Markdown source files: markdown, mdown, mkdn, mkd, md. All Markdown files included in your documentation directory will be rendered in the built site regardless of any settings.

[Read More...](https://www.mkdocs.org/user-guide/writing-your-docs/)

CSS

Image hover on mouse

howto hover an image:

Image met Kop

en wat text eronder! Kan ook een hele lap zijn. Best wel mooi. Maar dan moet het wel een beter image zijn dan dat ding dat we nu hebben. En kan die ook hoveren? Ik betwijvel het…

img {
    max-width: 70%;
    display: block;
}

.thumbnail {
        position: absolute;
    top: 50%;
    left: 50%;

    width: 320px;
    height: 240px;

    -webkit-transform: translate(-50%,-50%); /* Safari and Chrome */
    -moz-transform: translate(-50%,-50%); /* Firefox */
    -ms-transform: translate(-50%,-50%); /* IE 9 */
    -o-transform: translate(-50%,-50%); /* Opera */
    transform: translate(-50%,-50%);
}
.image {
    width: 100%;
    height: 100%;
}
.image img {
    -webkit-transition: all 1s ease; /* Safari and Chrome */
        -moz-transition: all 1s ease; /* Firefox */
        -o-transition: all 1s ease; /* IE 9 */
        -ms-transition: all 1s ease; /* Opera */
        transition: all 1s ease;
}
.image:hover img {
    -webkit-transform:scale(1.25); /* Safari and Chrome */
    -moz-transform:scale(1.25); /* Firefox */
    -ms-transform:scale(1.25); /* IE 9 */
    -o-transform:scale(1.25); /* Opera */
     transform:scale(1.25);
}

markdown=”1”

There is no concept of a <div> in Markdown syntax (or most other structural HTML elements), except that Markdown supports HTML so you can just use a <div> if you want to. But as soon as you do, nothing nested inside of it can be Markdown.

Except it can! In many (most?) varietals of Markdown, you can put <div markdown="1"> on the element and it will allow Markdown inside of it.

<div class="image" markdown="1">
![](./images/img-css_hover.jpg)
</div>

Markdown Tables

As the official Markdown documentation states, Markdown does not provide any special syntax for tables. Instead it uses HTML <table> syntax. But there exist Markdown syntax extensions which provide additional syntax for creating simple tables.

Markdown Tables Generator

Admonition blocks …

…follow a simple syntax: every block is started with !!!, followed by a single keyword which is used as the type qualifier of the block. The content of the block then follows on the next line, indented by four spaces.

See: https://squidfunk.github.io/mkdocs-material/extensions/admonition/#installation

Note

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Phasellus posuere in sem ut cursus

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Abstract

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Info

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Todo

Loremm ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Tip

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Hint

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Success

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Question

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Warning

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Failure

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Error

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Bug

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Example

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Quote

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

footnote

Lorem ipsum1 dolor sit amet, consectetur adipiscing elit.2

PyMdown Extensions

PyMdown Extensions is a collection of Markdown extensions that add some great features to the standard Markdown library. For this reason, the installation of this package is highly recommended as it’s well-integrated with the Material theme.

$$ \frac{n!}{k!(n-k)!} = \binom{n}{k} $$

Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$

Syntax

Details must contain a blank line before they start. Use ??? to start a details block or ???+ if you want to start a details block whose default state is ‘open’. Follow the start of the block with an optional class or classes (separated with spaces) and the summary contained in quotes. Content is placed below the header and must be indented.

Summary

Here’s some content.

Summary

Here’s some content.

Tools & Assignment

Group assignment

  • Use the test equipment in your lab to observe the operation of a microcontroller circuit board

Individual assignment

  • Redraw the echo hello-world board, add (at least) a button and LED (with current-limiting resistor), check the design rules, make it, test it.
  • Extra credit: Simulate its operation. Render it.

Learning outcomes

  • Select and use software for circuit board design
  • Demonstrate work-flows used in circuit board design

Have you?

  • Shown your process using words/images/screenshots
  • Explained problems and how you fixed them, including how you worked with design rules for milling (DRC in EagleCad and KiCad)
  • Included original design files (Eagle, KiCad, Inkscape, .cad - whatever)

Arithmatex MathJax

$$ \frac{n!}{k!(n-k)!} = \binom{n}{k} $$

InlineHilite¶

InlineHilite adds support for inline code highlighting. It’s useful for short snippets included within body copy, e.g. var test = 0; and can be achived by prefixing inline code with a shebang and language identifier, e.g. #!js.

Mark highlight

markeerstift als voorbeeld .

code blocks

``` bash tab=”En” Wat gebeurd er als ik hier een gewone text intyp…

``` c tab="Nl"
dit lijkt me wel wat, maar doet ie ook ==inline markdown== ?

#tussenkopje

``` c++ tab=”C++”

include

int main() { std::cout << “Hello world!” << std::endl; return 0; }

``` c# tab="C#"
using System;

class Program {
  static void Main(string[] args) {
    Console.WriteLine("Hello world!");
  }
}

  1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. 

  2. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.