Main page
Help
Aide
Recent changes
LionWiki-t2t
MarkItUp
Preview
Scroll
Display
Swap
Show page
Syntax
B
I
U
S
H2
H3
wiki-link
ext-link
img
code
list
table
date
=== Txt2tags configuration === config.t2t is called from the main index.php file, and therefore all replacements and configurations in it are concerning the whole wiki. You can have a look at the txt2tags manual for how to use the preproc and postproc directives. Generally speaking, preproc are for customising the wiki syntax (adding new markup), and postproc are for adding extra html and css. Let's say you wish to add the markdown headers in the wiki (it's already implemented, check config.t2t at the root of the lionwiki-t2t installation): Then we add into config.t2t this syntax: ``` %!preproc: '^# (.*?)$' '= =' it means it will process all text ``(.*?)`` starting with a # at the beginning of a line (^), until the end of the line ($) and replace it with the txt2tags markup for headings level 1 (``= heading =``). Now let's say you wish to add the new ``CONVERT-AROBASECONVERT-AROBASESLIDERCONVERT-AROBASECONVERT-AROBASE`` markup into your website, then add this line into config.t2t: ``` %!postproc: 'CONVERT-AROBASECONVERT-AROBASESLIDERCONVERT-AROBASECONVERT-AROBASE' '<input type="range" min="1" max="100" class="slider">' it will result in: @@SLIDER@@ You could also refine the markup by adding the min and max values with CONVERT-AROBASECONVERT-AROBASESLIDERCONVERT-AROBASECONVERT-AROBASE1/100CONVERT-AROBASECONVERT-AROBASE which would give more sense. See the "progress bar" example into config.t2t for a similar case. You can also define a set of rules only available for one page. Create a newrule.t2t at the root of the installation. Then include it into the page with: ``` %!includeconf:newrule.t2t At the moment there are : - ``cyoa.t2t`` for creating choose your own adventure elements (see [[sandbox_cyoa]]) - ``todotxt.t2t`` for parsing todo.txt files (see [[todo]]). You can synchronise and edit this todo.txt found in var/pages/todo.txt with other tools ([official todo.txt cli https://github.com/todotxt], markor or simpletask on Android...) - ``abcjs.t2t`` to display musical scores in abc format (see [[sample.abc]]). - forth.t2t for writing and developing programs in the FORTH programming language (see [[sample.forth]]). - Markdown support could also have been placed in such a file, but has been integrated directly into the main ``config.t2t`` file.
Password
Summary of changes
↓
↑