Markdown Export

v1.0

Every documentation page can be taken back out as Markdown. This is the importer in reverse, and it writes the same GitBook-flavored syntax the importer reads — so a page you export re-imports as the page it was, blocks and all, not as a wall of HTML.

Page actions

Documentation pages carry a Page actions menu at the right-hand end of the breadcrumb row, above the title, holding:

  • Copy as Markdown — puts the whole page on the clipboard.
  • View as Markdown — opens the Markdown in a browser tab.
  • Open in Claude and Open in ChatGPT — hand the page to an AI assistant. Off by default; see below.

Which of these appear is controlled in Appearance > Customize > Doku Options > Documentation pages:

  • Show “Copy as Markdown” and “View as Markdown” — on by default.
  • Show “Open in Claude” and “Open in ChatGPT” — off by default. These are the only links in Doku that point at a third party, so you have to switch them on deliberately. They pass the page’s address, not its content, which means they only work on a site the assistant can actually reach — on an intranet or a staging site they will open to an error, which is part of why they start switched off.

What the exported Markdown contains

Front matter carries the page’s title, slug, description and tags, so re-importing recreates the page rather than an untitled body. The blocks map as follows:

BlockExported as
Enhanced CodeA fenced code block, wrapped in {% code %} when it has a filename, wrapped lines or line numbers
CalloutA GitHub alert — > [!NOTE], > [!TIP], > [!WARNING], > [!DANGER], > [!INFO]
Tabbed Code{% tabs %} with one {% tab %} per language
Tabs{% tabs %} with one {% tab %} per tab. A set whose every tab holds a single code block and nothing else re-imports as Tabbed Code, since the syntax cannot tell the two apart
Step Procedure{% stepper %} with one {% step %} per step
Details<details> with a <summary>
Card Grid<table data-view="cards">
API Parameter Table<table data-view="parameters">
MermaidA ```mermaid fenced block

WordPress’s own blocks export as ordinary Markdown — headings, lists, tables, quotes, images, columns and so on. A heading whose anchor you changed from the one Doku derives from its text keeps it, written as GitBook’s empty <a id> after the heading text.

What does not survive a round trip

Exporting and re-importing a page is reliable for its structure, but a few details cannot be expressed in Markdown and are rebuilt with defaults:

  • Card icons. The cards table format has no icon column, so every re-imported card gets the default document icon.
  • A callout’s custom title. Neither Markdown callout syntax has a slot for one; the variant name is used instead.
  • The category. The importer assigns categories from the folder a file sits in, not from front matter, so a single file imported as a new draft arrives uncategorized unless you choose one in the Category field. Import it over the original with Overwrite existing post, which keeps the post’s category, choose the category on import, or import it inside a .zip with the folder structure intact.
  • The version. Front matter has no field for it either. Choose it under Version on import, or import over the original, which keeps its versions when Version is left at — None —.
  • Blocks from other plugins. Anything Doku does not recognize is exported as its own HTML, which is preserved but comes back as a raw HTML block. Blocks that build their output fresh on each page load — a Query Loop, a navigation menu, a recent-posts list — export as a comment naming the block, because what they display is assembled at the moment a visitor asks for the page and is not stored in it.

If you need an exact archive rather than a portable one, use WordPress’s own Tools > Export, which writes everything verbatim.

Was this page helpful?