Go to the page and click "Edit". The "View wiki markup" option removes whitespace.
Paste that into your favourite text editor.
{{var something = "fish";}}
becomes
`something`
{code}
var something = "fish";
var cheese = "monkey";
{code}
becomes
```
var something = "fish";
var cheese = "monkey";
```
or (indent each line four spaces)
var something = "fish";
var cheese = "monkey";
Convert header tags to headers prefixed with # where the number of #'s should be the same as the header level e.g.
h1. Fish
becomes
# Fish
and
h4. Monkey
becomes
#### Monkey
Markdown lists are the same for single level lists e.g.
* item 1
* item 2
* item ...
However, they differ when creating nested lists. The solution is to replace the number of asterisks (s) with (s * 2) - 2
spaces, then the asterisk and another space before the content e.g.
* top
** level 2
*** level 3
**** level 4
***** level 5
* top
* level 2 (2 spaces)
* level 3 (4 spaces)
* level 4 (6 spaces)
* level 5 (8 spaces)
You get the idea, right?
Unfortunately github doesn't presently have a great solution for this. However, since github wikis are just repos you can add images to the repo and then reference them.
The git URL for the wiki for your repo is very similar to the one for your actual repo. In fact, it just has a .wiki
before the trailing .git
e.g.
git@github.com:BladeRunnerJS/brjs.git
becomes
git@github.com:BladeRunnerJS/brjs.wiki.git
So, you can clone the wiki repo as normal:
git clone git@github.com:BladeRunnerJS/brjs.wiki.git
cd brjs.wiki
And then add any images you want e.g.
mkdir img
cp path/to/some/images/* img/
Then add, commit and push
git add img
git commit -m 'some commit message'
git push origin master
You can now reference the images via the relative path from the wiki document you are editing e.g. if I were editing the standard Home.md
I could now reference an image named example.png
in the new img
directory as follows:
# Wiki Home Page
[[img/example.png]]