Merge pull request #17 from helios-4/mkdocs-upgrade

Update conf for mkdocs 1.0 and add revision date to pages
This commit is contained in:
Gauthier Provost 2019-07-17 15:42:13 +08:00 committed by GitHub
commit bfb7bd0080
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 7 deletions

View file

@ -13,13 +13,13 @@ Lightgallery : https://github.com/g-provost/lightgallery-markdown
1. Install mkdocs 1. Install mkdocs
```bash ```bash
$ pip install mkdocs $ pip3 install mkdocs
``` ```
2. Install Material Template 2. Install Material Template
```bash ```bash
$ pip install mkdocs-material $ pip3 install mkdocs-material
``` ```
3. Install Lightgallery Extension 3. Install Lightgallery Extension
@ -29,10 +29,16 @@ $ git clone https://github.com/g-provost/lightgallery-markdown.git
$ cd lightgallery-markdown $ cd lightgallery-markdown
$ python setup.py install $ python3 setup.py install
``` ```
4. Download and serve wiki 4. Install git-revision plugin
```bash
pip3 install mkdocs-git-revision-date-plugin
```
5. Download and serve wiki
```bash ```bash
$ git clone https://github.com/helios-4/wiki.git $ git clone https://github.com/helios-4/wiki.git

View file

@ -142,6 +142,10 @@ Since Helios4 Batch 3 we added to the Kit an OLED Display kit containing
> **Install the standoffs on the board plate using the 5mm long screws.** > **Install the standoffs on the board plate using the 5mm long screws.**
!!! note
Make sure you are using the 5mm long screws and not the 4mm ones which look similar but a bit shorter.
![Kit Assembly](/img/kit/assembly_pic27.jpg) ![Kit Assembly](/img/kit/assembly_pic27.jpg)
![Kit Assembly](/img/kit/assembly_pic28.jpg) ![Kit Assembly](/img/kit/assembly_pic28.jpg)

View file

@ -48,15 +48,22 @@ google_analytics:
- 'UA-96982596-2' - 'UA-96982596-2'
- 'auto' - 'auto'
# Plugins
plugins:
- search
- git-revision-date
# Extensions # Extensions
markdown_extensions: markdown_extensions:
- admonition - admonition
- codehilite(guess_lang=false) - codehilite:
- toc(permalink=true) guess_lang: False
- toc:
permalink: True
- lightgallery - lightgallery
# Page naming # Page naming
pages: nav:
- Introduction: 'index.md' - Introduction: 'index.md'
- Kit Assembly: 'kit.md' - Kit Assembly: 'kit.md'
- Download: 'download.md' - Download: 'download.md'

View file

@ -19,3 +19,10 @@
} }
</script> </script>
{% endblock scripts %} {% endblock scripts %}
{% block content %}
{{ super() }}
{% if page.meta.revision_date %}
<small><i>Updated on {{ page.meta.revision_date }}</i></small>
{% endif %}
{% endblock %}