Skip to content

Commit 923d642

Browse files
authored
Update clean-wiki.sh
1 parent 906d667 commit 923d642

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

clean-wiki.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
# We dont want relative links or header 1 from the wiki
1+
2+
# Sum of all wiki - worst solution ever...
3+
rm ./docs/wiki/_Footer.md
4+
rm ./docs/wiki/_Sidebar.md
5+
find ./docs/wiki -type f -exec cat > ./docs/wiki/_.md {} ';'
26

37
# Move headers to +1 depth
48
find ./docs/wiki -type f -exec sed -i 's/^#/##/g' {} ';'
59

10+
11+
# We dont want relative links or header 1 from the wiki
612
# Links formatted like (Nice link)[link]
713
find ./docs/wiki -type f -exec sed -i 's/\)\[(?!http)(([^\]]+))\]/\)\[/search\.html\?q=\1\]/g' {} ';'
8-
914
# Links formatted like [[pagename]]
1015
find ./docs/wiki -type f -exec sed -i 's/\[\[([^\]]+)\]\]/\(\1\)\[/search\.html\?q=\1\]/g' {} ';'
1116

0 commit comments

Comments
 (0)