MKDocs Tips n Tricks¶
Deployment¶
If you have a heavy website, it helps to just reload what you have edited. The reason I do this is because markdown doesn't support pymdown
formats so it's difficult to see what you're actually doing if you want fancy formats. So use the following command to only reload the page you are currently editing.
mkdocs serve --dirtyreload
Todo
I want to see if this works on a remote server. In theory, I should be able to run the following command:
mkdocs serve --dirtyreload --dev-addr 3009
Then I would be able to ssh into the server:
ssh erc -L 3009:localhost:3009
Or I could use the built-in tunneling with VSCode.
Extensions¶
Admonition¶
This is great, it allows me to add little blocks of things I find interesting.
- Note
- with title
!!! note "Title"
- without title
!!! note ""
Collapsible
!!!
- open by default???
- collapsible
Defaults¶
Note Button
Can use note
or seealso
Abstract Button
Can use abstract,summary,tldr
Info Button
Can use info,todo
Fire Button
tip,hint,important
Checkmark Button
success, check, done
Question Mark
question,help,faq
Warning Sign
warning,caution,attention
X Mark
failure,fail,missing
Danger sign
danger, error
Bug sign
bug
Numbered List
bug
Quotation Marks
quote, cite
What Now?¶
Question
How does this work if I want to design my own symbol?
Todo
Design my own symbol and add it to the research notebook!
CodeHilite¶
Very simple, we have codeblocks with highlights. Using Python:
import numpy as np
and using Bash:
echo "Times are changing"
Colocate Different bits of Code¶
I can also collapse them!
import tensorflow as tf
import torch
Line Numbers¶
We can also enable line numbers with the linenums: true
extension.
import numpy as np
import matplotlib.pyplot as plt
Highlight Line Numbers¶
import numpy as np
import matplotlib.pyplot as plt
from scipy import * # Don't do this!!
Meta Data¶
---
title: PyTest Tricks
description: The deep learning python stack
authors:
- J. Emmanuel Johnson
path: docs/snippets/testing
source: pytest.md
---