aboutsummaryrefslogtreecommitdiff
path: root/doc/forum/ikiwiki_with_album___38___underlay_plugins.mdwn
blob: d6ca286cda4ac675adc0a23ff4b97abd49f9c37f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Howto avoid heavy files in ikiwiki git repo

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.


## Setup on remote server

On the server activate album and underlay plugins in $wiki.setup file

    add_plugins:
    - album
    - underlay

Configure underlay plugin

    add_underlays:
    - /home/$user/$wiki.underlay

Create underlay directory and init git annex in direct mode

    mkdir ~/$wiki.underlay
    cd ~/$wiki.underlay;git init;git annex init $srcunderlay; git annex direct

Build ikiwiki for good measure
    ikiwiki --setup $wiki.setup --rebuild

## Setup on local laptop

Clone to laptop and initialise annex repo

    git clone ssh://$server/$wiki ./$wrkdir
    git clone ssh://$server/$wiki.underlay ./$wiki.underlay
    cd $wiki.underday;git-annex init $wrkunderlay
    git remote add $srcunderlay ssh://$server/$wiki.underlay
    
## Add content locally

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

    [[!album ]]

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. 

    git annex add .
    git commit -m 'jpgs added'

## Push to remote

    cd $wrkunderlay; git-annex copy --to $srcunderlay .; git-annex sync
    cd $wrkdir;git push

That's it! Ikiwiki should update the website and treat the jpg's as if they were part of the standard file structure.

How to accomplish this using the web interface is another questions. I guess the plugins have to setup and upload to underlaydir somehow.