From 2bb14914f5e19ecf15af99bcfb8eb4c8f1faf121 Mon Sep 17 00:00:00 2001 From: karlberry Date: Wed, 4 Sep 2013 12:00:21 -0400 Subject: [PATCH 01/10] --- doc/forum/creating_redirect_index.mdwn__63___.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/forum/creating_redirect_index.mdwn__63___.mdwn diff --git a/doc/forum/creating_redirect_index.mdwn__63___.mdwn b/doc/forum/creating_redirect_index.mdwn__63___.mdwn new file mode 100644 index 000000000..50d85183f --- /dev/null +++ b/doc/forum/creating_redirect_index.mdwn__63___.mdwn @@ -0,0 +1,6 @@ +Hi - we are switching to ikiwiki for the Savannah documentation . I installed the Debian ikiwiki package and it is working fine. My question: is it possible to redirect the top-level index.mdwn to another page? (Traditionally we have used .) + +Sorry if this is obvious. I looked around for existing plugins or methods, but what I found seemed to have other prerequisites that I could not easily figure out, and looked to be more about moving pages than redirecting. I could do it at the Apache level, but I thought it would be simpler and cleaner to do it within ikiwiki itself if possible (e.g., with some plugin+directive in index.mdwn?). + +Any pointers or info greatly appreciated. Thanks, +karl@gnu.org From 578d59567a0f84fe62016fbbd4caf98509e14049 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawlcaGfdn9Kye1Gc8aGb67PDVQW4mKbQD7E" Date: Wed, 4 Sep 2013 12:42:18 -0400 Subject: [PATCH 02/10] Added a comment --- .../comment_1_6d609c3a2ba50da4129e15b60362c6d9._comment | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/forum/creating_redirect_index.mdwn__63___/comment_1_6d609c3a2ba50da4129e15b60362c6d9._comment diff --git a/doc/forum/creating_redirect_index.mdwn__63___/comment_1_6d609c3a2ba50da4129e15b60362c6d9._comment b/doc/forum/creating_redirect_index.mdwn__63___/comment_1_6d609c3a2ba50da4129e15b60362c6d9._comment new file mode 100644 index 000000000..7395f17d7 --- /dev/null +++ b/doc/forum/creating_redirect_index.mdwn__63___/comment_1_6d609c3a2ba50da4129e15b60362c6d9._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawlcaGfdn9Kye1Gc8aGb67PDVQW4mKbQD7E" + nickname="Amitai" + subject="comment 1" + date="2013-09-04T16:42:17Z" + content=""" +Sounds like you're looking for `[[!meta redir=foo]]`. See the docs for the [[ikiwiki/directive/meta]] directive. +"""]] From d93a94805944d349e04659a2d25dc28bd1bb3570 Mon Sep 17 00:00:00 2001 From: soman81 Date: Thu, 5 Sep 2013 03:52:00 -0400 Subject: [PATCH 03/10] --- doc/index.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/index.mdwn b/doc/index.mdwn index 89802c604..40a8c2e59 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -3,7 +3,7 @@ suitable for publishing on a website. Ikiwiki stores pages and history in a [[revision_control_system|rcs]] such as [[Subversion|rcs/svn]] or [[rcs/Git]]. There are many other [[features]], including support for [[blogging|blog]] and [[podcasting|podcast]], as well as a large -array of [[plugins]]. +array of [[plugins]]. http://www.portedeurope.org http://www.profischnell.de [[!template id=links]] From 568fdb023a09f2cdae94176ed913d064a2e897b9 Mon Sep 17 00:00:00 2001 From: soman81 Date: Thu, 5 Sep 2013 03:52:48 -0400 Subject: [PATCH 04/10] --- doc/index.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/index.mdwn b/doc/index.mdwn index 40a8c2e59..bde2cf404 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -3,7 +3,7 @@ suitable for publishing on a website. Ikiwiki stores pages and history in a [[revision_control_system|rcs]] such as [[Subversion|rcs/svn]] or [[rcs/Git]]. There are many other [[features]], including support for [[blogging|blog]] and [[podcasting|podcast]], as well as a large -array of [[plugins]]. http://www.portedeurope.org http://www.profischnell.de +array of [[plugins]]. [[http://www.portedeurope.org|http://www.portedeurope.org]] [[http://www.profischnell.de|http://www.profischnell.de]] [[!template id=links]] From a3ed8c28d211ad8eadf25e3047394743974f5fa3 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Thu, 5 Sep 2013 08:16:13 -0400 Subject: [PATCH 05/10] the latest incarnation of tekschen --- doc/spam_fighting.mdwn | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/doc/spam_fighting.mdwn b/doc/spam_fighting.mdwn index 5b11e9a85..83b9dbfdf 100644 --- a/doc/spam_fighting.mdwn +++ b/doc/spam_fighting.mdwn @@ -20,11 +20,6 @@ Commit | Date | Login | IP d8f1faa | 2013/08/16 | webschen1 | 79.228.11.79 d1dbd8e | 2013/08/19 | webschen1 | 79.228.8.176 6602052 | 2013/08/21 | webschen1 | 31.17.11.19 +d93a948 | 2013/09/05 | soman81 | 31.17.11.19 +568fdb0 | 2013/09/05 | soman81 | 31.17.11.19 """]] - -[[schmonz]] attempted to ban `webschen1` and `ip(79.228.*.*)` and got this: - - remote: you are not allowed to change refs/heads/setup - To git://git.ikiwiki.info/ - ! [remote rejected] setup -> setup (pre-receive hook declined) - error: failed to push some refs to 'git://git.ikiwiki.info/' From bc1af424451a83e03ad3550fb87fcae47d540b77 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Thu, 5 Sep 2013 21:07:42 -0400 Subject: [PATCH 06/10] Revert spam This reverts commit d93a94805944d349e04659a2d25dc28bd1bb3570. --- doc/index.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/index.mdwn b/doc/index.mdwn index bde2cf404..89802c604 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -3,7 +3,7 @@ suitable for publishing on a website. Ikiwiki stores pages and history in a [[revision_control_system|rcs]] such as [[Subversion|rcs/svn]] or [[rcs/Git]]. There are many other [[features]], including support for [[blogging|blog]] and [[podcasting|podcast]], as well as a large -array of [[plugins]]. [[http://www.portedeurope.org|http://www.portedeurope.org]] [[http://www.profischnell.de|http://www.profischnell.de]] +array of [[plugins]]. [[!template id=links]] From 3e34ec65bc4999171affa40de20ac5fe84e392d2 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Thu, 5 Sep 2013 22:03:20 -0400 Subject: [PATCH 07/10] add a practical example on how to do a mirror --- doc/tips/distributed_wikis.mdwn | 142 ++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) diff --git a/doc/tips/distributed_wikis.mdwn b/doc/tips/distributed_wikis.mdwn index cf9c2e338..91bc1c8f2 100644 --- a/doc/tips/distributed_wikis.mdwn +++ b/doc/tips/distributed_wikis.mdwn @@ -44,3 +44,145 @@ the wiki, and if you could even resolve the conflict using the web interface. Not 100% sure as I've not gotten into this situation yet. --[[Joey]] + +## Practical example + +Say you have a friend that has already configured a shiny ikiwiki site, and you want to help by creating a mirror. You still need to figure out how to install ikiwiki and everything, hopefully this section will help you with that. + +### Installing ikiwiki + +You need to install the ikiwiki package for the mirror to work. You can use ikiwiki to publish the actual HTML pages elsewhere if you don't plan on letting people edit the wiki, but generally you want the package to be installed on the webserver for editing to work. + + apt-get install ikiwiki + +### Setting up the wiki + +(!) Optionnally: create a user just for this wiki. Otherwise the wiki will run as your user from here on. + +We assume your username is `user` and that you will host the wiki under the hostname `mirror.example.com`. The original wiki is at `wiki.example.com`. We also assume that your friend was nice enough to provide a copy of the `.setup` file in the `setup` branch, which is the case for any wiki hosted on [branchable.com](http://branchable.com). + + cd ~user + # setup base repository, named source.git + git clone --bare git://wiki.example.com/ source.git + # setup srcdir, named source + git clone source.git + # convenience copy of the setup file + git clone -b origin/setup source.git setup + cd setup + edit ikiwiki.setup # adapt configuration + +When editing ikiwiki.setup, make sure you change the following entries: + + cgiurl: http://mirror.example.com/ikiwiki.cgi + cgi_wrapper: /var/www/ikiwiki.cgi + srcdir: /home/user/source + destdir: /var/www/mirror.example.com + libdir: /home/user/source/.ikiwiki + git_wrapper: /home/user/source.git/hooks/post-commit + git_test_receive_wrapper: /home/user/source.git/hooks/pre-receive + ENV: + TMPDIR: /home/user/tmp + +This assumes that your /var/www directory is writable by your user. + +### Basic HTML rendering + +You should already be able to make a plain HTML rendering of the wiki: + + ikiwiki --setup ikiwiki.setup + +### Editing your copy through git + +At this point, your wiki should already be visible in `/var/www/mirror.example.com`, the `destdir`. You can edit it and changes should show up automatically in the `destdir`. + +However, you need yet another clone for this, the `srcdir` being used internally by the web interface of Ikiwiki. So clone the `repository` elsewhere: + + git clone ~user/source.git checkout + cd checkout + edit index.mdwn + git commit index.mdwn + git push + +This will refresh the main page of the wiki, for example. + +### Webserver configuration + +You will also need a webserver to serve the content in the `destdir` +defined above. We assume you will configure a virtual host named `mirror.example.com`. Here are some examples on how to do those, see [[!iki setup]] and [[!iki tips/dot_cgi]] for complete documentation. + +Note that this will also configure CGI so that people can edit your copy of the wiki. We'll see how to sync back later. + +#### Apache configuration + + + ServerName reseaulibre.example.com:80 + DocumentRoot /var/www/reseaulibre.example.com + + Options Indexes MultiViews ExecCGI + AllowOverride None + Order allow,deny + allow from all + + ScriptAlias /ikiwiki.cgi /var/www/ikiwiki.cgi + ErrorDocument 404 "/ikiwiki.cgi" + + +#### Nginx configuration + + server { + root /var/www/reseaulibre.example.com/; + index index.html index.htm; + server_name reseaulibre.example.com; + + location / { + try_files $uri $uri/ /index.html; + } + location /ikiwiki.cgi { + fastcgi_pass unix:/tmp/fcgi.socket; + fastcgi_index ikiwiki.cgi; + fastcgi_param SCRIPT_FILENAME /var/www/ikiwiki.cgi; + fastcgi_param DOCUMENT_ROOT /var/www/reseaulibre.example.com; + include /etc/nginx/fastcgi_params; + } + } + +Start this process as your own user (or the user that has write access +to `srcdir`, `destdir`, etc): + + spawn-fcgi -s /tmp/fcgi.socket -n -- /usr/sbin/fcgiwrap + +Make this writable: + + chmod a+w /tmp/fcgi.socket + +### Read-only mirror: done! + +At this point, you are done! You can edit your own clone of the wiki, although your changes will not go back to the main site. However, you can always push or pull manually from the `repository` in `~user/source.git` to update the main site. + +### Announcing the mirror + +Once your mirror works, you can also add it to the list of mirrors. You can ask the mirror where you take it from (and why not, all mirrors) to add it to their setup file. As an example, here's the configuration for the first mirror: + + mirrorlist: + example: https://wiki.example.com/ + +The [[plugins/mirrorlist]] plugin of course needs to be enabled for this to work. + +### Pushing changes back to the main site + +The final step is to push edits on the mirror back to the master site. That way the mirror is not only for reading, but can also be edited, even when the master is offline or the network is separated. + +To do this, the mirror needs to push back to the master, again using the gitpush plugin: + + git_push_to: + - git://wiki.example.com/ + +This will ensure that commits done on the mirror will propagate back to the master. + +### Other guides + +Another guide is the [[tips/laptop_wiki_with_git]] guide. To get a +better understanding of how ikiwiki works, see [[rcs/git]]. + +[This](http://piny.be/jrayhawk/notes/ikiwiki_creation/) may also be of +use if the above doesn't work. From 95d592bf657c934b663983bba3ef86605e469c52 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Thu, 5 Sep 2013 22:11:19 -0400 Subject: [PATCH 08/10] simplify --- doc/tips/distributed_wikis.mdwn | 47 +++++++++++++++++---------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/doc/tips/distributed_wikis.mdwn b/doc/tips/distributed_wikis.mdwn index 91bc1c8f2..ecd4825b4 100644 --- a/doc/tips/distributed_wikis.mdwn +++ b/doc/tips/distributed_wikis.mdwn @@ -62,12 +62,10 @@ You need to install the ikiwiki package for the mirror to work. You can use ikiw We assume your username is `user` and that you will host the wiki under the hostname `mirror.example.com`. The original wiki is at `wiki.example.com`. We also assume that your friend was nice enough to provide a copy of the `.setup` file in the `setup` branch, which is the case for any wiki hosted on [branchable.com](http://branchable.com). cd ~user - # setup base repository, named source.git - git clone --bare git://wiki.example.com/ source.git # setup srcdir, named source - git clone source.git + git clone git://wiki.example.com/ source # convenience copy of the setup file - git clone -b origin/setup source.git setup + git clone -b origin/setup source setup cd setup edit ikiwiki.setup # adapt configuration @@ -78,8 +76,8 @@ When editing ikiwiki.setup, make sure you change the following entries: srcdir: /home/user/source destdir: /var/www/mirror.example.com libdir: /home/user/source/.ikiwiki - git_wrapper: /home/user/source.git/hooks/post-commit - git_test_receive_wrapper: /home/user/source.git/hooks/pre-receive + git_wrapper: /home/user/source/.git/hooks/post-commit + git_test_receive_wrapper: /home/user/source/.git/hooks/pre-receive ENV: TMPDIR: /home/user/tmp @@ -91,26 +89,12 @@ You should already be able to make a plain HTML rendering of the wiki: ikiwiki --setup ikiwiki.setup -### Editing your copy through git - -At this point, your wiki should already be visible in `/var/www/mirror.example.com`, the `destdir`. You can edit it and changes should show up automatically in the `destdir`. - -However, you need yet another clone for this, the `srcdir` being used internally by the web interface of Ikiwiki. So clone the `repository` elsewhere: - - git clone ~user/source.git checkout - cd checkout - edit index.mdwn - git commit index.mdwn - git push - -This will refresh the main page of the wiki, for example. - ### Webserver configuration You will also need a webserver to serve the content in the `destdir` defined above. We assume you will configure a virtual host named `mirror.example.com`. Here are some examples on how to do those, see [[!iki setup]] and [[!iki tips/dot_cgi]] for complete documentation. -Note that this will also configure CGI so that people can edit your copy of the wiki. We'll see how to sync back later. +Note that this will also configure CGI so that people can edit the wiki. Note that this configuration may involve timeouts if the main site is down. #### Apache configuration @@ -168,9 +152,26 @@ Once your mirror works, you can also add it to the list of mirrors. You can ask The [[plugins/mirrorlist]] plugin of course needs to be enabled for this to work. -### Pushing changes back to the main site +### Alternative configuration -The final step is to push edits on the mirror back to the master site. That way the mirror is not only for reading, but can also be edited, even when the master is offline or the network is separated. +In the above configuration, the master git repository is still on the main site. If that site goes down, there will be delays when editing the wiki mirror. It could also simply fail because it will not be able to push the changes to the master git repo. An alternative is to setup a local bare repository that is synced with the master. + +At the setup step, you need to create *two* git repositories on the mirror: + + cd ~user + # setup base repository, named source.git + git clone --bare git://wiki.example.com/ source.git + # setup srcdir, named source + git clone source.git + # convenience copy of the setup file + git clone -b origin/setup source.git setup + cd setup + edit ikiwiki.setup # adapt configuration + +The following entries will be different from the above setup file: + + git_wrapper: /home/user/source.git/hooks/post-commit + git_test_receive_wrapper: /home/user/source.git/hooks/pre-receive To do this, the mirror needs to push back to the master, again using the gitpush plugin: From 23bc34ad6bb5944c48c2b19e52bda600e6fde4be Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Thu, 5 Sep 2013 22:11:59 -0400 Subject: [PATCH 09/10] toc --- doc/tips/distributed_wikis.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/tips/distributed_wikis.mdwn b/doc/tips/distributed_wikis.mdwn index ecd4825b4..75a2368b1 100644 --- a/doc/tips/distributed_wikis.mdwn +++ b/doc/tips/distributed_wikis.mdwn @@ -3,6 +3,8 @@ making it easy to create and maintain copies and branches of a project. And this can be used for all sorts of interesting stuff. Since ikiwiki can use git, let's explore some possibilities for distributed wikis. +[[!toc levels=2]] + ## a wiki mirror The simplest possibility is setting up a mirror. If a wiki exposes its git From 9bf65aa2427eee7cc9d80de455021d97cf68e648 Mon Sep 17 00:00:00 2001 From: "https://id.koumbit.net/anarcat" Date: Thu, 5 Sep 2013 22:20:06 -0400 Subject: [PATCH 10/10] why a directive? --- doc/plugins/pinger/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/plugins/pinger/discussion.mdwn diff --git a/doc/plugins/pinger/discussion.mdwn b/doc/plugins/pinger/discussion.mdwn new file mode 100644 index 000000000..21f6bc8d5 --- /dev/null +++ b/doc/plugins/pinger/discussion.mdwn @@ -0,0 +1 @@ +It is unclear to me where the ping directive should be used and why it's a directive, and not simply a configuration setting. --[[anarcat]]