This plugin provides the Markdown markup language by John Gruber, using the ("PHP Markdown") port (including the Markdown Extra extension) by Michel Fortin.
Additionally it can provide the "prettyfier" PHP SmartyPants and PHP SmartyPants Typographer.
Markdown is a plain text format for writing structured documents, based on formatting conventions from email and usenet. It allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).
Markdown Extra is an extension to PHP Markdown implementing some features currently not available with the plain Markdown syntax.
SmartyPants is a free web typography prettifyier tool for web writers. It translates plain ASCII punctuation characters into "smart" typographic punctuation HTML entities.
Read more:
Markdown can be parsed in …
serendipity_plugin_html_nugget
)You can choose from the traditional Markdown and Markdown Extra flavours.
Markdown Extra offers some additional features:
Syntax:
All PHP-Markdown configuration
options are set to their default values and can't be changed, with one
exception: using the lib
version, footnotes will get the
Serendipity entry id set as prefix (fn_id_prefix
).
You can choose from the classic
or lib
(library
package) version.
As the classic
version of PHP Markdown and
PHP Markdown Extra is no longer being supported since February 1, 2013,
you should choose the lib
version in any case.
Furthermore, the classic
version doesn't support
SmartyPants or footnote prefixes.
SmartyPants and SmartyPants Typographer translate plain ASCII punctuation characters into "smart" typographic punctuation HTML entities.
You have to choose the lib
version of
PHP-Markdown to activate SmartyPants!
Documentation: PHP SmartyPants
The Markdown plugin should always be placed after the GeSHi-Plugin
(serendipity_event_geshi
), but before all plugins that expect HTML
as their input.
The plugin will add some CSS to style footnotes and footnote markers:
/* Footnotes (generated by serendipity_event_markdown) */ footnote-ref:after { content: ")"; } .footnotes hr { border-top: dashed #ccc; border-width: 1px; } /* mostly taken from http://www.456bereastreet.com/archive/201105/styling_ordered_list_numbers/ */ .footnotes ol { counter-reset: li; margin-top: .2em; margin-left: 1.5em; padding-left: 0; } .footnotes ol > li { list-style: none; position: relative; padding-left: .5em; font-size: 90%; } .footnotes ol > li:before { content: counter(li)")"; counter-increment: li; position: absolute; left: -2em; top: -.1em; width: 2em; text-align: right; font-size: 80%; font-weight: bold; } /* --- end of Footnotes */