]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/tips/laptop_wiki_with_git_extended.mdwn
Added a comment: you can't use and/or/! inside the page() parameter, move them outside
[git.ikiwiki.info.git] / doc / tips / laptop_wiki_with_git_extended.mdwn
1 [[!meta title="Laptop Ikiwiki extended"]]
2 [[!meta date="2008-03-03 08:21:04 -0500"]]
4 I have (at least) three different hosts, `laptop`, `gitserver`, and `webserver`.
6 1. I started by following [[/tips/laptop_wiki_with_git]] to create 
7 a bare repo on `gitserver`, and clone that to a workingdir on  gitserver.
9   On the laptop clone gitserver:repo /working/dir 
11   Next create a setup file for the laptop with 
13         gitorigin_branch=> "",
14         git_wrapper => "/working/dir/.git/hooks/post-commit",
15     
16   At this point, assuming you followed page above, and not my hasty summary, 
18         git commit -a 
20   should rebuild the output of your wiki.
21    
22 2. Now create a setup file for the server (I call it server.setup).
24         gitorigin_branch=> "origin",
25         git_wrapper => "/repo/wiki.git/hooks/post-update.ikiwiki"
26        
27   Note the non-standard and bizzare name of the hook.   
29   edit /repo/wiki.git/hooks/post-update so that it looks something like
31         /repo/wiki.git/hooks/post-update.ikiwiki
32         rsync -cavz /home/me/public_html/* webserver:/destdir
34   Run 
36         ikiwiki --setup server.setup
38 Now in principle when you run git push on the laptop, the git server will 
39 first do its "regular" thing and update ~/public_html (in my case) and 
40 then rsync it onto the webserver.  For this to work, you need passwordless 
41 ssh or something like it.
43 [[DavidBremner]]