[pmwiki-users] Getting unstyled HTML from the wiki
Joachim Durchholz
jo at durchholz.org
Thu Mar 2 03:03:25 CST 2006
Robin schrieb:
> Is it possible to get completely skin-less HTML from PmWiki? The reason for
> this, is I want to embed a help system into a program. What I would like to
> do is write the documentation on the wiki, and then when I build a version of
> the program, it scrapes the latest version off the wiki page, without the
> skinning, crawls it to pick up the images and linked-to pages, and chucks
> them into the program's build directory.
>
> Would the best way be for me to write a totally minimal skin (pretty much just
> header, footer, and insertion point for the wiki page) and
> use ?skin=something, or is there a better way?
I once wrote a minimal skin, available at
http://www.pmwiki.org/wiki/Cookbook/StrippedSkin .
It's not the "null skin" you're after, but you could start from there
and remove the few paraphernalia left.
You'd probably want to remove these parts:
* <title> ... </title> (well, maybe this one should be kept)
* <link rel="stylesheet" ... />
* <div id="wikifoot">...</div> (but you may want to keep the $StopWatch
line; PmWiki has a simple profiling mechanism, and if it's switched on,
it will leave its results in the place where the template says $Stopwatch)
For a truly minimal result, create /pub/skins/null/pmwiki.tmpl, with
just this single line:
<!--PageText--><!--/PageText-->
This skin will give you the "naked HTML contents", ready for inclusion
into another HTML page, and leave out all the <html>, <header>, <body>
etc. fluff.
To use the skin, install the SkinChange recipe from
http://www.pmwiki.org/wiki/Cookbook/SkinChange and use "...?skin=null"
on the URL.
(I'll leave it as an exercize to the reader to document this all in
http://www.pmwiki.org/wiki/Cookbook/Skins .)
HTH
Jo
More information about the pmwiki-users
mailing list