blob: 0310c17f3e28be3bef8ee6f443cb4218ba9f2b69 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
If the srcdir is a symlink, Ikiwiki will not render the pages unless the srcdir has a trailing slash.
For example:
#!/bin/sh
set -x
REALSRCDIR=~/tmp/ikiwiki/wikiwc2
SRCDIR=~/tmp/ikiwiki/wikiwc
DESTDIR=~/tmp/ikiwiki/public_html/wiki/
echo "*** Testing without trailing slash."
rm -rf $REALSRCDIR $SRCDIR $DESTDIR
# Create the real srcdir and link the srcdir to it
mkdir -p $REALSRCDIR
ln -s $REALSRCDIR $SRCDIR
mkdir -p $DESTDIR
echo Test > $SRCDIR/index.mdwn
# No trailing slash after $SRCDIR
ikiwiki --verbose $SRCDIR $DESTDIR --url=http://example.org/~you/wiki/ --underlaydir /dev/null
echo "*** Testing with trailing slash."
rm -rf $REALSRCDIR $SRCDIR $DESTDIR
# Create the real srcdir and link the srcdir to it
mkdir -p $REALSRCDIR
ln -s $REALSRCDIR $SRCDIR
mkdir -p $DESTDIR
echo Test > $SRCDIR/index.mdwn
# Trailing slash after $SRCDIR
ikiwiki --verbose $SRCDIR/ $DESTDIR --url=http://example.org/~you/wiki/ --underlaydir /dev/null
My output:
+ REALSRCDIR=/home/svend/tmp/ikiwiki/wikiwc2
+ SRCDIR=/home/svend/tmp/ikiwiki/wikiwc
+ DESTDIR=/home/svend/tmp/ikiwiki/public_html/wiki/
+ echo '*** Testing without trailing slash.'
*** Testing without trailing slash.
+ rm -rf /home/svend/tmp/ikiwiki/wikiwc2 /home/svend/tmp/ikiwiki/wikiwc /home/svend/tmp/ikiwiki/public_html/wiki/
+ mkdir -p /home/svend/tmp/ikiwiki/wikiwc2
+ ln -s /home/svend/tmp/ikiwiki/wikiwc2 /home/svend/tmp/ikiwiki/wikiwc
+ mkdir -p /home/svend/tmp/ikiwiki/public_html/wiki/
+ echo Test
+ ikiwiki --verbose /home/svend/tmp/ikiwiki/wikiwc /home/svend/tmp/ikiwiki/public_html/wiki/ --url=http://example.org/~you/wiki/ --underlaydir /dev/null
+ echo '*** Testing with trailing slash.'
*** Testing with trailing slash.
+ rm -rf /home/svend/tmp/ikiwiki/wikiwc2 /home/svend/tmp/ikiwiki/wikiwc /home/svend/tmp/ikiwiki/public_html/wiki/
+ mkdir -p /home/svend/tmp/ikiwiki/wikiwc2
+ ln -s /home/svend/tmp/ikiwiki/wikiwc2 /home/svend/tmp/ikiwiki/wikiwc
+ mkdir -p /home/svend/tmp/ikiwiki/public_html/wiki/
+ echo Test
+ ikiwiki --verbose /home/svend/tmp/ikiwiki/wikiwc/ /home/svend/tmp/ikiwiki/public_html/wiki/ --url=http://example.org/~you/wiki/ --underlaydir /dev/null
scanning index.mdwn
rendering index.mdwn
Note that index.mdwn was only rendered when srcdir had a trailing slash.
|