MKDocs Material Theme

From Knowledge Center
Revision as of 12:18, 26 March 2019 by Ruan (talk | contribs) (Created page with "mkdocs with material theme requirements.txt <pre> backports-abc==0.5 Click==7.0 futures==3.2.0 Jinja2==2.10 lektor-markdown-admonition==0.3.1 livereload==2.6.0 Markdown==3.0...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

mkdocs with material theme

requirements.txt

backports-abc==0.5
Click==7.0
futures==3.2.0
Jinja2==2.10
lektor-markdown-admonition==0.3.1
livereload==2.6.0
Markdown==3.0.1
MarkupSafe==1.1.0
mkdocs==1.0.4
mkdocs-material==4.0.1
Pygments==2.3.1
pymdown-extensions==6.0
PyYAML==3.13
singledispatch==3.4.0.3
six==1.12.0
tornado==5.1.1

Install requirements:

$ pip install -r requirements.txt
<pre>

Generate a new site:

<pre>
$ mkdocs new docs

Add a couple of plugins and configure your site:

$ cat mkdocs.yml

Create first doc:

$ mkdir docs/java
$ vim docs/java/build-a-rest-api-war-file-for-payara-with-java-springboot-and-maven-part-1.markdown

title: Build a REST API with Payara and Springboot
description: This is a springboot howto
authors:
    - Ruan Bekker
categories: ["raspberrypi", "docker", "swarm", "glusterfs", "storage"]

![](https://objects.ruanbekker.com/assets/images/payara-logo.png)

This is a ==command line approach== to create a java web app for payara that takes war files, which we will be using in conjunction with springboot and apache maven.

!!! 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.

Oh yes:

??? optional-class "Summary"
    Here's some content.

| First Header | Second Header | Third Header |
| ------------ | ------------- | ------------ |
| Content Cell | Content Cell  | Content Cell |
| Content Cell | Content Cell  | Content Cell |

## Setup Java and Apache Maven:

Setup Java 1.8:

``` bash
$ apt update
$ apt install wget openssl vim software-properties-common -y
$ add-apt-repository ppa:webupd8team/java -y
$ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C2518248EEA14886
$ apt update && apt install oracle-java8-installer -y
```
...

Serve the site:

$ mkdocs serve

Serve with Docker:

$ docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material

Screenshot:

<img width="1259" alt="image" src="https://user-images.githubusercontent.com/567298/55014316-6ca65c80-4ff3-11e9-92c2-871d411b6603.png">

Read More: