User Tools

Site Tools


dokuwiki_notes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
dokuwiki_notes [2021/11/10 22:54] – [useful plugins] admindokuwiki_notes [2024/03/22 18:59] – [how to write question and answers] raju
Line 1: Line 1:
 +==== tasks ====
 +  * [[random_page#generate_a_random_page | generate a random page]]
 +
 +==== how to write question and answers ====
 +tags | qna, Q&A
 +
 +You can use
 +<code>
 +:?: Question \\
 +:!: Answer
 +</code>
 +It will render as
 +
 +:?: Question \\
 +:!: Answer
 +
 +It also works with lists. For example
 +<code>
 +  * :?: Question
 +  * :!: Answer
 +</code>
 +will render as
 +  * :?: Question
 +  * :!: Answer
 +
 +See also:
 +  * https://forum.dokuwiki.org/d/3686-questions-and-answers-style - where I found this trick
 +  * https://www.dokuwiki.org/plugin:qna
 +
 +==== convert mediawiki page to dokuwiki ====
 +<code>
 +pandoc -f mediawiki -t dokuwiki --shift-heading-level-by=-1 mw.txt -o dk.txt
 +</code>
 +
 +Q. Why --shift-heading-level-by=-1?
 +
 +A. The section levels are preserved. For example
 +
 +<code>
 +$ 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 ====
 +</code>
 +
 +See also:
 +  * Documentation - https://pandoc.org/MANUAL.html#reader-options -> ctrl-f for --shift-heading-level-by
 +  * In action - [[https://github.com/KamarajuKusumanchi/rutils/blob/master/bin/mediawiki2dokuwiki.sh | 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 ====
 +  * url: https://www.dokuwiki.org/plugin:tag
 +
 +  * 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<code>
 +{{tag>tag1 tag2 tag3}}
 +</code>
 +I am getting<code>
 +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()
 +</code>
 +
 +Upgrading from <code>
 +$ dpkg -l dokuwiki | grep ^ii
 +ii  dokuwiki       0.0.20180422.a-2.1 all          standards compliant simple to use wiki
 +</code>
 +to
 +<code>
 +$ dpkg -l dokuwiki | grep ^ii
 +ii  dokuwiki       0.0.20220731.a-1 all          standards compliant simple to use wiki
 +</code>
 +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
 +<code>
 +<WRAP group><WRAP column>
 +^ Heading ^ Heading ^
 +| cell data | cell data |
 +</WRAP></WRAP>
 +</code>
 +
 +For example
 +<code>
 +<WRAP group><WRAP column>
 +^ Heading ^ Heading ^
 +| cell data | cell data |
 +</WRAP></WRAP>
 +</code>
 +
 +will render as
 +<WRAP group><WRAP column>
 +^ Heading ^ Heading ^
 +| cell data | cell data |
 +</WRAP></WRAP>
 +
 +while
 +<code>
 +^ Heading ^ Heading ^
 +| cell data | cell data |
 +</code>
 +
 +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 <WRAP>
 +^ foo ^ foo ^
 +| foo | foo |
 +</WRAP>
 +    * tabel 2 <WRAP>
 +^ bar ^ bar ^
 +| bar | bar |
 +</WRAP>
 +    * <WRAP>
 +^ blah ^ blah ^
 +| blah | blah |
 +</WRAP>
 +
 +use
 +
 +<code>
 +  * tables
 +    * table 1 <WRAP>
 +^ foo ^ foo ^
 +| foo | foo |
 +</WRAP>
 +    * tabel 2 <WRAP>
 +^ bar ^ bar ^
 +| bar | bar |
 +</WRAP>
 +    * <WRAP>
 +^ blah ^ blah ^
 +| blah | blah |
 +</WRAP>
 +</code>
 +
 +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: <code><WRAP indent>your text</WRAP></code>
 +
 +Example:
 +<WRAP indent>
 +foo 1
 +  * bar 1
 +  * bar 2
 +foo 2
 +  * bar 3
 +  * bar 4
 +</WRAP>
 +
 +tags | insert tab
 +==== double dashes in monospaced text ====
 +Use ''<nowiki>''%%--%%''</nowiki>'' to render ''%%--%%''.
 +
 +Compare this to ''<nowiki>''--''</nowiki>'' 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
 +''<nowiki>''%%--skip-string-normalization%%''</nowiki>''.
 +
 +tags | remove formatting
 +
 +==== sitemap ====
 +http://www.kamaraju.xyz/dk/start?do=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:
 +<code>
 +dividend yield ns:diary
 +</code>
 +will search for 'dividend yield' in the 'diary' namespace
 +
 +https://www.dokuwiki.org/search#search_within_a_namespace
  
 ==== useful plugins ==== ==== useful plugins ====
Line 16: Line 235:
   * https://www.dokuwiki.org/plugin:mathjax   * https://www.dokuwiki.org/plugin:mathjax
   * https://www.dokuwiki.org/plugin:move   * https://www.dokuwiki.org/plugin:move
 +  * https://www.dokuwiki.org/plugin:yalist
 +    * for | nested lists, definition lists etc.,
 +  * https://www.dokuwiki.org/plugin:yearbox
 +    * using this to maintain a journal in [[:diary:]]
 +  * https://www.dokuwiki.org/plugin:const
 +    * using this to parameterize the value of ''year'' in pages such as [[:diary:yearbox_2023]], [[:diary:yearbox_2024]]
 +    * tags | variable in page content
 +
 +==== plugins I am exploring ====
 +  * https://www.dokuwiki.org/plugin:tabbox
 +  * https://www.dokuwiki.org/plugin:cli
  
 ==== plugins I came across ==== ==== plugins I came across ====
Line 21: Line 251:
   * https://www.dokuwiki.org/plugin:bookcreator   * https://www.dokuwiki.org/plugin:bookcreator
   * https://www.dokuwiki.org/plugin:dw2pdf   * https://www.dokuwiki.org/plugin:dw2pdf
 +\\
 +  * https://www.dokuwiki.org/plugin:iframe
 +  * https://www.dokuwiki.org/plugin:gh
 +  * https://www.dokuwiki.org/plugin:pycode
 +\\
 +  * https://www.dokuwiki.org/plugin:publish
 +\\
 +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
 +  * https://www.dokuwiki.org/plugin:templatepagename
 +    * https://www.dokuwiki.org/namespace_templates
 +
 ==== conflicting plugins ==== ==== 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.   * 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.
Line 27: Line 268:
 ==== buggy plugins ==== ==== buggy plugins ====
   * https://www.dokuwiki.org/plugin:keywords - add keywords to the wiki pages   * https://www.dokuwiki.org/plugin:keywords - add keywords to the wiki pages
-    * The keywords are not rendered but you can search on them.+    * The keywords are not rendered but you can search on them (expected behaviour).
     * issues:     * 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".       * 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".
Line 64: Line 305:
   * https://www.dokuwiki.org/irc   * https://www.dokuwiki.org/irc
   * https://github.com/splitbrain/dokuwiki   * https://github.com/splitbrain/dokuwiki
 +  * https://www.dokuwiki.org/devel:vim - setup vim for dokuwiki development.
  
 ==== Useful documentation ==== ==== Useful documentation ====
Line 93: Line 335:
   * https://www.dokuwiki.org/faq:lists has answers for   * https://www.dokuwiki.org/faq:lists has answers for
     * How to put line breaks in lists?     * How to put line breaks in lists?
 +
 +==== 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 ==== ==== multiple lines in table cell ====
Line 141: Line 388:
 ==== Questions to look into ==== ==== 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?   * 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
 +~~INFO:syntaxplugins~~
 +adminplugins
 +~~INFO:adminplugins~~
 +
 +Ref:- https://www.dokuwiki.org/plugin:info
 +
 +==== link to a namespace ====
 +You can use ''<nowiki>[[:ns:]]</nowiki>''. For example ''<nowiki>[[:diary:]]</nowiki>'' will render as [[:diary:]].
 +
 +Ref:-
 +  * Found this tip in https://www.dokuwiki.org/namespaces . It covers a lot of other scenarios besides the above.
  
dokuwiki_notes.txt · Last modified: 2024/04/21 15:44 by raju