[dokuwiki] Re: Is there a way to set a page name other than the first heading?

  • From: Chris G <cl@xxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 2 Apr 2010 11:38:17 +0100

On Fri, Apr 02, 2010 at 11:54:10AM +0200, Andreas Gohr wrote:
> > I'd like to be able to give DokuWiki pages 'nice' names which aren't
> > the first heading on the page.
> 
> No.
> 
> > For example I have a page whose name (i.e.  the filename before the
> > .txt) is whatsort and whose first heading is "What sort of boat to
> > buy".
> 
> Why don't you give that page a sensible name? Why not just "boats"? Or
> "boats2buy"? If that thing would be a Word document you wouldn't call
> it "whatsort.doc", wouldn't you?
> 
No, but since DokuWiki makes everything lower case *and* removes
accents etc. the page names really can't look nice.  If I name the
page 'What sort' then DokuWiki will change it to what_sort which isn't
nearly so pretty.  

I can't just call it 'boats' because 90% of the pages would be called
'boats', it's a Wiki about buying a boat!  :-)


I have found the solution though, it's very simple, the meta plugin
allows me to do *exactly* what I want.  With the meta plugin installed
I just put:-

    ~~meta:title=What sort~~

on the page and it's done.



There is a sub-plot to this, I've written a reStructuredText parsing
plugin and have whole pages imported from elsewhere which are written
in reStructuredText.  These have their own titles etc. which aren't
visible to DokuWiki and I wanted an easy way to set their titles.  The
meta plugin provides just what I want, I just need to wrap my
reStructuredText with:-

    ~~meta:title=Title for DokuWiki~~
    <rst>
       loads of reStructuredText
    </rst>

... and it's all done.

The reStructuredText plugin is a trivial conversion of the markdown2
plugin. It just calls the docutils HTML parser rst2html to do the
conversion. 


-- 
Chris Green

-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: