Edit - History - Recent changes

Read this help in French. Lire cette aide en fran├žais.

Lionwiki-t2t is a wiki system for the creation and maintenance of websites.

Lionwiki-t2t pages looks the same as normal webpages, but in addition they have an "Edit" link which helps to edit or add new pages on a website, with a lightweight markup language, like for http://www.wikipedia.org.

This system has some ready to use extensions and a simplified syntax.

Presentation (Edit)

The pages on this site are wiki-based pages, which means that pages can be created and edited by multiple authors. To edit a page, click on the "edit" link which exists somewhere on the page (generally at the top or in the footer). Some pages may be protected by a password.

In this wiki, the default password is "demo". It is adviced to modify it after the installation (see below).

When you edit a page, you see the markup which describe the content of the page. The final rendering, with the choosen formatting, will be displayed only after the page is saved.

The basic rules for page markup are simple (you will find them below).

Editing rules (syntax) (Edit)

The syntax of this wiki is following the general rules of txt2tags syntax, which you can find here as a reminder. The idea is you should be able to paste here your txt2tags documents without many modifications (explained in the second part of this document).

Complete syntax (Edit)

table cell 2 cell 3 cell 4
table cell 2 cell 3 cell 4
  • Visit txt2tags' website to learn more about the syntax, or use the buttons for quick formatting.

Additional syntax (Edit)

In addition to the normal txt2tags syntax, here are some new markup. You can customise, extend or configure most of them in the config.t2t file in the root of the wiki, or in txt2tags.class.php file.

  • Random numbers

    %%rand(1,100)

    will display a number between 1 and 100

    example:

    88

  • Progression bar

    [10%]

    will display a progress bar of 10%

    example:

    (10%)

    [3%7]

    will display a progress bar of 3 out of 7

    example:

    (3/7)

  • Markdown

    Some of the markdown syntax is also supported (headings, links) except for the most incompatible ones (italic).

Installation (Edit)

Linux / Unix (Edit)

Lionwiki is easy to install, no need to setup a sql database: a webserver (Apache, Lighttpd or Nginx) + php will be enough.

Here is what is possible to do:

Android (Edit)

If you're on Android and you wish to use your tablet / phone / androidtv as a server, you can use this app which is a free webserver. Install the php plugin, and copy the files of the wiki into /sdcard/paw/html. Then visit http://localhost:8080/lionwiki-t2t from your android system.

YunoHost (Edit)

In Yunohost, you can install it by searching for "lionwiki" in the application store.

Docker (Edit)

Go into infra/docker and type "make run" to build an image and deploy a new container. Learn more in the doc in the infra/ folder.

Use (Edit)

  • You can configure lionwiki-t2t by editing a few configuration files with the pheditor.php utility at the root of the installation. The default password is "admin" and you are advised to modify it after installation. (on the yunohost installation, the password set is the same as the one chosen during installation). If you think it might be a security breach, you can remove this editor from your installation.
  • top menu: you can customise your menu by editing the menu.php file in the root.
  • general configuration: see config.php
  • special configurations, regex etc: you can add extra customisation in your wiki by using the config.t2t file
    • you can have a look at sandbox_cyoa and its configuration file cyoa.t2t for an example of a special customisation using this feature.

Synchronize (Edit)

To synchronise your wiki with your mobile devices, install this in addition:

  • (optionnal) install nextcloud : https://nextcloud.com/
  • (optionnal) share a subfolder containing your lionwiki install into owncloud
  • install foldersync on an android device and synchronise the text files into var/pages/ between your server and your device (tablet, smartphone), using either ssh (recommended) or owncloud.
  • install for example the 920 text editor or Denkzettel on android and edit the pages of your website from your mobile device!

  • Bonus: if you're using Denkzettel, create a new page and start your first line with either #### or DENKZETTEL, then enable in the option "checklist on". This way you'll be able to use your wiki as a shopping list: Items are created by the application with a + before them, and disabled with a -, and with some preprocessing in the config.t2t we are able to display it correctly in lionwiki-t2t. Check this page to see a sample in action. (The ## characters are automatically added by denkzettel for adding a background color to the note).

Export as PDF (Edit)

You can also export some of your pages in pdf and use your wiki as a word processor / document generator. We use textallion for this. Install textallion on your server (installed by default in /usr/share/textallion/), copy the content of /usr/share/textallion/contrib/latexlib/* into /var/www/lionwiki-t2t/export_pdf/. Uncomment in /var/www/lionwiki-t2t/menu.php the part related to "Generate pdf". If textallion is correctly setup, you should be able to render a pdf document from the content of the "textallion" page from your wiki. You can edit /var/www/lionwiki-t2t/export_pdf/lionwiki.t2t to add more pages.

If it doesn't work as expected, run /var/www/lionwiki-t2t/export_pdf/run.php and trace the errors from there. When it's correctly set up, you should be able to do this from any browser which can access your lionwiki-t2t installation.

Avantages (Edit)

Some advantages:

  • data are stored in plain text, which are human readable and can be edited from an other application (for example a text editor on your smartphone)
  • simple and sober default theme (minimaxing). CSS using responsive design (for smartphone and tablets). You can easily customise colors using less.
  • Another option theme is using bootstrap, so you can use it as a basis for a modern website.

Tips (Edit)

  • if you need to make your image left, right or centered aligned, keep this in mind:
    • for left align, add an extra space (and/or some text) after the image mark
    • for center align, add an extra space (and/or some text) before and after the image mark
    • for right align, add an extra space (and/or some text) before the image mark

  • if you need to work further on the minimaxing design, rename in the template minimaxing.html the call to minimaxing.css to minimaxing.less

  • you can use you own handwriting font, just name it MyManuscript.ttf, put it in the templates/fonts folder (replace the existing one) and change the css/less file so it will be called before the other fonts.

  • You can also use your favorite font, rename if MyFont.ttf and put it in the templates/fonts folder (replace the existing one).

  • On linux or mac os x, it shouldn't be a problem to double-click on a word and only highlight that word, while on windows it would select also the white space after it, so you can't properly add the syntax. So on windows:
    • either single click after the last character of the word and press CTRL + SHIFT + LEFT ARROW
    • or if you're on mozilla firefox, in about:config, just search for layout.word_select. and select eat_space_to_next_word to False.

  • the var/pages folder is protected by .htaccess. Don't forget to enable it in both your /etc/apache2/sites-available/default and /etc/apache2/sites-available/default-ssl configurations!

Known bugs (Edit)

  • if you edit a part of the document, after saving you might need to reload the page if you want to edit a new part, otherwise the edit field will remain blank.
  • regex have problems with some replacements (lionwiki doesn't keep the \ in regex). Instead include a t2t file using includeconf