Loading...
 
Skip to main content

Converting from Tiki syntax to Markdown


New in Tiki25 and improved in Tiki26: Native support for Tiki-Flavored Markdown. But what if you have content in Tiki syntax?

As of 2023-09, this is still Beta. You should first use on a test database, and review results before running on a production database. It is not yet ready to be ran on *.tiki.org sites (which do have a huge quantity of diverse content).


We are testing on:


Please see the evolution: https://gitlab.com/tikiwiki/tiki/-/commits/master?search=markdown

As of 2023-08-02, a root cronjob is ran on /root/predogfood.sh which contains

Copy to clipboard
# markdownthemes.tiki.org echo "========== markdownthemes.tiki.org ============" cd /opt/tiki-manager/app/ php tiki-manager instance:clone --source=2 --target=9 --no-interaction --direct --skip-reindex --skip-cache-warmup --only-data -vv php tiki-manager instance:update --instances=9 --no-interaction --skip-reindex --skip-cache-warmup --stash -vv php tiki-manager.php instance:profile:apply --instances=9 --profile=Markdown_Settings --no-interaction -vv php tiki-manager.php instance:maintenance --instances=9 on cd /home/tiki-markdownthemes/public_html php8.1 console.php markdown:convert --markdown --save -vv php8.1 console.php plugin:refresh -vv php8.1 console.php plugin:approve --all -vv php8.1 console.php user:password admin (redacted) -vv php8.1 console.php index:rebuild --log -vv cd /opt/tiki-manager/app/ php tiki-manager.php instance:maintenance --instances=9 off

Requirement

Before starting with the conversion, you need to activate markdown on the Control panels, also you need to make sure 'advance' and 'experimental' options are set to true to see be able to access markdown option.
From 'Control Panels' go to menu 'Global Setup' > 'Editing and plugins', and from 'General Settings' tab scroll down to Markdown, and check markdown option, set 'Default syntax' to 'markdown' then apply change.

Test what conversion will do

This will show conversion in the command line interface.

Copy to clipboard
php console.php markdown:convert --markdown

Do the actual conversion

On specific page

This will convert content of the selected page

Copy to clipboard
php console.php markdown:convert --page="page name" --markdown

Save the conversion

In case you want to save to conversion you add the --save option

Copy to clipboard
php console.php markdown:convert --page="page name" --markdown --save

Notes

Collapse/expand modules below