Skip to content

Commit b531dd2

Browse files
committed
update to mkdocs yaml
1 parent c735f81 commit b531dd2

4 files changed

Lines changed: 129 additions & 20 deletions

File tree

docs/markdown_notes.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: Markdown notes
3+
description: Notes on implementation of markdown in mkdocs-material
4+
5+
---
6+
7+
PyMdown Extensions
8+
https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/
9+
10+
Add some recommended extensions:
11+
``` yaml linenums="1" hl_lines="3-6 8"
12+
site_name: Tech & Programming Notes
13+
14+
theme:
15+
name: material
16+
palette:
17+
# Palette toggle for light mode
18+
- scheme: default
19+
primary: deep orange
20+
toggle:
21+
icon: material/brightness-7
22+
name: Switch to dark mode
23+
24+
# Palette toggle for dark mode
25+
- scheme: slate
26+
primary: deep orange
27+
toggle:
28+
icon: material/brightness-4
29+
name: Switch to light mode
30+
31+
plugins:
32+
- search
33+
- git-revision-date-localized
34+
35+
markdown_extensions:
36+
# Python Markdown
37+
- abbr
38+
- admonition
39+
- attr_list
40+
- def_list
41+
- footnotes
42+
- meta
43+
- md_in_html
44+
- toc:
45+
permalink: true
46+
47+
# Python Markdown Extensions
48+
- pymdownx.arithmatex:
49+
generic: true
50+
- pymdownx.betterem:
51+
smart_enable: all
52+
- pymdownx.caret
53+
- pymdownx.details
54+
- pymdownx.emoji:
55+
emoji_index: !!python/name:materialx.emoji.twemoji
56+
emoji_generator: !!python/name:materialx.emoji.to_svg
57+
- pymdownx.highlight:
58+
anchor_linenums: true
59+
- pymdownx.inlinehilite
60+
- pymdownx.keys
61+
- pymdownx.mark
62+
- pymdownx.smartsymbols
63+
- pymdownx.snippets
64+
- pymdownx.superfences
65+
- pymdownx.tabbed:
66+
alternate_style: true
67+
- pymdownx.tasklist:
68+
custom_checkbox: true
69+
- pymdownx.tilde
70+
```
71+
72+
List of markdown options
73+
https://squidfunk.github.io/mkdocs-material/reference/
74+
75+
To highlight codeblocks, enclose them in triple backwards quotes and also use https://pygments.org/docs/lexers/ to give the language at the start and add `linenums="1"` if you want to add line numbers:
76+
```` markdown
77+
``` bash linenums="1"
78+
cd newdir
79+
```
80+
````
81+
82+
First Header | Second Header
83+
------------- | -------------
84+
Content Cell | Content Cell
85+
Content Cell | Content Cell

docs/server_setup.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Open new tab and check can still login OK before closing this connection!
4848
`sudo apt-get install ufw`
4949

5050
Enable at boot time and immediately start uncomplicated firewall service
51-
```
51+
``` bash
5252
sudo systemctl enable ufw --now
5353
sudo ufw allow ssh
5454
sudo ufw allow 'WWW Full'
@@ -98,7 +98,7 @@ https://bashrcgenerator.com/ - excellent generator
9898

9999
### Install git and connect to Github
100100
`sudo apt install git -y`
101-
```
101+
``` bash
102102
cd ~
103103
mkdir repositories
104104
cd .ssh
@@ -134,7 +134,7 @@ See https://docs.docker.com/engine/install/debian/
134134
To enable non-root access to the Docker daemon run `sudo usermod -aG docker <username>` - then logout and back in
135135

136136
Create Portainer volume and then start Docker container, but for security bind port only to localhost, so that it cannot be access except when an SSH tunnel is active.
137-
```
137+
``` bash
138138
docker volume create portainer_data
139139
docker run -d -p 127.0.0.1:8000:8000 -p 127.0.0.1:9000:9000 \
140140
--name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock \
@@ -143,7 +143,7 @@ docker run -d -p 127.0.0.1:8000:8000 -p 127.0.0.1:9000:9000 \
143143
Possible route to use Wireguard https://www.portainer.io/blog/how-to-run-portainer-behind-a-wireguard-vpn
144144

145145
SSH tunnel - example SSH connection string
146-
```
146+
``` bash
147147
ssh -L 9000:127.0.0.1:9000 <user>@<server FQDN> -i <PATH TO PRIVATE KEY>
148148
```
149149
Then connect using http://localhost:9000
@@ -164,7 +164,7 @@ docker run --detach \
164164

165165
## NGINX Proxy Manager install
166166
Docker compose file from https://nginxproxymanager.com/setup/#running-the-app
167-
```
167+
``` docker
168168
version: "3"
169169
services:
170170
app:
@@ -436,7 +436,13 @@ Copy across trigger script.
436436

437437
## mkdocs-material live setup
438438
See triggerscript for main live setup, however for testing changes live, setup a persistent container serving mkdocs-material
439+
Build an image that includes the git revision date plugin
440+
``` docker
441+
FROM squidfunk/mkdocs-material
442+
RUN pip install mkdocs-git-revision-date-localized-plugin
439443
```
444+
445+
``` docker
440446
version: "3"
441447
services:
442448
mkdocs-live:

docs/vscode_notes.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@ draft: false
55
---
66
## Paste Image plugin
77
Install extension:
8-
>Name: Paste Image
9-
10-
>Id: mushan.vscode-paste-image
11-
12-
>Description: paste image from clipboard directly
13-
14-
>Version: 1.0.4
15-
16-
>Publisher: mushan
17-
18-
>VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=mushan.vscode-paste-image
8+
Name: Paste Image
9+
Id: mushan.vscode-paste-image
10+
Description: paste image from clipboard directly
11+
Version: 1.0.4
12+
Publisher: mushan
13+
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=mushan.vscode-paste-image
1914

2015
Set `Paste Image: path` to `images` so they go into a subdirectory:
2116
![](images/2022-07-09-18-34-46.png)
@@ -25,4 +20,5 @@ Set `Paste Image: path` to `images` so they go into a subdirectory:
2520
??? danger "Nested details!"
2621
And more content again.
2722

28-
Use Ctrl-Alt-V to paste.
23+
!!! info "Usage"
24+
Use Ctrl-Alt-V to paste.

mkdocs.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
11
site_name: Tech & Programming Notes
22

3-
markdown_extensions:
3+
theme:
4+
name: material
5+
palette:
6+
# Palette toggle for light mode
7+
- scheme: default
8+
primary: deep orange
9+
toggle:
10+
icon: material/brightness-7
11+
name: Switch to dark mode
12+
13+
# Palette toggle for dark mode
14+
- scheme: slate
15+
primary: deep orange
16+
toggle:
17+
icon: material/brightness-4
18+
name: Switch to light mode
419

20+
plugins:
21+
- search
22+
- git-revision-date-localized
23+
24+
markdown_extensions:
525
# Python Markdown
626
- abbr
727
- admonition
@@ -23,14 +43,16 @@ markdown_extensions:
2343
- pymdownx.emoji:
2444
emoji_index: !!python/name:materialx.emoji.twemoji
2545
emoji_generator: !!python/name:materialx.emoji.to_svg
26-
- pymdownx.highlight
46+
- pymdownx.highlight:
47+
anchor_linenums: true
2748
- pymdownx.inlinehilite
2849
- pymdownx.keys
2950
- pymdownx.mark
3051
- pymdownx.smartsymbols
52+
- pymdownx.snippets
3153
- pymdownx.superfences
3254
- pymdownx.tabbed:
3355
alternate_style: true
3456
- pymdownx.tasklist:
3557
custom_checkbox: true
36-
- pymdownx.tilde
58+
- pymdownx.tilde

0 commit comments

Comments
 (0)