]> sipb.mit.edu Git - ikiwiki.git/blob - doc/forum/ikiwiki_with_album___38___underlay_plugins.mdwn
sorting out my variablenames...
[ikiwiki.git] / doc / forum / ikiwiki_with_album___38___underlay_plugins.mdwn
1 # Howto avoid heavy files in ikiwiki git repo
2
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.
4
5
6 ## Setup on remote server
7
8 On the server activate album and underlay plugins in $wiki.setup file
9
10     add_plugins:
11     - album
12     - underlay
13
14 Configure underlay plugin
15
16     add_underlays:
17     - /home/$user/$wiki.underlay
18
19 Create underlay directory and init git annex in direct mode
20
21     mkdir ~/$wiki.underlay
22     cd ~/$wiki.underlay;git init;git annex init $srcunderlay; git annex direct
23
24 Build ikiwiki for good measure
25     ikiwiki --setup $wiki.setup --rebuild
26
27 ## Setup on local laptop
28
29 Clone to laptop and initialise annex repo
30
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
35
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.
37     
38 ## Add content locally
39
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
41
42     [[!album ]]
43
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. 
45
46     git annex add .
47     git commit -m 'jpgs added'
48
49 ## Push to remote
50
51     cd $wrkunderlay; git-annex copy --to $srcunderlay .; git-annex sync
52     cd $wrkdir;git push
53
54 That's it! Ikiwiki should update the website and treat the jpg's as if they were part of the standard file structure.
55
56 How to accomplish this using the web interface is another questions. I guess the plugins have to setup and upload to underlaydir somehow.
57
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.
59
60
61
62
63
64
65