Hacker News new | ask | show | jobs
by entrepy123 666 days ago
It's possible to basically avoid the second step ("Convert all text files from DokuWiki Syntax to proper Markdown") by only ever writing Markdown in Dokuwiki to begin with.

To write Markdown in DokuWiki, the "DokuWiki Commonmark Plugin" [0] is pretty great.

To use it, tips are:

- REQUIRED: On the top line of each page, put `<!DOCTYPE markdown>` (using the new toolbar button or typing it in). So that Dokuwiki knows the page is in markdown.

- STRONGLY SUGGESTED: In the Dokuwiki Config, set the `maxseclevel` to 0. Since the Commonmark markdown plugin currently unfortunately sort of messes up edit-section.)

That's basically it. Makes the Dokuwiki files that much more immediately-portable, in theory.

[0] https://www.dokuwiki.org/plugin:commonmark

1 comments

Interesting, didn't know about <!DOCTYPE markdown>. Though as an SGML pedant, I have to say using this doctype declaration in this way just tells an SGML or XML parser about the base ("root") element and is thus simply incorrect since there is no "markdown" element. The proper way would be to use just "html", and adding SGML shortref declarations in the "internal subset" for markdown-to-HTML mapping, like sgmljs is doing.