diff options
-rw-r--r-- | contributing/web_pages.mdwn | 32 | ||||
-rwxr-xr-x | render_locally | 39 |
2 files changed, 67 insertions, 4 deletions
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 +<http://www.bddebian.com:8888/~hurd-web/>. + +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 <tschwinge@gnu.org> +# 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 - # <http://www.gnu.org/software/hurd/>. Use ``--no-usedirs'' here, so that - # not too many separate directories have to be created. + # <http://www.gnu.org/software/hurd/>. 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 |