ikiwiki

ikiwiki

Will Thompson

2007-11-22

Background

We had a website...

Screenshot of the old website

Screenshot of the old website

... Andrew didn't approve

Andrew vs. the logo

the old Compsoc logo

the old Compsoc logo

One true font

Adding an event (old-style)

% vi events/termcards/tt2007/wk2.shtml
    <table class="termcard" summary="Layout for event information">
    <tr>
        <th class="eh" colspan="2"> Second Life and IBM </th>
    </tr>
    <tr>
        <td class="ei"> Wednesday 2nd May,<br/> 20:30 </td>
        <td class="ei">
            Morley Fletcher Room, Worcester College <br /><a
            href="http://maps.google.co.uk/maps?f=q&hl=en&q=
            OX1+2HB&layer=&ie=UTF8&z=16&om=1&iwloc=addr">Location
            of Worcester</a> - Meet at Porter's Lodge
        </td>
    </tr>

New site requirements

Enter Ikiwiki

Get started

Following http://ikiwiki.info/setup/:

% sudo apt-get install ikiwiki apache2
% SRCDIR=/home/share/wiki/wc
% DESTDIR=/home/share/wiki/html
  ... map some URL to $DESTDIR ...
% mkdir $SRCDIR; cd $SRCDIR
% cat > index.mdwn
I like [lolcats][] and [ikiwiki][].

---

We has a [[sandbox]]!

[lolcats]: http://linkpot.net/strangles/
[ikiwiki]: http://ikiwiki.info

Compile it...

% ikiwiki --verbose $SRCDIR $DESTDIR \
  --url=http://holly.lan/wiki/ \
  --wikiname='High-Tech Wiki'
woo look a wiki

woo look a wiki

Add a setup file

% cp /usr/share/doc/ikiwiki/html/ikiwiki.setup .ikiwiki/
% vim .ikiwiki/ikiwiki.setup
  ...clackity clackity...
% ikiwiki --setup .ikiwiki/ikiwiki.setup

Web editing

editing

editing

Version control

Create a SVN repo

% REPO=/home/share/wiki/repo
% svnadmin create $REPO
% svn mkdir file://$REPO/trunk -m "create trunk"
% cd $SRCDIR
% svn co file://$REPO/trunk .
% svn add *
% svn commit -m "initial import"
% vim .ikiwiki/ikiwiki.setup
  ... configure svn repo ...
% this is quite boring
% lalala
% why are you reading this?
% you should be listening to me !!!

AND THEN

Now you can check out the repo on your local machine:

% svn co svn+ssh://holly.lan/home/share/wiki/repo/trunk wiki
% cd wiki
 ... edit stuff ...
% svn ci -m "this is a helpful commit message"

and the wiki is magically updated!

Cool things

Instant blog blag:

% cat > blag.mdwn
[[inline pages="blag/*" show="10" postform="yes"]]
% mkdir blag
% vim blag/hello.mdwn
% svn add blag.mdwn blag blag/*; svn ci -m 'lalala'

We use a variant on this for termcards.

Cool things

blag screenshot

blag screenshot

Compsoc-specific

Wrote a plugin for termcards and events and stuff:

% cat termcards/2007/michaelmas/Week 7/Lightning Talks.mdwn
[[event venue="Morley Fletcher Room, Worcester"
    date="2007-11-22 20:00"]]

One room, one projector, and many speakers. Everyone is
invited to give a short talk on something they're
involved in or interested in; don't worry ...
% cat termcards/2007/michaelmas.mdwn
[[term ]]

No more editing HTML tables!

Termcard

termcard

termcard

Compsoccy hiccups

Badness

HTML::Template sucks!

<TMPL_LOOP NAME="TAGS">
    <TMPL_VAR NAME=LINK>
</TMPL_LOOP>

Give me Template Toolkit any day!

[% for tag in tags %]
    [% tag.link %]
[% end %]

More Badness

I'm done now.

Coda: linkpot.net/strangles

Wikipedia lolcat

Wikipedia lolcat

Markdown Digression

Markdown is great.

### this becomes an h3

You can do *italics* and **underline**.

* bulleted list
     - nested lists

1. numbered lists
3. although it ignores numbers other than the first

> email-style quoting makes a blockquote

I actually wrote this presentation in Markdown!

Markdown Digression

this becomes an h3

You can do italics and underline.

email-style quoting makes a blockquote

Pandoc Digression

Pandoc's Markdown

Pandoc supports some extensions to standard Markdown:

~~Strikeout~~  Let's have a footnote[^1].

Term
:    Definition of term.

Inline L~A~T^E^X: $ \alpha \Rarrow \beta $

[^1]: blah blah blah

It also does tables, but why would you do that?!