Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > d8544620e4ac7bee48ddb48c85d55709 > files > 470

ikiwiki-3.20190228-1.mga7.noarch.rpm

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>byhand</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link rel="stylesheet" href="../style.css" type="text/css" />

<link rel="stylesheet" href="../local.css" type="text/css" />










</head>
<body>

<div class="page">

<div class="pageheader">
<div class="header">
<span>
<span class="parentlinks">

<a href="../index.html">ikiwiki</a>/ 

<a href="../setup.html">setup</a>/ 

</span>
<span class="title">
byhand

</span>
</span>



</div>









</div>





<div id="pagebody">

<div id="content" role="main">
<p>This tutorial will walk you through setting up a wiki with ikiwiki,
doing everything by hand. <a href="../setup.html">Setup</a> has an easier method, but with less
control.</p>

<div class="toc">
	<ol>
		<li class="L2"><a href="#index1h2">Decide where your wiki's files will go.</a>
		</li>
		<li class="L2"><a href="#index2h2">Create the beginnings of your wiki.</a>
		</li>
		<li class="L2"><a href="#index3h2">Build your wiki for the first time.</a>
		</li>
		<li class="L2"><a href="#index4h2">Add content to your wiki.</a>
		</li>
		<li class="L2"><a href="#index5h2">Add a setup file.</a>
		</li>
		<li class="L2"><a href="#index6h2">Turn on additional features.</a>
		</li>
		<li class="L2"><a href="#index7h2">Put your wiki in revision control.</a>
		</li>
		<li class="L2"><a href="#index8h2">Configure ikiwiki to use revision control.</a>
		</li>
		<li class="L2"><a href="#index9h2">Enjoy your new wiki!</a>
		</li>
	</ol>
</div>

<h2><a name="index1h2"></a>Decide where your wiki's files will go.</h2>

<p>As a wiki compiler, ikiwiki builds a wiki from files in a source directory,
and outputs the files to a destination directory.  If you keep your wiki in
a version control system, the source directory will contain a working copy
checked out from the version control system.</p>

<p>For the purposes of this tutorial, we'll set shell variables
for these locations, and use those variables in the commands that follow.</p>

<pre><code>SRCDIR=~/wikiwc
DESTDIR=~/public_html/wiki/
</code></pre>

<p>Note that ikiwiki owns the working copy directory; do not perform your own
edits in ikiwiki's working copy.</p>

<h2><a name="index2h2"></a>Create the beginnings of your wiki.</h2>

<p>This will create a simple main page for the wiki.</p>

<pre><code>mkdir &#036;SRCDIR
cd &#036;SRCDIR
&#036;EDITOR index.mdwn
</code></pre>

<p>In the editor, you could start by entering a simple page like
<a class="toggle" href="#setup-byhand.page">this one</a>.</p>

<div class="toggleable" id="setup-byhand.page">

<pre><code>Welcome to your new wiki.

All wikis are supposed to have a [[SandBox]],
so this one does too.

----

This wiki is powered by [ikiwiki](http://ikiwiki.info).
</code></pre>

</div>

<p>See <a href="../ikiwiki/formatting.html">formatting</a> for details about the markup language.</p>

<p>Note that several <a href="../basewiki.html">standard wiki pages</a> will be added to your
wiki, from files in <code>/usr/share/ikiwiki/basewiki/</code>, so your wiki will
automatically get a <span class="createlink">SandBox</span>, and some other useful pages.</p>

<h2><a name="index3h2"></a>Build your wiki for the first time.</h2>

<pre><code>ikiwiki --verbose &#036;SRCDIR &#036;DESTDIR --url=http://example.org/~you/wiki/
</code></pre>

<p>Replace the url with the real url to your wiki. You should now
be able to visit the url and see your wiki.</p>

<h2><a name="index4h2"></a>Add content to your wiki.</h2>

<p>Continue editing or adding pages and rebuilding the wiki.</p>

<p>To quickly get started on a common task like blogging with ikiwiki, you
can copy in files from the <a href="../examples.html">examples</a>. The examples are located in
<code>doc/examples/</code> in the ikiwiki source package.</p>

<p>You can experiment with other ikiwiki parameters such as <code>--wikiname</code>
and <code>--rebuild</code> too. Get comfortable with its command line (see
<a href="../usage.html">usage</a>).</p>

<h2><a name="index5h2"></a>Add a setup file.</h2>

<p>By now you should be getting tired of typing in all the command line
options each time you change something in your wiki's setup. Time to
introduce setup files.</p>

<p>To generate a setup file, use <code>ikiwiki --dumpsetup</code>. You can pass
all the options have you been including at the command line, and they
will be stored in the setup file.</p>

<pre><code>ikiwiki &#036;SRCDIR &#036;DESTDIR --url=http://example.org/~you/wiki/ --dumpsetup ikiwiki.setup
</code></pre>

<p>Note that this file should <em>not</em> be put in your wiki's directory with
the rest of the files. A good place to put it is in a ~/.ikiwiki/
subdirectory.</p>

<p>Most of the options, like <code>wikiname</code> in the setup file are the same as
ikiwiki's command line options (documented in <a href="../usage.html">usage</a>). <code>srcdir</code> and
<code>destdir</code> are the two directories you specify when running ikiwiki by
hand. Make sure that these are pointing to the right directories, and
read through and configure the rest of the file to your liking.</p>

<p>When you're satisfied, run <code>ikiwiki --setup ikiwiki.setup</code>, and it
will set everything up.</p>

<h2><a name="index6h2"></a>Turn on additional features.</h2>

<div class="notebox">
<p>CGI configuration is heavily dependent on webserver. Figure out (or
configure) the location and/or filename extension your webserver
needs to execute a CGI, then set <code>cgi_wrapper</code> to a suitable path.</p>
</div>

<p>Now you have a basic wiki with a setup file. Time to experiment
with ikiwiki's many features. </p>

<p>Let's first enable a key wiki feature and set up <a href="../cgi.html">CGI</a> to allow
editing the wiki from the web. Just edit ikiwiki.setup, uncomment the
settings for the <code>cgi_wrapper</code>, make sure the filename for the cgi wrapper
is ok, run <code>ikiwiki --setup ikiwiki.setup</code>, and you're done!</p>

<p>There are lots of other configuration options in ikiwiki.setup that you
can uncomment, configure, and enable by re-running
<code>ikiwiki --setup ikiwiki.setup</code>. Be sure to browse through all the
<a href="../plugins.html">plugins</a>.</p>

<h2><a name="index7h2"></a>Put your wiki in revision control.</h2>

<p>At this point you might want to check your wiki in to a revision control
system so you can keep track of changes and revert edits. Depending
on the revision control system you choose, the way this is done varies.</p>

<p>Note that the .ikiwiki subdirectory is where ikiwiki keeps its state, and
should be preserved, but not checked into revision control.</p>

<p>The <a href="../ikiwiki-makerepo.html">ikiwiki-makerepo</a> command automates setting up a wiki in
revision control.</p>

<p><a class="toggle" href="#setup-byhand.subversion">Subversion</a></p>

<div class="toggleable" id="setup-byhand.subversion">

<pre><code>REPOSITORY=~/wikirepo
ikiwiki-makerepo svn &#036;SRCDIR &#036;REPOSITORY
</code></pre>

</div>

<p><a class="toggle" href="#setup-byhand.cvs">CVS</a></p>

<div class="toggleable" id="setup-byhand.cvs">

<pre><code>REPOSITORY=~/wikirepo
ikiwiki-makerepo cvs &#036;SRCDIR &#036;REPOSITORY
</code></pre>

</div>

<p><a class="toggle" href="#setup-byhand.git">Git</a></p>

<div class="toggleable" id="setup-byhand.git">

<pre><code>REPOSITORY=~/wiki.git
ikiwiki-makerepo git &#036;SRCDIR &#036;REPOSITORY
</code></pre>

<p>Please see <a href="../rcs/git.html">git</a> for detailed documentation about how
ikiwiki uses git repositories, and some important caveats
about using the git repositories.</p>

</div>

<p><a class="toggle" href="#setup-byhand.mercurial">Mercurial</a></p>

<div class="toggleable" id="setup-byhand.mercurial">

<pre><code>REPOSITORY=&#036;SRCDIR
ikiwiki-makerepo mercurial &#036;SRCDIR
</code></pre>

</div>

<p><a class="toggle" href="#setup-byhand.bazaar">Bazaar</a></p>

<div class="toggleable" id="setup-byhand.bazaar">

<pre><code>REPOSITORY=&#036;SRCDIR
ikiwiki-makerepo bzr &#036;SRCDIR
</code></pre>

</div>

<p><a class="toggle" href="#setup-byhand.tla">TLA</a></p>

<div class="toggleable" id="setup-byhand.tla">

<pre><code>REPOSITORY=~/wikirepo
tla make-archive me@localhost--wiki &#036;REPOSITORY
tla my-id "&lt;me@localhost&gt;"
cd &#036;SRCDIR
tla archive-setup me@localhost--wiki/wiki--0
tla init-tree me@localhost--wiki/wiki--0
# Edit {arch}/=tagging-method and change the precious
# line to add the .ikiwiki directory to the regexp.
tla add *
tla import
</code></pre>

</div>

<p><a class="toggle" href="#setup-byhand.monotone">Monotone</a></p>

<div class="toggleable" id="setup-byhand.monotone">

<pre><code># This assumes that you have already used "mtn genkey you@hostname".
REPOSITORY=~/wiki.monotone
ikiwiki-makerepo monotone &#036;SRCDIR &#036;REPOSITORY
</code></pre>

</div>

<h2><a name="index8h2"></a>Configure ikiwiki to use revision control.</h2>

<p>Once your wiki is checked in to the revision control system, you should
configure ikiwiki to use revision control. Edit your ikiwiki.setup, set
<code>rcs</code> to the revision control system you chose to use.  Be careful, 
you may need to use the 'fullname'.  For example, 'hg' doesn't work, you
should use mercurial.  Be sure to set <code>svnrepo</code> to the directory for your
repository, if using subversion. Uncomment the configuration for the wrapper
for your revision control system, and configure the wrapper path appropriately 
(for Git, it should be the path to <code>hooks/post-update</code> inside the bare git repository).</p>

<p>Once it's all set up, run <code>ikiwiki --setup ikiwiki.setup</code> once more.
Now you should be able to edit files in $SRCDIR, and use your revision
control system to commit them, and the wiki will automatically update.
And in the web interface, RecentChanges should work, and files changed
by web users will also be committed using revision control.</p>

<h2><a name="index9h2"></a>Enjoy your new wiki!</h2>

<p>Add yourself to <span class="createlink">IkiWikiUsers</span>. And check out
the <a href="../tips.html">tips</a> to find out how to get more out of ikiwiki.</p>

</div>







</div>

<div id="footer" class="pagefooter" role="contentinfo">

<div id="pageinfo">






<div id="backlinks">
Links:

<a href="../setup.html">setup</a>

<a href="../tips/distributed_wikis.html">tips/distributed wikis</a>

<a href="../tips/laptop_wiki_with_git.html">tips/laptop wiki with git</a>


</div>






<div class="pagedate">
Last edited <span class="date">Tue Feb 26 23:01:54 2019</span>
<!-- Created <span class="date">Tue Feb 26 23:01:54 2019</span> -->
</div>

</div>


<!-- from ikiwiki -->
</div>

</div>
<script src="../ikiwiki/ikiwiki.js" type="text/javascript" charset="utf-8"></script>
<script src="../ikiwiki/toggle.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>