summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Eek <gustav.eek@proceranetworks.com>2014-10-21 20:53:29 +0200
committerGustav Eek <gustav.eek@proceranetworks.com>2014-10-21 20:53:29 +0200
commit30c17f4ae41265c5431c6b692e3e72963d2bbc77 (patch)
tree4860ea8efefeb67facfa8449feb7a9e2b1c3a3af
parentba87395ff11e63c1ede0a2c9af885eb50f7745d7 (diff)
Pages on wiki preview added
There are two pages added that describes (1) how to set up an ikiwiki lab environment, and (2) how to create a preview version of the Fripost wiki. Naturally the content is related. Things to complement with - Charts drawn in some nice fashion - Explain how templates and styles are applied The index page is changed to reflect the above.
-rw-r--r--create-a-wiki.mdwn154
-rw-r--r--index.mdwn6
-rw-r--r--wiki-preview.mdwn45
3 files changed, 203 insertions, 2 deletions
diff --git a/create-a-wiki.mdwn b/create-a-wiki.mdwn
new file mode 100644
index 0000000..14fb760
--- /dev/null
+++ b/create-a-wiki.mdwn
@@ -0,0 +1,154 @@
+This article describes mine (the author's, also known as Gustav)
+attempts to configure an Ikiwiki lab environment on my laptop
+computer. The purpose of the experiment is to learn how Ikiwiki
+functions and how to effectively work with Ikiwiki and offline editing
+with git.
+
+The components needed are
+
+* Ikiwiki
+* Apache2 web server
+* Git
+
+**Table of Contents**
+[!toc]
+
+What I have in mind is to access my lab wiki through
+_http://localhost/~<name>/lab-wiki_ for web editing and
+_~/lab-wiki/wiki-slave_ for local offline editing.
+
+It should be noted that what is described here probably is a perfectly
+_unsafe_ usage of a web server. Make sure that the computer does not
+except requests from Internet.
+
+# Install and configure Git
+
+I can not recall how this was done. Refer to
+[[Git's official website|http://git-scm.com/]]
+
+# Install and configure Ikiwiki
+
+Refer to [[ikiwiki setup|http://ikiwiki.info/setup/]] at
+[[ikiwiki's officiatl website|http://ikiwiki.info]] for initial
+install and configuration and
+[[an article on Git|http://ikiwiki.info/rcs/git/]] for more details on
+setting up Ikiwiki together with Git.
+
+I did my best to answer the questions provided in the initial
+installation and default configuration with the target of ending up
+with something like this:
+
+ url: http://localhost/~<name>/lab-wiki
+ srcdir: ~/lab-wiki/wiki
+ destdir: ~/public_html/lab-wiki
+ repository: ~/lab-wiki/wiki.git
+ settings: ~/lab-wiki/wiki.setup
+
+However, not all of the above was configurable in the form, for
+example the configuration file location. I needed to move directories
+and files around and change the remaining configurations in
+_~/lab-wiki/wiki.setup_ and run
+
+ $ ikiwiki --setup ~/lab-wiki/wiki.setup
+
+I also created the extra Git repository _wiki-slave_ for local edits:
+
+ $ cd ~/lab-wiki; git clone wiki.git wiki-slave
+
+The connectivity chart is now as follows
+
+ . Bare Git Repository
+ . ~/lab-wiki/wiki.git
+ . / \
+ . / \
+ . / \
+ . The Ikiwiki Repository |
+ . ~/lab-wiki/wiki |
+ . | |
+ . | Repository for Local Edits
+ . | ~/lab-wiki/wiki-slave
+ . | |
+ . The Ikiwiki Web Part |
+ . ~/public_html/lab-wiki |
+ . |
+ . The Preview Ikiwiki Web Part
+ . ~/public_html/lab-wiki-preview
+
+# Install and configure Apache 2
+
+For installation, follow the instructions in
+[[Apache's official documentation|http://httpd.apache.org/docs]]. I
+got Apache 2.4.6 installed.
+
+I needed to activate the userdir module. Refer to
+[[Per-user web directories|http://httpd.apache.org/docs/2.4/howto/public_html.html]]
+in Apache's documentation. For Debian do the following
+
+ $ cd /etc/apache2/mods-enabled
+ $ ln -s ln -s ../mods-available/userdir.load
+ $ ln -s ln -s ../mods-available/userdir.conf
+
+Also CGI execution need to be activated. See
+[[Dynamic Content with CGI|http://httpd.apache.org/docs/2.4/howto/cgi.html]]
+in Apache's documentation. My
+_/etc/apache2/mods-available/userdir.conf_ now looks as follows
+
+ <IfModule mod_userdir.c>
+ UserDir public_html
+ UserDir /home/*/public_html
+ UserDir disabled root
+
+ <Directory /home/*/public_html>
+ AllowOverride FileInfo AuthConfig Limit Indexes
+ Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
+ <Limit GET POST OPTIONS>
+ Require all granted
+ </Limit>
+ <LimitExcept GET POST OPTIONS>
+ Require all denied
+ </LimitExcept>
+ </Directory>
+
+ <Directory /home/*/public_html>
+ Options +ExecCGI
+ AddHandler cgi-script .cgi
+ </Directory>
+ <Directory /home/*/public_html/*>
+ Options +ExecCGI
+ AddHandler cgi-script .cgi
+ </Directory>
+ </IfModule>
+
+# Get preview of local modifications
+
+Now every thing works as work as expected. I can fetch the latest
+updated to _wiki-slave_, perform my updates, and whenever those are
+pushed to _origin/master_, the post-update hook makes sure that the
+web version is updated.
+
+But what if I want to inspect and verify my local changes before
+pushing them to _origin/master_?
+
+The subject is covered in
+[[the article on Git|http://ikiwiki.info/rcs/git/]]. I did what
+follows. Copy _wiki.setup_ to _wiki-preview.setup_ and edit those
+fields:
+
+ wikiname: lab-wiki-preview
+ srcdir: ~/lab-wiki/wiki-slave
+ destdir: ~/public_html/lab-wiki-preview
+ url: http://skolem/~<name>/lab-wiki-preview
+ cgiurl: http://skolem/~<name>/lab-wiki-preview/ikiwiki.cgi
+ cgi_wrapper: ~/public_html/lab-wiki-preview/ikiwiki.cgi
+ git_wrapper: ~/lab-wiki/wiki-slave/.git/hooks/post-commit
+ gitorigin_branch: ''
+ gitmaster_branch: master
+
+The idea is that the preview wiki works against wiki-slave, which is
+my simulated environment for local repository. What always works now
+is to, at any point, recompile/refresh the wiki:
+
+ ikiwiki -setup ~/lab-wiki/wiki-preview.setup -refresh
+
+Also, committing on the local _master_ branch _should_ automatically
+update the lab-wiki-preview wiki.
diff --git a/index.mdwn b/index.mdwn
index a12c19a..ba608c6 100644
--- a/index.mdwn
+++ b/index.mdwn
@@ -24,12 +24,14 @@ Välkommen till Friposts medlemswiki!
# Tekniskt
+* [[Tillgänglighet]] Resurser för att göra Fripost mer tillgänglig
* [[Hemsidan]] &ndash; hur den fungerar
-* [[Dokumentationskrav|documentationdemands]] &ndash; krav på lösning för tekninsk dokumentation
* [[Bug tracker|tracker]] &ndash; where to report bugs or feature requests
* [[Integration av verktyg med spridning av information]] &ndash; hur man skapar dokumentation av vad händer
+* [[Dokumentationskrav|documentationdemands]] &ndash; krav på lösning för tekninsk dokumentation
* [[Git och Fripost]] &ndash; Versionshantering med Git och Friposts Git-baserade projekt
-* [[Tillgänglighet]] Resurser för att göra Fripost mer tillgänglig
+* [[Förhandsgranskning av wikin|wiki-preview]] &ndash; Att förbereda sin miljö för förhandsgranskning av wikin
+* [[Att skapa en egen labb-wiki|create-a-wiki]] &ndash; Konstruera en egen ikiwiki-uppsättning för laborationer
# Övrigt
* [[Liknande projekt|liknande_projekt]]
diff --git a/wiki-preview.mdwn b/wiki-preview.mdwn
new file mode 100644
index 0000000..05757c7
--- /dev/null
+++ b/wiki-preview.mdwn
@@ -0,0 +1,45 @@
+Taking the [[Create a Wiki|create-a-wiki]] article as a starting point, this article describes how to set up preview of Friposts wiki.
+
+The basic idea is something like the following:
+
+ . Bare Git Repository
+ . git.fripost.org:fripost-wiki.git
+ . |
+ . |
+ . Repository for Local Edits
+ . ~/git/fripost/wiki
+ . |
+ . |
+ . The Preview Ikiwiki Web Part
+ . ~/public_html/fripost-wiki-preview
+
+Where *~/git/fripost/wiki* is a local git repository with remote tracking of the main bare wiki repository *git.fripost.org:fripost-wiki.git*. A command will cause a local compiled version to be created, that is accessed by pointing the browser to *http\://localhost/~<name>/fripost-wiki-preview/*.
+
+First the basics. According to [[Create a Wiki|create-a-wiki]] do the following:
+
+* Install and configure Git
+* Install and configure Apache 2
+* Install Ikiwiki
+
+For the Ikiwiki configuration question, answer them as follows
+
+ wikiname: fripost-wiki-preview
+ url: http://localhost/~<name>/lab-wiki
+ srcdir: ~/git/fripost/wiki
+ destdir: ~/public_html/fripost-wiki-preview
+ settings: ~/public_html/fripost-wiki-preview/wiki.setup
+
+Where *<name>* is the local user name and *~/git/fripost/wiki* is where the local wiki Git repository. This will generate a configuration file: *~/public_html/fripost-wiki-preview/wiki.setup*. Generate the first issue:
+
+ $ ikiwiki --setup ~/public_html/fripost-wiki-preview/wiki.setup
+
+For to preview local edits, run:
+
+ $ ikiwiki --setup ~/public_html/fripost-wiki-preview/wiki.setup --refresh
+
+and point your browser to *http\://localhost/~<name>/fripost-wiki-preview/*.
+
+You can also create an alias for to refresh the preview command.
+
+ $ alias fripost-wiki-preview-refresh='ikiwiki -setup /home/gustav/lab-wiki/fripost-wiki.setup -refresh'
+