2017-08-06 14:16:32 +02:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
<title>Documentation: Markdown</title>
|
|
|
|
<style type="text/css">
|
|
|
|
body {
|
|
|
|
font-family: Arial, sans-serif!important;
|
|
|
|
margin: 20px;
|
|
|
|
}
|
|
|
|
ol li {
|
|
|
|
margin-bottom: 0.5em;
|
|
|
|
}
|
|
|
|
h2 {
|
|
|
|
background: #efefef;
|
|
|
|
padding: 0.5em;
|
|
|
|
}
|
|
|
|
p {
|
|
|
|
max-width: 60em;
|
|
|
|
}
|
|
|
|
.titel {
|
|
|
|
background: #cfcfcf;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0.5em;
|
|
|
|
}
|
|
|
|
#inhalt {
|
|
|
|
background: #efefef;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0.5em;
|
|
|
|
}
|
|
|
|
#inhalt h2 {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1 class="titel">Markup: <i>Markdown</i></h1>
|
|
|
|
</div>
|
|
|
|
<div id="inhalt">
|
|
|
|
<h2>Inhalt</h2>
|
|
|
|
<ol>
|
|
|
|
<li><a href="#description">Description</a></li>
|
|
|
|
<li><a href="#config">Configuration</a></li>
|
|
|
|
<li><a href="#notes">Notes</a></li>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p>This plugin provides the
|
|
|
|
<a href="https://daringfireball.net/projects/markdown/"><i>Markdown</i></a>
|
|
|
|
markup language by <i>John Gruber</i>, using the
|
|
|
|
("<a href="https://michelf.ca/projects/php-markdown/">PHP Markdown</a>")
|
|
|
|
port (including the <i>Markdown Extra</i> extension)
|
|
|
|
by <i>Michel Fortin</i>.</p>
|
|
|
|
|
|
|
|
<p>Additionally it can provide the "prettyfier"
|
|
|
|
<i>PHP SmartyPants</i> and <i>PHP SmartyPants Typographer</i>.</p>
|
|
|
|
|
|
|
|
<h2 id="description">Description</h2>
|
|
|
|
|
|
|
|
<p>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).</p>
|
|
|
|
|
|
|
|
<p><i>Markdown Extra</i> is an extension to PHP Markdown implementing some
|
|
|
|
features currently not available with the plain Markdown syntax.</p>
|
|
|
|
|
|
|
|
<p><i>SmartyPants</i> is a free web typography prettifyier tool for web writers.
|
|
|
|
It translates plain ASCII punctuation characters into "smart" typographic
|
|
|
|
punctuation HTML entities.</p>
|
|
|
|
|
|
|
|
<p>Read more:</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li><a href="https://en.wikipedia.org/wiki/Markdown">Wikipedia page</a> about <i>Markdown</i></li>
|
|
|
|
<li><a href="https://daringfireball.net/projects/markdown/"><i>Markdown</i> project page </a> (including documentation and syntax)</li>
|
|
|
|
<li><a href="https://daringfireball.net/projects/smartypants/"><i>SmartyPants</i> project page</a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h2 id="config">Configuration</h2>
|
|
|
|
|
|
|
|
<h3>Activate <i>Markdown</i> parser</h3>
|
|
|
|
|
|
|
|
<p><i>Markdown</i> can be parsed in …</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>Entry bodies</li>
|
|
|
|
<li>Extended bodies</li>
|
|
|
|
<li>Comments</li>
|
|
|
|
<li>HTML nuggets <em>(using <code>serendipity_plugin_html_nugget</code>)</em></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h3><i>Markdown</i> or <i>Markdown Extra</i></h3>
|
|
|
|
|
|
|
|
<p>You can choose from the traditional <i>Markdown</i> and
|
|
|
|
<i>Markdown Extra</i> flavours.</p>
|
|
|
|
|
|
|
|
<p><i>Markdown Extra</i> offers some additional features:</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>HTML in <i>Markdown</i> and <i>Markdown</i> in HTML</li>
|
|
|
|
<li>attributes like "id" or "class" in <i>Markdown</i></li>
|
|
|
|
<li>fenced code blocks without intendation</li>
|
|
|
|
<li>tables</li>
|
|
|
|
<li>footnotes</li>
|
|
|
|
<li>Abbreviations <em>(<abbr></abbr>)</em></li>
|
|
|
|
<li>definition lists <em>(<dl></dl>)</em></li>
|
|
|
|
<li>ordered lists (<ol></ol>) can start with another value than "1"</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<p>Syntax:</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li><a href="https://daringfireball.net/projects/markdown/syntax/"><i>Markdown</i> syntax</a></li>
|
|
|
|
<li><a href="https://michelf.ca/projects/php-markdown/extra/"><i>Markdown Extra</i> syntax</a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<p>All <i>PHP-Markdown</i> <a href="https://michelf.ca/projects/php-markdown/configuration/">configuration</a>
|
|
|
|
options are set to their default values and can't be changed, with one
|
|
|
|
exception: using the <code>lib</code> version, footnotes will get the
|
|
|
|
<i>Serendipity</i> entry id set as prefix (<code>fn_id_prefix</code>).</p>
|
|
|
|
|
|
|
|
<h3><i>Markdown</i> version</h3>
|
|
|
|
|
|
|
|
<p>You can choose from the <code>classic</code> or <code>lib</code> (library
|
|
|
|
package) version.</p>
|
|
|
|
|
|
|
|
<p><strong>As the <code>classic</code> version of <i>PHP Markdown</i> and
|
|
|
|
<i>PHP Markdown Extra</i> is no longer being supported since February 1, 2013,
|
|
|
|
you should choose the <code>lib</code> version in any case.</strong>
|
|
|
|
Furthermore, the <code>classic</code> version doesn't support
|
|
|
|
<i>SmartyPants</i> or footnote prefixes.</p>
|
|
|
|
|
|
|
|
<h3>Aktivate <i>SmartyPants</i> or <i>SmartyPants Typographer</i> parser</h3>
|
|
|
|
|
|
|
|
<p><i>SmartyPants</i> and <i>SmartyPants Typographer</i> translate plain ASCII
|
|
|
|
punctuation characters into "smart" typographic punctuation HTML entities.</p>
|
|
|
|
|
|
|
|
<p><strong>You have to choose the <code>lib</code> version of
|
|
|
|
<i>PHP-Markdown</i> to activate <i>SmartyPants</i>!</strong></p>
|
|
|
|
|
|
|
|
<p>Documentation: <a href="https://michelf.ca/projects/php-smartypants/"><i>PHP SmartyPants</i></a></p>
|
|
|
|
|
|
|
|
<h2 id="notes">Notes</h2>
|
|
|
|
|
2019-06-09 15:33:42 +02:00
|
|
|
<h3>Plugin ordering</h3>
|
|
|
|
|
|
|
|
<p>The Markdown plugin should always be placed <strong>after the GeSHi-Plugin</strong>
|
|
|
|
(<code>serendipity_event_geshi</code>), but before all plugins that expect HTML
|
|
|
|
as their input.</p>
|
|
|
|
|
2017-08-06 14:16:32 +02:00
|
|
|
<h3><i>CSS</i> for footnotes</h3>
|
|
|
|
|
|
|
|
<p>The plugin will add some <i>CSS</i> to style footnotes and footnote markers:</p>
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
/* 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 */
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|