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. --- render_locally | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) (limited to 'render_locally') 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.2.3