pages tagged ikiwiki http://meng6net.localhost/tag/ikiwiki/ <p><small>Copyright © 2005-2020 by <code>Meng Lu &lt;lumeng3@gmail.com&gt;</code></small></p> Meng Lu's home page ikiwiki Tue, 16 May 2017 23:59:39 +0000 Installing and configuring Ikiwiki http://meng6net.localhost/computing/installing_and_configuring/installing_and_configuring_ikiwiki/ http://meng6net.localhost/computing/installing_and_configuring/installing_and_configuring_ikiwiki/ Perl computing configuration documentation ikiwiki installation note software Tue, 16 May 2017 23:59:39 +0000 2017-05-16T23:59:39Z <h2>Misc</h2> <h3>Bug related to <code>decode</code> call</h3> <p>Modify /usr/lib/x86_64-linux-gnu/perl/5.20/Encode.pm</p> <pre><code>sub decode($$;$) { my ( $name, $octets, $check ) = @_; return undef unless defined $octets; $octets .= ''; $check ||= 0; my $enc = find_encoding($name); unless ( defined $enc ) { require Carp; Carp::croak("Unknown encoding '$name'"); } return $octets if Encode::is_utf8($octets); # Fix bug: do not decode already-decoded string my $string = $enc-&gt;decode( $octets, $check ); $_[1] = $octets if $check and !ref $check and !( $check &amp; LEAVE_SRC() ); return $string; } </code></pre> <h2>Templates</h2> <h3>Default templates</h3> <h3>Linux</h3> <p>On Linux, it's typically in /usr/share/ikiwiki/templates/.</p> <h4>macOS</h4> <p>If installing ikiwiki on macOS using <a href= "http://meng6net.localhost/tag/ikiwiki/installing_and_configuring_pkgsrc">'pkgsrc'</a>, <code>share/ikiwiki/templates/</code> should be relative to the root directory where all 'pkgsrc' files are installed, which is by default <code>/opt/pkg/</code>.</p> <h3>Computer-wide templates (applied to all Ikiwiki websites built on a computer)</h3> <p>Specify an additional directory for ikiwiki to look for templates:</p> <pre> <code>$ ikiwiki --setup setupfile --templatedir '/Users/meng/my-config-files/Ikiwiki/templatedir' [more options] </code></pre> <p>or specify it in the <code>setupfile</code>:</p> <pre><code>use IkiWiki::Setup::Standard { ..., templatedir =&gt; '/Users/meng/my-config-files/Ikiwiki/templatedir', ... } </code></pre> <p>I intend to keep tempaltes applicable to all Ikiwiki websites in '/Users/lumeng/my-config-files/Ikiwiki/templatedir'.</p> <h3>Website-specific templates applied to only the current Ikiwiki website</h3> <p>In addition to the default templates and the user-configured templates applicable to all Ikiwiki websites, keep templates only applicable to the current Ikiwiki website in its own source directory 'sourcedir/templates/'.</p> <h3>References</h3> <ul> <li>https://ikiwiki.info/templates/</li> <li> https://ikiwiki.info/forum/How_to_use_multiple_template_files_directories<strong>63</strong>/</li> </ul>