This is an old revision of the document!
Table of Contents
tasks
how to write question and answers
tags | qna, Q&A
You can use
:?: Question \\ :!: Answer
It will render as
Question
Answer
It also works with lists. For example
* :?: Question * :!: Answer
will render as
- Question
- Answer
See also:
- https://forum.dokuwiki.org/d/3686-questions-and-answers-style - where I found this trick
convert mediawiki page to dokuwiki
pandoc -f mediawiki -t dokuwiki --shift-heading-level-by=-1 mw.txt -o dk.txt
Q. Why –shift-heading-level-by=-1?
A. The section levels are preserved. For example
$ cat mw.txt ==== foo ==== $ pandoc -f mediawiki -t dokuwiki mw.txt === foo === $ pandoc --shift-heading-level-by=-1 -f mediawiki -t dokuwiki mw.txt ==== foo ====
See also:
- Documentation - https://pandoc.org/MANUAL.html#reader-options → ctrl-f for –shift-heading-level-by
- In action - mediawiki2dokuwiki.sh (github.com/KamarajuKusumanchi)
tags | section headings, header levels, mediawiki to dokuwiki change header level
reference urls
- source code - https://github.com/splitbrain/dokuwiki
check the version of dokuwiki instance
- Login as admin and go to https://www.kamaraju.xyz/dk/doku.php?do=check
- Note:- If you do not login as admin, the version number is not displayed.
Ref:- https://www.dokuwiki.org/faq:version
tags | check dokuwiki version running
Tag plugin
- The plugin version 2022-10-02 is incompatible with dokuwiki 0.0.20180422.a-2.1. For example, if I add the following line to the bill_pay_setup page
{{tag>tag1 tag2 tag3}}
I am getting
022/12/06 16:38:23 [error] 2076452#2076452: *82 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'dokuwiki\Extension\Event' not found in /var/lib/dokuwiki/lib/plugins/tag/helper.php:227 Stack trace: #0 /var/lib/dokuwiki/lib/plugins/tag/helper.php(169): helper_plugin_tag->tagLink() #1 /var/lib/dokuwiki/lib/plugins/tag/syntax/tag.php(80): helper_plugin_tag->tagLinks() #2 /usr/share/dokuwiki/inc/parser/renderer.php(111): syntax_plugin_tag_tag->render() #3 /usr/share/dokuwiki/inc/parserutils.php(654): Doku_Renderer->plugin() #4 /usr/share/dokuwiki/inc/parserutils.php(130): p_render() #5 /usr/share/dokuwiki/inc/parser" while reading upstream, client: 68.198.191.3, server: www.kamaraju.xyz, request: "GET /dk/bill_pay_setup HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "www.kamaraju.xyz", referrer: "https://www.kamaraju.xyz/dk/bill_pay_notes" 2022/12/06 16:38:23 [error] 2076452#2076452: *82 FastCGI sent in stderr: "utils.php(83): p_cached_output() #6 /usr/share/dokuwiki/inc/html.php(293): p_wiki_xhtml() #7 /usr/share/dokuwiki/inc/Action/Show.php(33): html_show() #8 /usr/share/dokuwiki/inc/template.php(98): dokuwiki\Action\Show->tplContent() #9 /usr/share/dokuwiki/inc/events.php(111): tpl_content_core() #10 /usr/share/dokuwiki/inc/events.php(256): Doku_Event->trigger() #11 /usr/share/dokuwiki/inc/template.php(83): trigger_event()
Upgrading from
$ dpkg -l dokuwiki | grep ^ii ii dokuwiki 0.0.20180422.a-2.1 all standards compliant simple to use wiki
to
$ dpkg -l dokuwiki | grep ^ii ii dokuwiki 0.0.20220731.a-1 all standards compliant simple to use wiki
fixed the issue
- This plugin requires the pagelist plugin (https://www.dokuwiki.org/plugin:pagelist). But it is not pulled in automatically as part of the installation. So, install it manually.
table with minimum column width
Use
<WRAP group><WRAP column> ^ Heading ^ Heading ^ | cell data | cell data | </WRAP></WRAP>
For example
<WRAP group><WRAP column> ^ Heading ^ Heading ^ | cell data | cell data | </WRAP></WRAP>
will render as
Heading | Heading |
---|---|
cell data | cell data |
while
^ Heading ^ Heading ^ | cell data | cell data |
will render as
Heading | Heading |
---|---|
cell data | cell data |
Ref:- https://forum.dokuwiki.org/d/15099-creating-variable-width-shrink-to-fit-columns → wizgeek's answer
tags | reduce column width
table as a list item
tags | table inside a list
To get
- tables
- table 1
foo foo foo foo - tabel 2
bar bar bar bar blah blah blah blah
use
* tables * table 1 <WRAP> ^ foo ^ foo ^ | foo | foo | </WRAP> * tabel 2 <WRAP> ^ bar ^ bar ^ | bar | bar | </WRAP> * <WRAP> ^ blah ^ blah ^ | blah | blah | </WRAP>
Ref: https://forum.dokuwiki.org/d/19773-how-can-a-table-be-indented-within-a-list
indented paragraph
If you only need one tab, install the “WRAP” Plugin (See http://dokuwiki.org/plugin:wrap), and then use the following syntax:
<WRAP indent>your text</WRAP>
Example:
foo 1
- bar 1
- bar 2
foo 2
- bar 3
- bar 4
tags | insert tab
double dashes in monospaced text
Use ''%%--%%''
to render --
.
Compare this to ''--''
which renders as a single dash –
Ref:- https://www.dokuwiki.org/wiki:syntax#no_formatting
Extension:-
To display an option such as --skip-string-normalization
, use
''%%--skip-string-normalization%%''
.
tags | remove formatting
sitemap
search within a namespace
To search pages within a namespace, prefix @ or ns: to the namespace. To not search pages within a namespace, prefix ^ or -ns: to the namespace.
Examples:
dividend yield ns:diary
will search for 'dividend yield' in the 'diary' namespace
useful plugins
- https://www.dokuwiki.org/plugin:tag - add search tags to the wiki pages.
- favorite configuration:
- set tags_list_css to “optimized for tags list at top of page”
- Multiple tags are separated by spaces. If a tag itself contains a space, it should be in quotes. For example
{{tag>"foo bar" baz}}
will set two tags “foo bar” and “baz”.
- https://www.dokuwiki.org/plugin:saveandedit - Adds a checkbox to continue editing after the page is saved.
- https://www.dokuwiki.org/plugin:nspages - to list all pages in a namespace
- https://www.dokuwiki.org/plugin:include - to transclude pages
- Using this to include python_pages as a section in notes
- for | nested lists, definition lists etc.,
- using this to maintain a journal in diary
- tags | variable in page content
plugins I am exploring
plugins I came across
https://www.dokuwiki.org/tips:book mentions two plugins that are useful for creating books.
https://diyfuturism.com/index.php/2018/01/01/how-to-set-up-a-personal-wiki-with-configuration-for-common-use-cases-like-recipes-and-journaling/ talks about TemplatePageName plugin
conflicting plugins
- https://www.dokuwiki.org/plugin:edittable - seems nice. But it is conflicting with https://www.dokuwiki.org/plugin:wrap . For example, if I have a cell with a list of items, and if I install the edittable plugin and then try to edit that table, the cell contents are not longer rendered as a list.
- Todo:- Try to come up with a small test case and report it upstream.
buggy plugins
- https://www.dokuwiki.org/plugin:keywords - add keywords to the wiki pages
- The keywords are not rendered but you can search on them (expected behaviour).
- issues:
- https://github.com/i-net-software/dokuwiki-plugin-keywords/issues/1 - Key words with spaces are broken into individual words. For example “foo bar” will become “foo, bar”.
- Use https://www.dokuwiki.org/plugin:tag instead. It populates the keywords meta field and does much more.
- https://www.dokuwiki.org/plugin:editsections2 is giving
startSectionEdit: $data "section" is NOT an array! One of your plugins needs an update.
on all the pages.
- Tested using 2012-10-13 version.
issues reported by me
- https://github.com/splitbrain/dokuwiki/issues/3531 - display section numbers in the page and table of contents
remove extra line in lists inside table cells
tags | lists inside table cells wrap plugin
When the WRAP plugin is used to create lists inside table cells, an extra line is added at the end of the list. To remove it, add the following to /etc/dokuwiki/userstyle.css .
div.plugin_wrap ul { margin-bottom: 0px; }
The new setting will be picked up automatically when the page is refreshed.
include code in ordered lists
Put the <code>
tag on the same line of the item. For example
- foo
bar
as opposed to
- foo
bar
links I came across
- https://www.dokuwiki.org/devel:vim - setup vim for dokuwiki development.
Useful documentation
- https://www.dokuwiki.org/namespaces has answers for
- How to create new namespaces?
- https://www.dokuwiki.org/wiki:syntax#quoting - quote some text. You can have other stuff like bold text, monospaced text etc., within the quoted text
- https://www.dokuwiki.org/wiki:syntax#basic_text_formatting - format text as bold, italic, underlined and monospaced
- https://www.dokuwiki.org/install:permissions - Which folders need to be set with what permissions?
documentation links I came across
- https://www.dokuwiki.org/faq:lists has answers for
- How to put line breaks in lists?
- https://www.dokuwiki.org/faq:approval has answer for
- approve edits on dokuwiki
- struct plugin
useful links
- https://namespace-cpp.de/std/doku.php/wiki/quicksyntax - cheatsheet on dokuwiki syntax
- provides an example on how to put content into two or more columns.
- https://www.dokuwiki.org/namespace_templates - Namespace Templates
multiple lines in table cell
Install the wrap plugin and do something like
^ days ^ months ^ | <WRAP> * Sunday * Monday </WRAP> | <WRAP> * January * February * March </WRAP> | | <WRAP> * Tuesday * Wednesday </WRAP> | <WRAP> * April * May </WRAP> |
which will give
days | months |
---|---|
|
|
|
|
Ref:-
Questions to look into
- Is it possible to persist the breadcrumbs across user sessions? For example, the breadcrumbs are lost if I close the chrome browser and reopen it. Is it possible to preserve them even in such cases?
list of installed plugins
syntaxplugins
- Command Line Interface (CLI) Plugin 2020-08-18 by Schplurtz le Déboulonné
Renders transcripts of command line interactions, e.g. for shell and dynamic language interpretor tutorials - Cloud Plugin 2023-02-11 by Michael Hamann, Michael Klier, Gina Haeussge
Displays the most used words in a word cloud. - comment 2023-08-18 by Gina Häußge, Michael Klier
Add comments/notes to your wiki source that won't be shown on the page. - const plugin 2023-04-04 by lisps, peterfromearth
work on wiki pages with constants, self defined variables and make calculations - Display Orphans Plugin 2021-02-05 by Jay Jeckel
The Display Orphans Plugin can display tables of orphaned, wanted, and linked pages. - Gallery Plugin 2024-04-30 by Andreas Gohr
Creates a gallery of images from a namespace or RSS/ATOM feed - iframe plugin 2023-08-17 by Christopher Smith
Allows external URLs to be loaded into an iframe in your DokuWiki page. - include plugin 2023-09-22 by Michael Hamann, Gina Häussge, Christopher Smith, Michael Klier, Esther Brunner
Functions to include another page in a wiki page - Keywords 2023-06-19 by i-net /// software; Ilya Lebedev
Defines keywords for the page, using {{keywords>word1, word2, wordN}} syntax. - MathJax plugin 2021-11-20 by Mark Liffiton
Enables MathJax (https://www.mathjax.org/) parsing of TeX math expressions in wiki pages - nodisp 2022-09-14 by Myron Turner
Hide text from brwosoer display or remove from output to browser depending on acl - nspages plugin 2024-05-30 by Guillaume Turri
Presents a toc of the selected namespace using <nspages> - Numbered Headings 2023-09-12 by Satoshi Sahara
Prepend tiered numbers as indexes for hierarchical headings - orphanswanted plugin 2023-05-30 by Doug Edmunds, Cyrille37, Federico Ariel Castagnini, Andy Webber, Matthias Schulte, Christian Paul, alexdraconian
Display Orphans, Wanteds and Valid link tables - Pagelist Plugin 2023-08-27 by Matthias Schulte, Michael Hamann, Michael Klier, Gina Haeussge
Lists pages in a nice formatted way - PageQuery Plugin 2024-02-14 by Mark C. Prins, previously Symon Bent
Search for (fulltext) and list wiki pages, sorted and optionally grouped by name, date, creator, abc, etc. in columns. Insert the pagequery markup wherever you want your list to appear. E.g.{{pagequery>[query;fulltext;sort=key:direction,key2:direction;group;limit=??;cols=?;inwords;proper]}} [..] = optional - Tag Plugin 2023-10-17 by Michael Hamann, Gina Häussge, Christopher Smith, Michael Klier, Esther Brunner
tag wiki pages - Wiki-Style Script 2019-01-28 by Main development by Hir/wataame, adjustment and distribution by HokkaidoPerson
If there are wiki syntax of bold, italic, underlined, or monospaced text remaining (such as those in headers and link texts), this plugin will apply them. You can also change color of characters in headers and link texts. Characters of nowiki syntax won't be changed. - Wrap Plugin 2023-08-13 by Anika Henke
Universal plugin which combines functionalities of many other plugins. Wrap wiki text inside containers (divs or spans) and give them a class (choose from a variety of preset classes), a width and/or a language with its associated text direction. - Simple universal list plugin 2023-06-30 by Mark C. Prins, previously Ben Slusky
Extend DokuWiki list syntax to allow definition list and multiple paragraphs in a list entry - Yearbox Plugin 2021-03-19 by Michael Große (formerly: Symon Bent)
Builds a complete HTML calendar for the given year, with a link to create a new page for each day of the year. Existing pages will have a tooltip showing a preview of the page content.
adminplugins
- Move plugin 2024-05-07 by Michael Hamann, Gary Owen, Arno Puschmann, Christoph Jähnigen
Move and rename pages and media files whilst maintaining the links. - Popularity Feedback Plugin 2015-07-15 by Andreas Gohr
Send anonymous data about your wiki to the DokuWiki developers - Revert Manager 2015-07-15 by Andreas Gohr
Allows you to mass revert recent edits to remove Spam or vandalism
link to a namespace
You can use [[:ns:]]
. For example [[:diary:]]
will render as diary.
Ref:-
- Found this tip in https://www.dokuwiki.org/namespaces . It covers a lot of other scenarios besides the above.
struct plugin
- source code: https://github.com/cosmocode/dokuwiki-plugin-struct
- Andi's post helps in how to think about the struct plugin
directory layout in debian
dokuwiki root | /usr/share/dokuwiki |
wiki data | /var/lib/dokuwiki/data |
configuration | /etc/dokuwiki |
Ref:- https://wiki.debian.org/DokuWiki#Specificities_of_the_Debian_package