Alternative view: by date.

Some time ago, the box on which my blog is hosted went dramatically down, and I had to restore the blog by populating the git repository again, from my local copy.

Unfortunately, that means that the wiki had to be rebuilt from scratch, and all creation dates were messed up, leading some planet-like sites to show all of my posts again.

To ensure that this won’t happen again (even if I switch branches in the git repositories, move some files around, trash the ikiwiki cache, etc.), it looks like using meta dates is the way to go, for example:

 [[meta date="2009-07-02"]]

(One can use 2009-07-02 00:00:00 and 2009-07-02 01:00:00 to sort several entries on the same day, too.)

This way, all pages are rendered identically on every system.

To help maintaining those extra dates (kind of a burden, to be honest), I’ve written a tiny Perl script to automate it, and specified an alias in .git/config for that repository:

 [alias]
 ikiwiki-check = "!blog/2009/07/02/ikiwiki-dates.pl"

Inline replacement (in case of conflicts: same date without time, or with same time) or additions are then performed, and git status will show what needs tweaking.

More work that I initially imagined, but robustness should follow.

Posted @ 02/07/2009 Tags: ikiwiki
  1. Ensure there's a syntax directory in the personal vim directory.

     mkdir -p ~/.vim/syntax
    
  2. Download the markdown syntax file and put it in this directory (e.g. markdown.vim).

  3. Affect the markdown filetype to *.mdwn files and avoid long lines (in ~/.vimrc).

     " Help autodetection
     augroup filetypedetect
         au! BufRead,BufNewFile *.mdwn setfiletype markdown
     augroup END
    
     " Limit the line length for this mode
     autocmd FileType markdown set tw=80
    
  4. Enjoy.

Posted @ 29/07/2007 Tags: ikiwiki

Logo added at the top of the page.

Idea taken from http://ikiwiki.info/logo/, and adapted with a random font. To get a PNG file from the SVG one, just create a group with the appropriate objects, named it say kibilogo, and then call:

inkscape -w 150 -i kibilogo -e logo.png logo.svg

A bit of CSS later, that's done.

Posted @ 27/07/2007 Tags: ikiwiki

Thanks to ebzao, I'm back on the internets. :-)

To use ikiwiki with a remote host, just do the following:

  • put web.git on the server;

  • put the following in web.git/.git/hooks/post-receive and make it executable (it looks like setting GIT_DIR is mandatory to have run successfully when pushing, although locally or over through ssh, everything seems fine without it...):

      export GIT_DIR=~/web.git/.git
      cd $GIT_DIR/..
      git checkout -f                # Update this repository
      ikiwiki --setup ikiwiki.setup  # Update the HTML pages
      echo 'HTML update: done!'      # Notify the 'push'-er
    
  • git-clone on the local host;

  • edit/patch/...

  • git-push

And now the site gets automatically updated some seconds after a push.

(Note to self: a code block inside a list needs to be indented twice.)

Posted @ 27/07/2007 Tags: ikiwiki

Summary of my setup

  1. Install ikiwiki

  2. Choose a hierarchy for the blog entries. It is blog/$year/$month/$day/$title.mdwn right now, and tags are stored under tags/.

  3. Enable some plugins. Currently:

  4. sidebar: integrate a menu bar on each page;

  5. tag: ease the creation of tags and links;

  6. pagestats: needed to generate automatically the list of the tags;

  7. prettydate: specify a string format for the Posted/Last edited dates;

  8. shortcut: enable many interesting shortcuts like [[debbug NNNNNN]] or [[debpkg package]].

  9. Create some placeholders:

  10. index.mdwn;

  11. tags.mdwn;
  12. tags/*.mdwn (one for each tag),

  13. Write a configuration file: ikiwiki.setup, enabling these plugins, and containing some basic information like origin and target directories.

  14. To do:

  15. learn the syntax for real;

  16. automate the creation of index.mdwn placeholders under blog/$year, blog/$year/$month, and so on. Extend a module to do so?
  17. poke the author of the calendar plugin so as to get the code;
  18. report that shortcuts containing slashes aren't working;
  19. integrate it in git.
Posted @ 10/07/2007 Tags: ikiwiki