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.git ~/$wiki
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 You now have an annex repo in the local $wiki.underlay called $wrkunderlay and one in the $wiki.underlay directory on the remote server called $srcunderlay.
38 ## Add content locally
40 Add content to local $wiki directory in this case create $album.mdwn files for every album you have. Then `git add;git commit` files containing at the minimum the following
44 Create directories in the local $wiki.underlay corresponding to the album files in the local $wiki dir. Ie. create a directory named $album for every $album.mdwn file. Copy hi-res jpg files to each directory in the local $wiki.underlay and add + commit.
47 git commit -m 'jpgs added'
51 cd $wrkunderlay; git-annex copy --to $srcunderlay .; git-annex sync
54 That's it! Ikiwiki should update the website and treat the jpg's as if they were part of the standard file structure.
56 How to accomplish this using the web interface is another questions. I guess the plugins have to setup and upload to underlaydir somehow.
58 My guess is that you have to git-annex copy the $wiki.underlay files to $srcunderlay **before** running git push from the local $wiki directory. Haven't tested this yet though.