summaryrefslogtreecommitdiff
path: root/render_locally
blob: 47146656588fa3b1e06fda6be70a9dda13124068 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

# Render the pages of this repository for your local browsing pleasure.

# We use ``--no-usedirs'' here, because when browsing local files, the web
# browsers don't display `index.html' files by default when a hyperlink
# referencing a directory is being opened.

# Written by Thomas Schwinge <tschwinge@gnu.org>


src=$(dirname "$0") &&
# Invoking ikiwiki with ``src=.'' will make it render `.git/' as well.
if [ "$src" = . ]
then src=$(pwd)
else :
fi &&
dest=$src.rendered &&

ikiwiki \
  --verbose \
  --wikiname GNU\ Hurd\ wiki \
  --userdir user \
  --no-usedirs \
  "$src" "$dest" &&

echo &&
echo Now\ open\ \`"$dest"/index.html\'' to browse the wiki pages.'