Skip to content
lepture edited this page Oct 31, 2011 · 8 revisions

Write

Write your post in postdir (default folder is content).

You can write your post in markdown markup or restructedText markup, and you can even write one post in markdown and write another post in restructedText.

Format of Markdown

Markdown post file with an extension of .md or .mkd or .markdown.However .mkd is recommended.

A quick look:

-----------
title: Your title
date: yyyy-mm-dd
tags: tag1, tag2, tag3
-----------

your content write here

[sourcecode:html]
<div id="demo">
hello world
</div>
[/sourcecode]

text here

Format of restructedText

restructedText post file with an extension of .rst.

A quick look:

title
========

:date: yyyy-mm-dd
:tags:
    - tag1
    - tag2
    - tag3

your content write here

.. sourcecode:: html

    <div id="demo">
    hello world
    </div>

text here

Explain

There are two parts of a post, meta and content. Information of title, date, tags etc. are meta info.

In markdown, all content between ---- (3+ - or =) are meta, the key and value is seprated by :. Meta data must be the very first of the post file.

In restructedText, title is the very first header, other meta info are regular docinfo of restructedText. They must be the very first of the post file.

Meta info

required : title, date

optional:

  • tags for TagWriter
  • folder for FolderWriter
  • public , default is true, optional is false
  • author , default is context.author see Configure
  • template , default is post.html, sepcify which template you want to render your post.

extend : You can provide as many meta data as your wish. They are available via post.yourmetadatakey , see Template

Clone this wiki locally