[dokuwiki] Re: How/where does dokuwiki handle file suffixes? I want to automate .rst files

  • From: Joonas Pulakka <joonas.pulakka@xxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sat, 6 Nov 2010 17:47:13 +0200

2010/10/28 Andreas Gohr <andi@xxxxxxxxxxxxxx>

> > I have written a reStructuredText plugin for DokuWiki which works
> > pretty well but it requires one to add <rst> and </rst> around the
> > blocks of reStructuredText.
> >
> > Is there a way I can make DokuWiki process all files with a .rst
> > suffix as reStructuredText using my plugin?  I can then just import the
> > whole hierarchy of .rst files and it should work as originally designed.
> >
> > Essentially what I need is a way to tell DokuWiki to take the contents
> > of the .rst file, prefix it with <rst>, postfix it with </rst> and then
> > feed it through the standard parser.
>
> Doing this is really simple. I just tried that with the markdownextra
> plugin. I simply added an action component intercepting
> PARSER_WIKITEXT_PREPROCESS. It checks if the page ID ends in .md and
> wraps the content in <markdown></markdown> tags.
>


This functionality is now included in the Markdown Extra plugin:
http://www.dokuwiki.org/plugin:markdownextra

Best Regards,
Joonas

Other related posts: