Loading...
 
Skip to main content

History: Converting from Tiki syntax to Markdown

Source of version: 17 (current)

Copy to clipboard
            {syntax type="markdown"  editor="wysiwyg"} # {{page}}


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

{BOX()} 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:

- https://markdownthemes.tiki.org
- https://markdowndoc.tiki.org/
- https://markdowndev.tiki.org/


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 
{CODE()}
# markdownthemes.tiki.org
echo "========== markdownthemes.tiki.org ============"
cd /opt/tiki-manager/app/
php tiki-manager instance:clone <strike>source=2 </strike>target=9 <strike>no-interaction </strike>direct <strike>skip-reindex </strike>skip-cache-warmup --only-data -vv
php tiki-manager instance:update <strike>instances=9 </strike>no-interaction <strike>skip-reindex </strike>skip-cache-warmup --stash -vv
php tiki-manager.php instance:profile:apply <strike>instances=9 </strike>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 <strike>markdown </strike>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
{CODE}

{BOX}

## Test what conversion will do

This will show conversion in the command line interface. 
{CODE()}
php console.php markdown:convert --markdown
{CODE}

## Do the actual conversion

### On specific page

This will convert content of the selected page 
{CODE()}
php console.php markdown:convert <strike>page="page name" </strike>markdown
{CODE}

### Save the conversion

In case you want to save to conversion you add the **--save** option 
{CODE()}
php console.php markdown:convert <strike>page="page name" </strike>markdown --save
{CODE}

## Notes

- ((MakeTOC)) has been deprecated and is not available in Markdown. Please use ((PluginAutoTOC)) instead.
- Some content can't be automatically converted so you'll have to do manually (it will be indicated)
- We extended Markdown 
    - https://gitlab.com/tikiwiki/tiki/-/commit/f909b7312a1f242942d7e110caba7dc00f320f78