From 791bfae63cd91252f2b36449c28da3d0068aec49 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 21 Sep 2007 13:03:28 +0200 Subject: Enable the `html' plugin. --- render_locally | 1 + 1 file changed, 1 insertion(+) (limited to 'render_locally') diff --git a/render_locally b/render_locally index 01bfe5a8..25a738ea 100755 --- a/render_locally +++ b/render_locally @@ -25,6 +25,7 @@ ikiwiki \ --no-usedirs \ --plugin favicon \ --plugin goodstuff \ + --plugin html \ --plugin sidebar \ --plugin table \ --libdir "$src"/.library \ -- cgit v1.3.1 From 4a4033e7e5207fdf7db74f4032de0ed88273bacf Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 21 Sep 2007 13:10:07 +0200 Subject: Add (and enable) a `copyright' plugin, a copy of the `license' one. --- .library/IkiWiki/Plugin/copyright.pm | 69 ++++++++++++++++++++++++++++++++++++ render_locally | 1 + 2 files changed, 70 insertions(+) create mode 100644 .library/IkiWiki/Plugin/copyright.pm (limited to 'render_locally') diff --git a/.library/IkiWiki/Plugin/copyright.pm b/.library/IkiWiki/Plugin/copyright.pm new file mode 100644 index 00000000..6497547f --- /dev/null +++ b/.library/IkiWiki/Plugin/copyright.pm @@ -0,0 +1,69 @@ +# A plugin for ikiwiki to implement adding a footer with copyright information +# based on a default value taken out of a file. + +# Copyright © 2007 Thomas Schwinge +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# A footer with copyright information will be added to every rendered page if +# (a) such a footer isn't present already (see the `meta' plugin's +# ``copyright'' facility) and (b) a file `copyright.html' is found (using the +# same rules as for the sidebar plugin). +# +# The state which page's copyright text was gathered from which source is not +# tracked, so you'll need a full wiki-rebuild if (b)'s files are changed. +# +# You can use wiki links in `copyright.html'. + +package IkiWiki::Plugin::copyright; + +use warnings; +use strict; +use IkiWiki 2.00; + +sub import +{ + hook (type => "pagetemplate", id => "copyright", call => \&pagetemplate, + # Run last, as to have the `meta' plugin do its work first. + last => 1); +} + +sub pagetemplate (@) +{ + my %params = @_; + my $page = $params {page}; + my $destpage = $params {destpage}; + + my $template = $params {template}; + + if ($template->query (name => "copyright") && + ! defined $template->param('copyright')) + { + my $content; + my $copyright_page = bestlink ($page, "copyright") || return; + my $copyright_file = $pagesources {$copyright_page} || return; + #my $pagetype = pagetype ($copyright_file); + # Check if ``$pagetype eq 'html'''? + $content = readfile (srcfile ($copyright_file)); + + if (defined $content && length $content) + { + $template->param (copyright => + IkiWiki::linkify ($page, $destpage, $content)); + } + } +} + +1 diff --git a/render_locally b/render_locally index 25a738ea..9864542d 100755 --- a/render_locally +++ b/render_locally @@ -29,6 +29,7 @@ ikiwiki \ --plugin sidebar \ --plugin table \ --libdir "$src"/.library \ + --plugin copyright \ --plugin license \ ${1+"$@"} \ "$src" "$dest" && -- cgit v1.3.1 From 482115a6cd94da838c51cfb2d4b3c9934d698bb7 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 6 Nov 2007 22:11:00 +0100 Subject: Activate the `texinfo' plugin. --- render_locally | 1 + 1 file changed, 1 insertion(+) (limited to 'render_locally') diff --git a/render_locally b/render_locally index 9864542d..ce83cd84 100755 --- a/render_locally +++ b/render_locally @@ -31,6 +31,7 @@ ikiwiki \ --libdir "$src"/.library \ --plugin copyright \ --plugin license \ + --plugin texinfo \ ${1+"$@"} \ "$src" "$dest" && -- cgit v1.3.1 From 281e6d372eb155bc1f09844100aceb9505ec384e Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 10 Dec 2007 20:32:08 +0100 Subject: render_locally (src): Make the path symlink-free. --- render_locally | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'render_locally') diff --git a/render_locally b/render_locally index ce83cd84..153e7e8a 100755 --- a/render_locally +++ b/render_locally @@ -9,12 +9,8 @@ # Written by Thomas Schwinge -src=$(dirname "$0") && -# Invoking ikiwiki with ``src=.'' will make it render `.git/' as well. -case $src in - .*) src=$(cd "$src" && pwd);; - *) :;; -esac && +# Need a symlink-free path. +src=$(readlink -f "$(dirname "$0")") && dest=$src.rendered && ikiwiki \ -- cgit v1.3.1 From 2858907c249981d09274cf1dc37455850ff02984 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 4 Nov 2008 11:25:13 +0100 Subject: Enable the txt plugin. --- render_locally | 1 + 1 file changed, 1 insertion(+) (limited to 'render_locally') diff --git a/render_locally b/render_locally index 153e7e8a..67c96fdb 100755 --- a/render_locally +++ b/render_locally @@ -24,6 +24,7 @@ ikiwiki \ --plugin html \ --plugin sidebar \ --plugin table \ + --plugin txt \ --libdir "$src"/.library \ --plugin copyright \ --plugin license \ -- cgit v1.3.1 From 8ec282ed60ae9f4b4462f6452d455f0850197993 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 5 Nov 2008 11:02:28 +0100 Subject: This is no longer only a wiki, but will be the official pages. --- colophon.mdwn | 8 ++++++++ contributing.mdwn | 6 +++--- contributing/web_pages.mdwn | 18 ++++++++---------- hurd/logo.mdwn | 2 +- index.mdwn | 19 ++++++++----------- index/discussion.mdwn | 3 ++- logo.png | Bin 17674 -> 0 bytes mailing_lists.mdwn | 2 +- render_locally | 4 ++-- 9 files changed, 33 insertions(+), 29 deletions(-) delete mode 100644 logo.png (limited to 'render_locally') diff --git a/colophon.mdwn b/colophon.mdwn index a48849a9..d9b771a9 100644 --- a/colophon.mdwn +++ b/colophon.mdwn @@ -41,3 +41,11 @@ started adding content. On 2007-08-12 [[Thomas_Schwinge|tschwinge]] finished the conversion of the TWiki content to [ikiwiki](http://ikiwiki.info). Read [[about_the_twiki_to_ikiwiki_conversion]]. + + +--- + +# Rev. III + +In November 2008, [[Thomas_Schwinge|tschwinge]] imported the Hurd's current web +pages into this repository and made this the official GNU Hurd web appearance. diff --git a/contributing.mdwn b/contributing.mdwn index 8b38655f..4b731065 100644 --- a/contributing.mdwn +++ b/contributing.mdwn @@ -38,7 +38,7 @@ meant when people are talking about GNU/Hurd systems. This system has mostly been designed and implemented [in the '90s](http://www.gnu.org/software/hurd/history.html). It works and is usable. -For example, this wiki system [is running on a GNU/Hurd +For example, these web pages are rendered on a [GNU/Hurd system](http://www.bddebian.com/cgi-bin/uptime). You can try it out for yourself: for getting access, installing @@ -62,7 +62,7 @@ system, e.g., [[microkernels_for_beginners|microkernel/for_beginners]]. Until you can do the basic exercises listed there, you won't be able to significantly contribute to the Hurd. -For more reading resources, please see this whole wiki, and also +For more reading resources, please see these web pages, and also , for links to a bunch of documents, and in general. @@ -109,7 +109,7 @@ project. If you're interested in contributing in this area, knowing the *Hurd on Mach* system nevertheless is a prerequisite. At least have a deep look at the documentation pointers given in the previous section. Also read through the -[[HurdNG|hurd/ng]] section of this wiki. +[[HurdNG|hurd/ng]] section. Please send email to the [[mailing_lists/l4-hurd]] mailing list for discussing this post-Mach system design. diff --git a/contributing/web_pages.mdwn b/contributing/web_pages.mdwn index 45abeecc..4dc2e27c 100644 --- a/contributing/web_pages.mdwn +++ b/contributing/web_pages.mdwn @@ -16,7 +16,7 @@ projects: * Install your changes *early* and *often*: don't hold your contribution back until you think it is perfect. -Before doing any changes, you are encouraged to play a bit in this wiki's +Before doing any changes, you are encouraged to play a bit in the [[sandbox]], to become familiar with the [[ikiwiki/Markdown]] syntax. Get some [[help_on_formatting|ikiwiki/formatting]]. @@ -27,12 +27,10 @@ Feel free to ask questions or report problems on every page's [[discussion]] sub-page. They're reachable from the *Discussion* link on the top of the page, which will, when selected, create a new page if there isn't one yet. -Every page on the site is editable. Feel free to join in, but we do have some -simple requests. In an ideal wiki, everyone is equal and shares equal rights, -liberties, responsibilities and common sense. Please try to match the *tone* -of your topics and edits with the existing topics. If we all pull in the same -direction the site will be more useful for everyone, especially for our own -use. +Every page on the site is editable, like in a wiki. Feel free to join in, but +we do have some simple requests. Please try to match the *tone* of your topics +and edits with the existing topics. If we all pull in the same direction these +pages will be more useful for everyone, especially for our own use. # Edit Via the Web Interface @@ -40,7 +38,7 @@ use. When you found a page you want to work on, just follow the *Edit* link on the top of the page. When doing this for the first time, this will first transfer you to a page where you have to create a wiki account. After logging in, you -can edit the wiki pages. +can edit the pages. # Working on a Checkout of the git Repository @@ -122,14 +120,14 @@ personal working copy. You'll finally have to explicitly install your changes into the master repository, see below. -You can also locally get the whole wiki rendered to html pages: +You can also locally get the whole set of pages rendered to HTML: $ wiki/render_locally [...] scanning contributing/web_pages.mdwn rendering contributing/web_pages.mdwn - Now open `wiki.rendered/index.html' to browse the wiki pages. + Now open `wiki.rendered/index.html' to browse the pages. If you like what you've done, then it's now time to publish your changes. diff --git a/hurd/logo.mdwn b/hurd/logo.mdwn index b1030e50..fcfe22dd 100644 --- a/hurd/logo.mdwn +++ b/hurd/logo.mdwn @@ -20,6 +20,6 @@ sources](http://www.gnu.org/graphics/hurd.mf) to [[img boxes-redrawn.png]] -This symbol is also being used as a favicon for this whole wiki. +This symbol is also being used as a favicon for this web site. [[img /favicon.ico]] diff --git a/index.mdwn b/index.mdwn index c9d02976..410bf301 100644 --- a/index.mdwn +++ b/index.mdwn @@ -9,9 +9,7 @@ Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU_Free_Documentation_License|/fdl]]."]]"""]] -[[img logo.png alt="[] HURD-Wiki"]] - -Welcome to the **new** GNU Hurd wiki! +Welcome to the GNU Hurd! **There is a huge bunch of unpolished stuff on here, please help us to tidy things up!** Comments about how that could be tackled are best posted onto @@ -72,9 +70,9 @@ Find more information about it at the There are [[various_possibilities|hurd/running]] of running a GNU/Hurd system. -And this wiki is living proof of the usability of the Hurd, as it is served by a -Debian GNU/Hurd system. More people using GNU in production can be found on -[[Hurd/WhoRunsGNU]]. +And these web pages are a living proof of the usability of the Hurd, as they +are rendered on a Debian GNU/Hurd system. More people using GNU Hurd in +production can be found on [[Hurd/WhoRunsGNU]]. ## What is the Hurd? @@ -121,9 +119,8 @@ Functional systems are installable in a dual-boot configuration. Development systems are currently mostly based on the [[Debian_GNU/Hurd|hurd/running/debian]] port sponsored by the [Debian project](http://www.debian.org/). -Community resources for related projects focus around the official website -, this site at , the -[[mailing_lists]] and the [[IRC_channels|IRC]]. +Community resources for related projects focus around these pages, +, the [[mailing_lists]] and the [[IRC_channels|IRC]]. If you want to see the current discussions in the Hurd project, please have a look at the [bug-hurd mailinglist archives](http://lists.gnu.org/pipermail/bug-hurd/). @@ -134,11 +131,11 @@ the [bug-hurd mailinglist archives](http://lists.gnu.org/pipermail/bug-hurd/). ## How is this site arranged? The menu on the upper right corner provides a rough structuring about the -available content. Just follow those topics and explore the wiki. +available content. Just follow those topics and explore these pages. Further information about this site and how it was created can be found in the [[colophon]]. ---- -This wiki is powered by [ikiwiki](http://ikiwiki.info/). +These pages are powered by [ikiwiki](http://ikiwiki.info/). diff --git a/index/discussion.mdwn b/index/discussion.mdwn index aec8711d..9d40f011 100644 --- a/index/discussion.mdwn +++ b/index/discussion.mdwn @@ -10,7 +10,8 @@ is included in the section entitled # TODO -Please add your comments here about what you think needs to be done on the wiki. +Please add your comments here about what you think needs to be done on these +web pages. ## What to Add diff --git a/logo.png b/logo.png deleted file mode 100644 index 2090f9db..00000000 Binary files a/logo.png and /dev/null differ diff --git a/mailing_lists.mdwn b/mailing_lists.mdwn index 9f16c341..130178a8 100644 --- a/mailing_lists.mdwn +++ b/mailing_lists.mdwn @@ -62,7 +62,7 @@ Hurd-specific questions; for users of the Hurd. -Discussion of the website and this wiki. +Discussion of the web site. ## l4-hurd diff --git a/render_locally b/render_locally index 67c96fdb..e1c27748 100755 --- a/render_locally +++ b/render_locally @@ -15,7 +15,7 @@ dest=$src.rendered && ikiwiki \ --verbose \ - --wikiname GNU\ Hurd\ wiki \ + --wikiname GNU\ Hurd \ --templatedir "$src"/.templates \ --userdir user \ --no-usedirs \ @@ -33,4 +33,4 @@ ikiwiki \ "$src" "$dest" && echo && -echo Now\ open\ \`"$dest"/index.html\'' to browse the wiki pages.' +echo Now\ open\ \`"$dest"/index.html\'' to browse the web pages.' -- cgit v1.3.1 From 262b8f4401d882c3dfd8d0e5450ed5521a25cd02 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 20 Nov 2008 18:57:05 +0100 Subject: ikiwiki.setup: New file. Use it in `render_locally' instead of repeating all configuration. Also add a `--official' option. --- ikiwiki.setup | 270 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ render_locally | 52 +++++------ 2 files changed, 296 insertions(+), 26 deletions(-) create mode 100644 ikiwiki.setup (limited to 'render_locally') diff --git a/ikiwiki.setup b/ikiwiki.setup new file mode 100644 index 00000000..7f09d8aa --- /dev/null +++ b/ikiwiki.setup @@ -0,0 +1,270 @@ +#!/usr/bin/perl +# Setup file for ikiwiki. +# +# Passing this to ikiwiki --setup will make ikiwiki generate +# wrappers and build the wiki. +# +# Remember to re-run ikiwiki --setup any time you edit this file. + +require IkiWiki::Setup::Standard; + +my $root = $ENV{ROOT}; + +my $srcdir; +my $destdir; +my $cgi_wrapper = ''; +my $git_wrapper = ''; +my $gitorigin_branch = ''; + +if (defined $ENV{WEB_SERVER}) +{ + $srcdir = $root.'/hurd-web'; + $destdir = $root.'/public_html'; + $cgi_wrapper = $root.'/hurd-web.cgi'; + $git_wrapper = $root.'/hurd-web.update'; + $gitorigin_branch = 'origin'; +} +else +{ + $srcdir = $root; + $destdir = $ENV{DESTDIR} || $srcdir.'.rendered'; +} + +IkiWiki::Setup::Standard->import({ + # name of the wiki + wikiname => 'GNU Hurd', + # contact email for wiki + adminemail => 'tschwinge@gnu.org', + # users who are wiki admins + adminuser => [qw{tschwinge}], + # users who are banned from the wiki + banned_users => [], + # where the source of the wiki is located + srcdir => $srcdir, + # where to build the wiki + destdir => $destdir, + # base url to the wiki + url => 'http://www.bddebian.com:8888/~hurd-web', + # url to the ikiwiki.cgi + cgiurl => 'http://www.bddebian.com:8888/cgi-bin/hurd-web-ikiwiki.cgi', + # cgi wrapper to generate + cgi_wrapper => $cgi_wrapper, + # mode for cgi_wrapper (can safely be made suid) + cgi_wrappermode => '06755', + # rcs backend to use + rcs => 'git', + # plugins to add to the default configuration + add_plugins => [qw{goodstuff editdiff edittemplate favicon html sidebar table txt copyright license texinfo}], + # plugins to disable + disable_plugins => [], + # location of template files + templatedir => $srcdir.'/.templates', + # base wiki source location + #underlaydir => '/usr/share/ikiwiki/basewiki', + # display verbose messages when building? + verbose => 1, + # log to syslog? + syslog => 0, + # create output files named page/index.html? + usedirs => 1, + # use '!'-prefixed preprocessor directives? + prefix_directives => 0, + # use page/index.mdwn source files + indexpages => 0, + # enable Discussion pages? + discussion => 1, + # only send cookies over SSL connections? + sslcookie => 0, + # extension to use for new pages + default_pageext => 'mdwn', + # extension to use for html files + htmlext => 'html', + # strftime format string to display date + timeformat => '%c', + # UTF-8 locale to use + locale => 'en_US.utf8', + # put user pages below specified page + userdir => 'user', + # how many backlinks to show before hiding excess (0 to show all) + numbacklinks => 10, + # attempt to hardlink source files? (optimisation for large files) + hardlink => 1, + # force ikiwiki to use a particular umask + #umask => 022, + # extra library and plugin directory + libdir => $srcdir.'/.library', + # environment variables + ENV => {}, + # regexp of source files to ignore + #exclude => '\\.wav$', + # specifies the characters that are allowed in source filenames + wiki_file_chars => '-[:alnum:]+/.:_', + # allow symlinks in the path leading to the srcdir (potentially insecure) + #allow_symlinks_before_srcdir => 0, + + # git plugin + # git hook to generate + git_wrapper => $git_wrapper, + # mode for git_wrapper (can safely be made suid) + git_wrappermode => '0700', + # git pre-receive hook to generate + #git_test_receive_wrapper => '/git/wiki.git/hooks/pre-receive', + # unix users whose commits should be checked by the pre-receive hook + #untrusted_committers => [], + # gitweb url to show file history ([[file]] substituted) + historyurl => 'http://www.bddebian.com:8888/gitweb/?p=hurd-web;a=history;f=[[file]]', + # gitweb url to show a diff ([[sha1_to]], [[sha1_from]], [[sha1_parent]], [[sha1_commit]] and [[file]] substituted) + diffurl => 'http://www.bddebian.com:8888/gitweb/?p=hurd-web;a=blobdiff;h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_parent]];f=[[file]]', + # where to pull and push changes (set to empty string to disable) + gitorigin_branch => $gitorigin_branch, + # branch that the wiki is stored in + gitmaster_branch => 'master', + + # aggregate plugin + # enable aggregation to internal pages? + #aggregateinternal => 0, + # allow aggregation to be triggered via the web? + #aggregate_webtrigger => 0, + + # anonok plugin + # PageSpec to limit which pages anonymous users can edit + #anonok_pagespec => '*/discussion', + + # attachment plugin + # enhanced PageSpec specifying what attachments are allowed + #allowed_attachments => 'virusfree() and mimetype(image/*) and maxsize(50kb)', + # virus checker program (reads STDIN, returns nonzero if virus found) + #virus_checker => 'clamdscan -', + + # bzr plugin + # bzr post-commit hook to generate + #bzr_wrapper => '', + # mode for bzr_wrapper (can safely be made suid) + #bzr_wrappermode => '06755', + # url to show file history, using loggerhead ([[file]] substituted) + #historyurl => '', + # url to view a diff, using loggerhead ([[file]] and [[r2]] substituted) + #diffurl => 'http://example.com/revision?start_revid=[[r2]]#[[file]]-s', + + # calendar plugin + # base of the archives hierarchy + #archivebase => 'archives', + + # htmlscrubber plugin + # PageSpec specifying pages not to scrub + #htmlscrubber_skip => '!*/Discussion', + + # inline plugin + # enable rss feeds by default? + rss => 1, + # enable atom feeds by default? + atom => 1, + # allow rss feeds to be used? + #allowrss => 0, + # allow atom feeds to be used? + #allowatom => 0, + # urls to ping (using XML-RPC) on feed update + pingurl => [], + + # listdirectives plugin + # directory in srcdir that contains directive descriptions + #directive_description_dir => 'ikiwiki/directive', + + # lockedit plugin + # PageSpec controlling which pages are locked + #locked_pages => '!*/Discussion', + + # mdwn plugin + # enable multimarkdown features? + #multimarkdown => 0, + + # mercurial plugin + # mercurial post-commit hook to generate + #mercurial_wrapper => '', + # mode for mercurial_wrapper (can safely be made suid) + #mercurial_wrappermode => '06755', + # url to hg serve'd repository, to show file history ([[file]] substituted) + #historyurl => 'http://example.com:8000/log/tip/[[file]]', + # url to hg serve'd repository, to show diff ([[file]] and [[r2]] substituted) + #diffurl => 'http://localhost:8000/?fd=[[r2]];file=[[file]]', + + # mirrorlist plugin + # list of mirrors + #mirrorlist => {}, + + # openid plugin + # an url where users can signup for an OpenID + #openidsignup => 'http://myopenid.com/', + + # passwordauth plugin + # a password that must be entered when signing up for an account + #account_creation_password => 's3cr1t', + # cost of generating a password using Authen::Passphrase::BlowfishCrypt + #password_cost => 8, + + # pinger plugin + # how many seconds to try pinging before timing out + #pinger_timeout => 15, + + # prettydate plugin + # format to use to display date + #prettydateformat => '%X, %B %o, %Y', + + # recentchanges plugin + # name of the recentchanges page + recentchangespage => 'recent_changes', + # number of changes to track + recentchangesnum => 100, + + # search plugin + # path to the omega cgi program + #omega_cgi => '/usr/lib/cgi-bin/omega/omega', + + # svn plugin + # subversion repository location + #svnrepo => '/svn/wiki', + # path inside repository where the wiki is located + #svnpath => 'trunk', + # svn post-commit hook to generate + #svn_wrapper => '/svn/wikirepo/hooks/post-commit', + # mode for svn_wrapper (can safely be made suid) + #svn_wrappermode => '04755', + # viewvc url to show file history ([[file]] substituted) + #historyurl => 'http://svn.example.org/trunk/[[file]]', + # viewvc url to show a diff ([[file]], [[r1]], and [[r2]] substituted) + #diffurl => 'http://svn.example.org/trunk/[[file]]?root=wiki&r1=[[r1]]&r2=[[r2]]', + + # tag plugin + # parent page tags are located under + #tagbase => 'tag', + + # teximg plugin + # Should teximg use dvipng to render, or dvips and convert? + #teximg_dvipng => '', + # LaTeX prefix for teximg plugin + #teximg_prefix => '\\documentclass{article} + #\\usepackage{amsmath} + #\\usepackage{amsfonts} + #\\usepackage{amssymb} + #\\pagestyle{empty} + #\\begin{document} + #', + # LaTeX postfix for teximg plugin + #teximg_postfix => '\\end{document}', + + # tla plugin + # tla post-commit hook to generate + #tla_wrapper => '', + # mode for tla_wrapper (can safely be made suid) + #tla_wrappermode => '06755', + # url to show file history ([[file]] substituted) + #historyurl => '', + # url to show a diff ([[file]] and [[rev]] substituted) + #diffurl => '', + + # websetup plugin + # list of plugins that cannot be enabled/disabled via the web interface + #websetup_force_plugins => [], + # show unsafe settings, read-only, in web interface? + #websetup_show_unsafe => 1, +}) diff --git a/render_locally b/render_locally index e1c27748..ddd7afc6 100755 --- a/render_locally +++ b/render_locally @@ -1,36 +1,36 @@ #!/bin/sh -# Render the pages of this repository for your local browsing pleasure. - -# We use ``--no-usedirs'' here, because when browsing local files, the web -# browsers don't display `index.html' files by default when a hyperlink -# referencing a directory is being opened. +# Render the pages of this repository. # Written by Thomas Schwinge +export ROOT && ROOT=$(readlink -f "$(dirname "$0")") && -# Need a symlink-free path. -src=$(readlink -f "$(dirname "$0")") && -dest=$src.rendered && +case $1 in + --official) + # Use this for rendering the set of pages which are to be installed under + # . + shift && + export TZ && TZ=UTC && + export DESTDIR && DESTDIR=$ROOT.rendered.official && + set x \ + --set wikistatedir="$ROOT"/.ikiwiki-official \ + "$@" && + shift;; + *) + # Use ``--no-usedirs'' here, because when browsing local files, the web + # browsers don't display `index.html' files by default when a hyperlink + # referencing a directory is being opened. + set x \ + --no-usedirs \ + "$@" && + shift;; +esac && ikiwiki \ - --verbose \ - --wikiname GNU\ Hurd \ - --templatedir "$src"/.templates \ - --userdir user \ - --no-usedirs \ - --plugin favicon \ - --plugin goodstuff \ - --plugin html \ - --plugin sidebar \ - --plugin table \ - --plugin txt \ - --libdir "$src"/.library \ - --plugin copyright \ - --plugin license \ - --plugin texinfo \ - ${1+"$@"} \ - "$src" "$dest" && + --setup "$ROOT"/ikiwiki.setup \ + --refresh \ + "$@" && echo && -echo Now\ open\ \`"$dest"/index.html\'' to browse the web pages.' +echo Now\ open\ \`"${DESTDIR-"$ROOT".rendered}"/index.html\'' to browse the web pages.' -- cgit v1.3.1 From ac4e0e0ad26488f08323e1d37a684e333c800734 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sun, 23 Nov 2008 00:10:09 +0100 Subject: Stay on www.gnu.org. --- render_locally | 1 + 1 file changed, 1 insertion(+) (limited to 'render_locally') diff --git a/render_locally b/render_locally index ddd7afc6..c3098d11 100755 --- a/render_locally +++ b/render_locally @@ -15,6 +15,7 @@ case $1 in export DESTDIR && DESTDIR=$ROOT.rendered.official && set x \ --set wikistatedir="$ROOT"/.ikiwiki-official \ + --url http://www.gnu.org/software/hurd \ "$@" && shift;; *) -- cgit v1.3.1 From 9e7a5b8a0628331aaf9737cd8825093d2a2a43cc Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sun, 23 Nov 2008 00:57:41 +0100 Subject: When creating the official pages, use ``--no-usedirs'', so that not too many separate directories have to be created. --- render_locally | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'render_locally') diff --git a/render_locally b/render_locally index c3098d11..29ab828b 100755 --- a/render_locally +++ b/render_locally @@ -9,13 +9,15 @@ export ROOT && ROOT=$(readlink -f "$(dirname "$0")") && case $1 in --official) # Use this for rendering the set of pages which are to be installed under - # . + # . Use ``--no-usedirs'' here, so that + # not too many separate directories have to be created. shift && export TZ && TZ=UTC && export DESTDIR && DESTDIR=$ROOT.rendered.official && set x \ --set wikistatedir="$ROOT"/.ikiwiki-official \ --url http://www.gnu.org/software/hurd \ + --no-usedirs \ "$@" && shift;; *) -- cgit v1.3.1 From a732793347d0d7ffe4b8f490cb79ac79315369b5 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 19 May 2009 17:15:13 +0200 Subject: Support ikiwiki's w3mmode. --- contributing/web_pages.mdwn | 32 ++++++++++++++++++++++++++++++++ render_locally | 39 +++++++++++++++++++++++++++++++++++---- 2 files changed, 67 insertions(+), 4 deletions(-) (limited to 'render_locally') diff --git a/contributing/web_pages.mdwn b/contributing/web_pages.mdwn index d2ab93f6..f1388bc2 100644 --- a/contributing/web_pages.mdwn +++ b/contributing/web_pages.mdwn @@ -161,6 +161,38 @@ You can also locally get the whole set of pages rendered to HTML: Now open `hurd-web.rendered/index.html' to browse the pages. +### ikiwiki's `w3mmode` + +If you're a [`w3m`](http://w3m.sourceforge.net/) user, you can also use `w3m` +to edit your files locally, as it were done through the web interface at +. + +First, generate the wrapper. Unless the configuration is changed, this has to +be done only once. + + $ hurd-web/render_locally --w3m-wrapper + successfully generated /home/thomas/.ikiwiki/wrappers/hurd-web.cgi + +Render the pages: + + $ hurd-web/render_locally --w3m + [...] + scanning contributing/web_pages.mdwn + rendering contributing/web_pages.mdwn + + Now open `hurd-web.rendered.w3m/index.html' to browse the pages. + +Invoke `w3m`: + + $ w3m hurd-web.rendered.w3m/index.html + +Or, to directly create a new page: + + $ w3m 'file:///$LIB/ikiwiki-w3m.cgi/hurd-web.cgi?page=open_issues/gnumach_has_a_bug&do=create' + +Note that the changes you do via `w3m` will not be committed to the VCS (see +[[render_locally]] for details). + ## Publish Your Changes If you like what you've done, then it's now time to publish your changes. diff --git a/render_locally b/render_locally index 29ab828b..ba0dd9d8 100755 --- a/render_locally +++ b/render_locally @@ -4,22 +4,51 @@ # Written by Thomas Schwinge +# See `contributing/web_pages' for further information. + export ROOT && ROOT=$(readlink -f "$(dirname "$0")") && case $1 in --official) # Use this for rendering the set of pages which are to be installed under - # . Use ``--no-usedirs'' here, so that - # not too many separate directories have to be created. + # . shift && export TZ && TZ=UTC && export DESTDIR && DESTDIR=$ROOT.rendered.official && + # Use ``--no-usedirs'' here, so that not too many separate directories have + # to be created. set x \ --set wikistatedir="$ROOT"/.ikiwiki-official \ --url http://www.gnu.org/software/hurd \ --no-usedirs \ "$@" && shift;; + --w3m-wrapper) + shift && + export NO_MSG && NO_MSG=y && + # Disable the configured VCS, as the CGI wrapper together with using the + # anonok plugin inhibits the propagation of authorship information. + set x \ + --cgi --wrapper ~/.ikiwiki/wrappers/hurd-web.cgi \ + --plugin anonok \ + --rcs norcs \ + "$@" && + shift && + exec \ + "$0" \ + --w3m \ + "$@";; + --w3m) + shift && + export DESTDIR && DESTDIR=$ROOT.rendered.w3m && + set x \ + --set wikistatedir="$ROOT"/.ikiwiki-w3m \ + --cgiurl hurd-web.cgi --w3mmode \ + "$@" && + shift && + exec \ + "$0" \ + "$@";; *) # Use ``--no-usedirs'' here, because when browsing local files, the web # browsers don't display `index.html' files by default when a hyperlink @@ -35,5 +64,7 @@ ikiwiki \ --refresh \ "$@" && -echo && -echo Now\ open\ \`"${DESTDIR-"$ROOT".rendered}"/index.html\'' to browse the web pages.' +if [ ${NO_MSG-n} = y ]; then :; else + echo && + echo Now\ open\ \`"${DESTDIR-"$ROOT".rendered}"/index.html\'' to browse the web pages.' +fi -- cgit v1.3.1 From a038ebf6fbd7e715b06850c5d6d9f02a20b68226 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 15 Oct 2009 14:55:29 +0200 Subject: render_locally: Set LC_MESSAGES=C. --- render_locally | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'render_locally') diff --git a/render_locally b/render_locally index ba0dd9d8..f4a249a8 100755 --- a/render_locally +++ b/render_locally @@ -2,12 +2,15 @@ # Render the pages of this repository. -# Written by Thomas Schwinge +# Written by Thomas Schwinge . # See `contributing/web_pages' for further information. export ROOT && ROOT=$(readlink -f "$(dirname "$0")") && +# Don't translate. +export LC_MESSAGES && LC_MESSAGES=C && + case $1 in --official) # Use this for rendering the set of pages which are to be installed under -- cgit v1.3.1 From 6b1c0573eaff7d22f625452cfbfe2967c0647ea2 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 8 Jun 2010 10:34:13 +0000 Subject: Update to ikiwiki b10d353490197b576ef7bf2e8bf8016039efbd2d. --- .templates/editpage.tmpl | 25 +++- .templates/newsitem.tmpl | 52 ++++---- .templates/page.tmpl | 138 +++++++++++++++------- ikiwiki.setup | 302 +++++++++++++++++++++++++---------------------- local.css | 17 ++- render_locally | 4 + 6 files changed, 315 insertions(+), 223 deletions(-) (limited to 'render_locally') diff --git a/.templates/editpage.tmpl b/.templates/editpage.tmpl index 45060ffe..53ce934e 100644 --- a/.templates/editpage.tmpl +++ b/.templates/editpage.tmpl @@ -1,4 +1,3 @@ -
@@ -7,19 +6,26 @@ +
    -Page location: -Page type: +
  1. + + +
  2. -
    +

  3. +
  4. -Optional comment about this change:
    +
  5. +
    +
  6. +
+ +
+
+Diff: +
+
+ +
+
diff --git a/.templates/newsitem.tmpl b/.templates/newsitem.tmpl index 1c8f2ae8..3b4fded1 100644 --- a/.templates/newsitem.tmpl +++ b/.templates/newsitem.tmpl @@ -1,59 +1,61 @@ -
+
-
- - +
+ - + - - +
+ - - -
+
+ + +
-
+
-
+
-
+
-
+
- - + + -
+
-
+ diff --git a/.templates/page.tmpl b/.templates/page.tmpl index d546a88f..45d28697 100644 --- a/.templates/page.tmpl +++ b/.templates/page.tmpl @@ -1,85 +1,129 @@ - + + + - + + + + + + + <TMPL_VAR TITLE> - + + + + - + + - - - + + + - - -
+
-
+
-
+
@@ -88,37 +132,38 @@
Comments on this page are closed.
-
+
- + + + diff --git a/ikiwiki.setup b/ikiwiki.setup index eb31a420..89130e2b 100644 --- a/ikiwiki.setup +++ b/ikiwiki.setup @@ -1,9 +1,10 @@ #!/usr/bin/perl -# Setup file for ikiwiki. # +# Setup file for ikiwiki. +# # Passing this to ikiwiki --setup will make ikiwiki generate # wrappers and build the wiki. -# +# # Remember to re-run ikiwiki --setup any time you edit this file. require IkiWiki::Setup::Standard; @@ -59,7 +60,7 @@ IkiWiki::Setup::Standard->import({ add_plugins => [qw{goodstuff cutpaste editdiff edittemplate favicon html sidebar table txt copyright license texinfo}], # plugins to disable disable_plugins => [], - # location of template files + # additional directory to search for template files templatedir => $srcdir.'/.templates', # base wiki source location #underlaydir => '/usr/share/ikiwiki/basewiki', @@ -77,6 +78,8 @@ IkiWiki::Setup::Standard->import({ discussion => 1, # name of Discussion pages discussionpage => 'Discussion', + # generate HTML5? (experimental) + html5 => 0, # only send cookies over SSL connections? sslcookie => 0, # extension to use for new pages @@ -101,13 +104,20 @@ IkiWiki::Setup::Standard->import({ libdir => $srcdir.'/.library', # environment variables ENV => {}, - # regexp of source files to ignore - #exclude => '\\.wav$', + # regexp of normally excluded files to include + #include => '^\\.htaccess$', + # regexp of files that should be skipped + #exclude => '^(*\\.private|Makefile)$', # specifies the characters that are allowed in source filenames wiki_file_chars => '-[:alnum:]+/.:_', # allow symlinks in the path leading to the srcdir (potentially insecure) #allow_symlinks_before_srcdir => 0, + ###################################################################### + # core plugins + # (editpage, git, htmlscrubber, inline, link, meta) + ###################################################################### + # git plugin # git hook to generate git_wrapper => $git_wrapper, @@ -126,22 +136,32 @@ IkiWiki::Setup::Standard->import({ # branch that the wiki is stored in gitmaster_branch => 'master', - # aggregate plugin - # enable aggregation to internal pages? - #aggregateinternal => 1, - # allow aggregation to be triggered via the web? - #aggregate_webtrigger => 0, + # htmlscrubber plugin + # PageSpec specifying pages not to scrub + #htmlscrubber_skip => '!*/Discussion', + + # inline plugin + # enable rss feeds by default? + rss => 1, + # enable atom feeds by default? + atom => 1, + # allow rss feeds to be used? + #allowrss => 0, + # allow atom feeds to be used? + #allowatom => 0, + # urls to ping (using XML-RPC) on feed update + pingurl => [], + + ###################################################################### + # auth plugins + # (anonok, blogspam, httpauth, lockedit, moderatedcomments, + # opendiscussion, openid, passwordauth, signinedit) + ###################################################################### # anonok plugin # PageSpec to limit which pages anonymous users can edit #anonok_pagespec => '*/discussion', - # attachment plugin - # enhanced PageSpec specifying what attachments are allowed - #allowed_attachments => 'virusfree() and mimetype(image/*) and maxsize(50kb)', - # virus checker program (reads STDIN, returns nonzero if virus found) - #virus_checker => 'clamdscan -', - # blogspam plugin # PageSpec of pages to check for spam #blogspam_pagespec => 'postcomment(*)', @@ -150,23 +170,69 @@ IkiWiki::Setup::Standard->import({ # blogspam server XML-RPC url #blogspam_server => '', - # bzr plugin - # bzr post-commit hook to generate - #bzr_wrapper => '', - # mode for bzr_wrapper (can safely be made suid) - #bzr_wrappermode => '06755', - # url to show file history, using loggerhead ([[file]] substituted) - #historyurl => '', - # url to view a diff, using loggerhead ([[file]] and [[r2]] substituted) - #diffurl => 'http://example.com/revision?start_revid=[[r2]]#[[file]]-s', + # httpauth plugin + # url to redirect to when authentication is needed + #cgiauthurl => 'http://example.com/wiki/auth/ikiwiki.cgi', + # PageSpec of pages where only httpauth will be used for authentication + #httpauth_pagespec => '!*/Discussion', - # calendar plugin - # base of the archives hierarchy - #archivebase => 'archives', + # lockedit plugin + # PageSpec controlling which pages are locked + #locked_pages => '!*/Discussion', - # camelcase plugin - # list of words to not turn into links - #camelcase_ignore => [], + # moderatedcomments plugin + # PageSpec matching users or comment locations to moderate + #moderate_pagespec => '*', + + # passwordauth plugin + # a password that must be entered when signing up for an account + #account_creation_password => 's3cr1t', + # cost of generating a password using Authen::Passphrase::BlowfishCrypt + #password_cost => 8, + + ###################################################################### + # format plugins + # (creole, highlight, hnb, html, mdwn, otl, po, rawhtml, textile, + # txt) + ###################################################################### + + # highlight plugin + # types of source files to syntax highlight + #tohighlight => '.c .h .cpp .pl .py Makefile:make', + + # mdwn plugin + # enable multimarkdown features? + #multimarkdown => 0, + + # po plugin + # master language (non-PO files) + #po_master_language => { + # code => 'en', + # name => 'English' + #}, + # slave languages (PO files) + #po_slave_languages => { + # de => 'Deutsch', + # es => 'Español', + # fr => 'Français' + #}, + # PageSpec controlling which pages are translatable + #po_translatable_pages => '* and !*/Discussion', + # internal linking behavior (default/current/negotiated) + #po_link_to => 'current', + + ###################################################################### + # web plugins + # (attachment, comments, editdiff, edittemplate, getsource, + # google, mirrorlist, remove, rename, repolist, search, + # websetup, wmd) + ###################################################################### + + # attachment plugin + # enhanced PageSpec specifying what attachments are allowed + #allowed_attachments => 'virusfree() and mimetype(image/*) and maxsize(50kb)', + # virus checker program (reads STDIN, returns nonzero if virus found) + #virus_checker => 'clamdscan -', # comments plugin # PageSpec of pages where comments are allowed @@ -182,75 +248,81 @@ IkiWiki::Setup::Standard->import({ # commit comments to the VCS #comments_commit => 1, - # darcs plugin - # wrapper to generate (set as master repo apply hook) - #darcs_wrapper => '/darcs/repo/_darcs/ikiwiki-wrapper', - # mode for darcs_wrapper (can safely be made suid) - #darcs_wrappermode => '06755', - # darcsweb url to show file history ([[file]] substituted) - #historyurl => 'http://darcs.example.com/darcsweb.cgi?r=wiki;a=filehistory;f=[[file]]', - # darcsweb url to show a diff ([[hash]] and [[file]] substituted) - #diffurl => 'http://darcs.example.com/darcsweb.cgi?r=wiki;a=filediff;h=[[hash]];f=[[file]]', - # getsource plugin # Mime type for returned source. #getsource_mimetype => 'text/plain; charset=utf-8', - # highlight plugin - # types of source files to syntax highlight - #tohighlight => '.c .h .cpp .pl .py Makefile:make', + # mirrorlist plugin + # list of mirrors + #mirrorlist => {}, - # htmlscrubber plugin - # PageSpec specifying pages not to scrub - #htmlscrubber_skip => '!*/Discussion', + # repolist plugin + # URIs of repositories containing the wiki's source + #repositories => [qw{svn://svn.example.org/wiki/trunk}], - # inline plugin - # enable rss feeds by default? - rss => 1, - # enable atom feeds by default? - atom => 1, - # allow rss feeds to be used? - #allowrss => 0, - # allow atom feeds to be used? - #allowatom => 0, - # urls to ping (using XML-RPC) on feed update - pingurl => [], + # search plugin + # path to the omega cgi program + #omega_cgi => '/usr/lib/cgi-bin/omega/omega', + + # websetup plugin + # list of plugins that cannot be enabled/disabled via the web interface + #websetup_force_plugins => [], + # list of additional setup field keys to treat as unsafe + #websetup_unsafe => [], + # show unsafe settings, read-only, in web interface? + #websetup_show_unsafe => 1, + + ###################################################################### + # widget plugins + # (calendar, color, conditional, cutpaste, date, format, fortune, + # graphviz, haiku, img, linkmap, listdirectives, map, more, + # orphans, pagecount, pagestats, poll, polygen, postsparkline, + # progress, shortcut, sparkline, table, template, teximg, toc, + # toggle, version) + ###################################################################### + + # calendar plugin + # base of the archives hierarchy + #archivebase => 'archives', + # PageSpec of pages to include in the archives; used by ikiwiki-calendar command + #archive_pagespec => 'posts/* and !*/Discussion', # listdirectives plugin # directory in srcdir that contains directive descriptions #directive_description_dir => 'ikiwiki/directive', - # lockedit plugin - # PageSpec controlling which pages are locked - #locked_pages => '!*/Discussion', - - # mdwn plugin - # enable multimarkdown features? - #multimarkdown => 0, - - # mercurial plugin - # mercurial post-commit hook to generate - #mercurial_wrapper => '', - # mode for mercurial_wrapper (can safely be made suid) - #mercurial_wrappermode => '06755', - # url to hg serve'd repository, to show file history ([[file]] substituted) - #historyurl => 'http://example.com:8000/log/tip/[[file]]', - # url to hg serve'd repository, to show diff ([[file]] and [[r2]] substituted) - #diffurl => 'http://localhost:8000/?fd=[[r2]];file=[[file]]', + # teximg plugin + # Should teximg use dvipng to render, or dvips and convert? + #teximg_dvipng => '', + # LaTeX prefix for teximg plugin + #teximg_prefix => '\\documentclass{article} + #\\usepackage{amsmath} + #\\usepackage{amsfonts} + #\\usepackage{amssymb} + #\\pagestyle{empty} + #\\begin{document} + #', + # LaTeX postfix for teximg plugin + #teximg_postfix => '\\end{document}', - # mirrorlist plugin - # list of mirrors - #mirrorlist => {}, + ###################################################################### + # other plugins + # (aggregate, autoindex, brokenlinks, camelcase, ddate, embed, + # favicon, goodstuff, htmlbalance, localstyle, pagetemplate, + # pingee, pinger, prettydate, recentchanges, recentchangesdiff, + # relativedate, rsync, sidebar, smiley, sortnaturally, tag, + # testpagespec, underlay) + ###################################################################### - # openid plugin - # an url where users can signup for an OpenID - #openidsignup => 'http://myopenid.com/', + # aggregate plugin + # enable aggregation to internal pages? + #aggregateinternal => 1, + # allow aggregation to be triggered via the web? + #aggregate_webtrigger => 0, - # passwordauth plugin - # a password that must be entered when signing up for an account - #account_creation_password => 's3cr1t', - # cost of generating a password using Authen::Passphrase::BlowfishCrypt - #password_cost => 8, + # camelcase plugin + # list of words to not turn into links + #camelcase_ignore => [], # pinger plugin # how many seconds to try pinging before timing out @@ -266,69 +338,21 @@ IkiWiki::Setup::Standard->import({ # number of changes to track recentchangesnum => 100, - # repolist plugin - # URIs of repositories containing the wiki's source - #repositories => [qw{svn://svn.example.org/wiki/trunk}], - # rsync plugin # command to run to sync updated pages #rsync_command => 'rsync -qa --delete . user@host:/path/to/docroot/', - # search plugin - # path to the omega cgi program - #omega_cgi => '/usr/lib/cgi-bin/omega/omega', - - # svn plugin - # subversion repository location - #svnrepo => '/svn/wiki', - # path inside repository where the wiki is located - #svnpath => 'trunk', - # svn post-commit hook to generate - #svn_wrapper => '/svn/wikirepo/hooks/post-commit', - # mode for svn_wrapper (can safely be made suid) - #svn_wrappermode => '04755', - # viewvc url to show file history ([[file]] substituted) - #historyurl => 'http://svn.example.org/trunk/[[file]]', - # viewvc url to show a diff ([[file]], [[r1]], and [[r2]] substituted) - #diffurl => 'http://svn.example.org/trunk/[[file]]?root=wiki&r1=[[r1]]&r2=[[r2]]', + # sidebar plugin + # show sidebar page on all pages? + #global_sidebars => 1, # tag plugin # parent page tags are located under tagbase => 'tag', - - # teximg plugin - # Should teximg use dvipng to render, or dvips and convert? - #teximg_dvipng => '', - # LaTeX prefix for teximg plugin - #teximg_prefix => '\\documentclass{article} - #\\usepackage{amsmath} - #\\usepackage{amsfonts} - #\\usepackage{amssymb} - #\\pagestyle{empty} - #\\begin{document} - #', - # LaTeX postfix for teximg plugin - #teximg_postfix => '\\end{document}', - - # tla plugin - # tla post-commit hook to generate - #tla_wrapper => '', - # mode for tla_wrapper (can safely be made suid) - #tla_wrappermode => '06755', - # url to show file history ([[file]] substituted) - #historyurl => '', - # url to show a diff ([[file]] and [[rev]] substituted) - #diffurl => '', + # autocreate new tag pages? + #tag_autocreate => 1, # underlay plugin # extra underlay directories to add #add_underlays => '', - # extra template directories to add - #add_templates => '', - - # websetup plugin - # list of plugins that cannot be enabled/disabled via the web interface - #websetup_force_plugins => [], - # show unsafe settings, read-only, in web interface? - #websetup_show_unsafe => 1, }) diff --git a/local.css b/local.css index a275bc07..d705f3b4 100644 --- a/local.css +++ b/local.css @@ -1,6 +1,6 @@ /* ikiwiki local style sheet - Copyright © 2007, 2008, 2009 Free Software Foundation, Inc. + Copyright © 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later @@ -138,7 +138,7 @@ a:hover padding: 0.5em; } -#sidebar +.sidebar { background-color: #f0f0f0; } @@ -159,25 +159,24 @@ a:hover } -/* Variable width. */ -#sidebar +/* Placement. */ +.sidebar { width: auto; - /* ikiwiki's default for `width'. */ - min-width: 20ex; + margin-left: 20px; } /* Less indentation for list items. */ -#sidebar ul +.sidebar ul { padding-left: 2ex; } -#sidebar ul ul +.sidebar ul ul { padding-left: 2.5ex; } /* Make the logo appear centered */ -#sidebar img { +.sidebar img { display: block; margin-left: auto; margin-right: auto; diff --git a/render_locally b/render_locally index f4a249a8..9e257560 100755 --- a/render_locally +++ b/render_locally @@ -20,10 +20,14 @@ case $1 in export DESTDIR && DESTDIR=$ROOT.rendered.official && # Use ``--no-usedirs'' here, so that not too many separate directories have # to be created. + # + # ``--gettime --rebuild'': + # set x \ --set wikistatedir="$ROOT"/.ikiwiki-official \ --url http://www.gnu.org/software/hurd \ --no-usedirs \ + --gettime --rebuild \ "$@" && shift;; --w3m-wrapper) -- cgit v1.3.1 From 6fc97a71b0594afa47781571654e71cb18d4d08a Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 9 Jun 2010 15:15:12 +0200 Subject: .library/IkiWiki/Plugin/reset_mtimes.pm: New. --- .library/IkiWiki/Plugin/reset_mtimes.pm | 84 +++++++++++++++++++++++++++++++++ render_locally | 21 +++++++-- 2 files changed, 100 insertions(+), 5 deletions(-) create mode 100644 .library/IkiWiki/Plugin/reset_mtimes.pm (limited to 'render_locally') diff --git a/.library/IkiWiki/Plugin/reset_mtimes.pm b/.library/IkiWiki/Plugin/reset_mtimes.pm new file mode 100644 index 00000000..a168652b --- /dev/null +++ b/.library/IkiWiki/Plugin/reset_mtimes.pm @@ -0,0 +1,84 @@ +# Copyright © 2010 Thomas Schwinge + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +package IkiWiki::Plugin::reset_mtimes; + +use warnings; +use strict; +use IkiWiki 3.00; + +# This plugin resets pages' / files' mtimes according to the RCS information +# when using --refresh mode. +# +# Note that the files' mtimes are *always* set, even if the file has +# un-committed changes. +# +# + +sub import +{ + hook (type => "needsbuild", + id => "reset_mtimes", + call => \&needsbuild); +} + +sub needsbuild (@) +{ + # Only proceed if --gettime is in effect, as we're clearly not intersted in + # this functionality otherwise. + return unless $config{gettime}; + + my $files = shift; + foreach my $file (@$files) + { + # [TODO. Perhaps not necessary. Can this hook ever be called for + # removed pages -- that need to be ``rebuilt'' in the sense that + # they're to be removed?] Don't bother for pages that don't exist + # anymore. + next unless -e "$config{srcdir}/$file"; + + my $page = pagename ($file); + debug ("needsbuild: <$file> <$page>"); + + # Only ever update -- otherwise ikiwiki shall do its own thing. + if (defined $IkiWiki::pagemtime{$page}) + { + debug ("pagemtime: " . $IkiWiki::pagemtime{$page}); + + my $mtime = 0; + eval + { + $mtime = IkiWiki::rcs_getmtime ($file); + }; + if ($@) + { + print STDERR $@; + } + elsif ($mtime > 0) + { + $IkiWiki::pagemtime{$page} = $mtime; + + # We have to set the actual file's mtime too, as otherwise + # ikiwiki will update it again and again. + utime($mtime, $mtime, "$config{srcdir}/$file"); + } + + debug ("pagemtime: " . $IkiWiki::pagemtime{$page}); + } + } +} + +1 diff --git a/render_locally b/render_locally index 9e257560..ca7856f5 100755 --- a/render_locally +++ b/render_locally @@ -12,27 +12,32 @@ export ROOT && ROOT=$(readlink -f "$(dirname "$0")") && export LC_MESSAGES && LC_MESSAGES=C && case $1 in + # Use this for rendering the set of pages which are to be installed under + # . --official) - # Use this for rendering the set of pages which are to be installed under - # . shift && + export TZ && TZ=UTC && export DESTDIR && DESTDIR=$ROOT.rendered.official && + # Use ``--no-usedirs'' here, so that not too many separate directories have # to be created. # - # ``--gettime --rebuild'': - # + # Use ``--gettime --plugin update_mtimes'' to reset pages' / files' mtimes + # according to the RCS information when using --refresh mode. set x \ --set wikistatedir="$ROOT"/.ikiwiki-official \ --url http://www.gnu.org/software/hurd \ --no-usedirs \ - --gettime --rebuild \ + --gettime --plugin reset_mtimes \ "$@" && shift;; + --w3m-wrapper) shift && + export NO_MSG && NO_MSG=y && + # Disable the configured VCS, as the CGI wrapper together with using the # anonok plugin inhibits the propagation of authorship information. set x \ @@ -41,21 +46,27 @@ case $1 in --rcs norcs \ "$@" && shift && + exec \ "$0" \ --w3m \ "$@";; + --w3m) shift && + export DESTDIR && DESTDIR=$ROOT.rendered.w3m && + set x \ --set wikistatedir="$ROOT"/.ikiwiki-w3m \ --cgiurl hurd-web.cgi --w3mmode \ "$@" && shift && + exec \ "$0" \ "$@";; + *) # Use ``--no-usedirs'' here, because when browsing local files, the web # browsers don't display `index.html' files by default when a hyperlink -- cgit v1.3.1