]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/tips/Ikiwiki_with_git-annex__44___the_album_and_the_underlay_plugins.mdwn
(no commit message)
[git.ikiwiki.info.git] / doc / tips / Ikiwiki_with_git-annex__44___the_album_and_the_underlay_plugins.mdwn
1 [[!meta date="2013-09-26 09:22:26 -0400"]]
3 # Howto avoid heavy files in ikiwiki git repo
5 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.
8 ## Setup on remote server
10 On the server activate album and underlay plugins in $wiki.setup file
12     add_plugins:
13     - album
14     - underlay
16 Configure underlay plugin
18     add_underlays:
19     - /home/$user/$wiki.underlay
21 Create underlay directory and init git annex in direct mode
23     mkdir ~/$wiki.underlay
24     cd ~/$wiki.underlay;git init;git annex init $srcunderlay; git annex direct
26 Build ikiwiki for good measure
27     ikiwiki --setup $wiki.setup --rebuild
29 ## Setup on local laptop
31 Clone to laptop and initialise annex repo
33     git clone ssh://$server/$wiki.git ~/$wiki
34     git clone ssh://$server/$wiki.underlay ~/$wiki.underlay
35     cd $wiki.underday;git-annex init $wrkunderlay
36     git remote add $srcunderlay ssh://$server/$wiki.underlay
38 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.
39     
40 ## Add content locally
42 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     [[!album ]]
46 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. 
48     git annex add .
49     git commit -m 'jpgs added'
51 ## Push to remote
53     cd $wrkunderlay; git-annex copy --to $srcunderlay .; git-annex sync
54     cd $wrkdir;git push
56 That's it! Ikiwiki should update the website and treat the jpg's as if they were part of the standard file structure.
58 How to accomplish this using the web interface is another questions. I guess the plugins have to setup and upload to underlaydir somehow.
60 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.