1 # Howto avoid heavy files in ikiwiki git repo
3 Continuation of discussion at [git-annex forum](http://git-annex.branchable.com/forum/git-annex___38___ikiwiki_experiment/) turns out the git-annex tricks could be avoided.
6 ## Setup on remote server
8 On the server activate album and underlay plugins in $wiki.setup file
14 Configure underlay plugin
17 - /home/$user/$wiki.underlay
19 Create underlay directory and init git annex in direct mode
21 mkdir ~/$wiki.underlay
22 cd ~/$wiki.underlay;git init;git annex init $srcunderlay; git annex direct
24 Build ikiwiki for good measure
25 ikiwiki --setup $wiki.setup --rebuild
27 ## Setup on local laptop
29 Clone to laptop and initialise annex repo
31 git clone ssh://$server/$wiki ./$wrkdir
32 git clone ssh://$server/$wiki.underlay ./$wiki.underlay
33 cd $wiki.underday;git-annex init $wrkunderlay
34 git remote add $srcunderlay ssh://$server/$wiki.underlay
36 ## Add content locally
38 Clone remote bare repo at $gitdir to local $wrkdir on laptop. Add content to $wrkdir in this case create $album.mdwn files for every album `git add;git commit` files containing at the minimum the following
42 Create directories in $wrkunderlay corresponding to the album files in $wrkdir. Ie. create a directory named $album for every $album.mdwn file. Copy hi-res jpg files to each directory in $wrkunderlay and add + commit.
45 git commit -m 'jpgs added'
49 cd $wrkunderlay; git-annex copy --to $srcunderlay .; git-annex sync
52 That's it! Ikiwiki should update the website and treat the jpg's as if they were part of the standard file structure.
54 How to accomplish this using the web interface is another questions. I guess the plugins have to setup and upload to underlaydir somehow.