Markdown

Converts Markdown syntax to HTML.

5 stars out of 5

1 0 0 0 0
  • Author Taufik Nurrohman
  • Link External URL
  • Maintainer 1
  • Member
  • Version 3.1.0

Markdown is two things: a plain text markup syntax, and a software tool that converts plain text markup to HTML for publishing on the web. The Markdown syntax allows you to write text naturally and format it without using HTML tags. More importantly: in Markdown format, your text stays enjoyable to read for a human being, and this is true enough that it makes a Markdown document publishable as-is, as plain text. If you are using text-formatted email, you already know some part of the syntax.

Usage

In your page header, add type property with value set to Markdown or text/markdown:

---
title: Page Title
description: Page description.
author: Taufik Nurrohman
type: Markdown
...

This is a **bold** text.

2 Comments

tuduf

Hi! How is the page source code representation (raw markdown) implemented at the bottom of each post? Is this a plugin?

Taufik Nurrohman

No, it was created manually using this little snippet:

if (1 === Get::get('source')) {
    $path = LOT . DS . 'page' . $url->path(DS) . '.page';
    Lot::type('text/plain');
    echo content($path) ?? 'No such file.';
    exit;
}

You could also use routes.