Table of Contents
Compatible with DokuWiki
- 2023-04-04 "Jack Jackrum" yes
- 2022-07-31 "Igor" yes
- 2020-07-29 "Hogfather" yes
- 2018-04-22 "Greebo" unknown
There are number of ways to organize a FAQ sections on a DokuWiki page that use (abuse) different syntax elements to present the questions and answers. The QnA plugin introduces semantically clear syntax for both questions and answers plus a convenient way to create a table of contents for the FAQ.
Download and Installation
The basic QnA block starts with a question and is followed by one or more optional answers. The questions are marked by triple question mark at the start of a line, the answers — with triple exclamation mark:
??? How do I format a question? !!! Put triple question mark at the start of a line followed by the question title.
The first line of the question (must be on the same line as the
??? marker) is used as the question title and like DokuWiki headlines does not support any formatting. The rest of the text between the title and the first answer is treated as the question details and can contain almost any DokuWiki syntax (except of headers). This also applies to the answer block — no syntax limitations.
Normally question and answer blocks span until the start of the next block or to the next section. If you want to mix QnA syntax with plain text you can explicitly terminate the block by the question block marker without the question title:
??? How do I terminate a QnA block? What if I want to put some text after the block and that text doesn't belong to the answer? !!! Put triple question mark at the start of a line. ??? This text is not part of the answer.
You can organize multiple questions into sections using slightly modified headline syntax:
=?==== Level 1 headline ====== =?=== Level 2 headline ===== =?== Level 3 headline ==== =?= Level 4 headline ===
The normal headlines are still respected and may be used together with customized ones. The only difference is that they are not shown in the QnA table of contents.
The QnA TOC can be inserted with
~~FAQ~~ syntax. It will be rendered as an unordered list of all questions on the current page. Note that due to implementation constrains the TOC for the current page may be not properly updated in preview during the page editing. Instead of the current page you can insert TOC for other pages by adding the page names to the
~~QNA faq:installation faq:sequrity faq:usage~~
When multiple page names are specified the plugin will combine information from all pages into a single TOC.
The plugin supports multiple visual styles, and you can select the one you like the most using Configuration Manager. Look for “QnA” in plugin configuration section.
All elements rendered by QnA plugin are wrapped into containers with distinct class names. This allows to easily customize their look with a user-defined CSS style sheet. The figure below shows different HTML elements generated by the plugin along with their
- Fixed compatibility with DokuWiki Jack Jackrum
- Fixed compatibility with PHP8
- Fixed trimming of multibyte characters in question identifiers
- Added multiple formatting styles
- Added configuration option for style selection
- Fixed background color selection for question and answer blocks
- Fixed linking from TOC to QnA sections
- Respect ACL during TOC generation
- Fixed PHP 7 compatibility
- Various minor bug fixes
- First public release
Bugs and Feature Requests
Please report bugs or feature requests at the bug tracker.