Thu, 07 Dec 2006

Writing Entries [Metadata-mood=good]

The Format of an Entry

PyBlosxom entries consist of three parts: the title, the metadata, and then the body of the entry. The first line is title of the entry. Then comes the metadata of the entry (if any). After the metadata comes the body of the entry.

The title consists of a single line of plain text. You can have whatever characters you like in the title of your entry. The title doesn't have to be the same as the entry file name.

The metadata section is between the title line and the body of the entry. It consists of a series of lines that start with the hash mark (#), then a metadata variable name, then the metadata variable value.

The body of the entry is written in HTML and comprises the rest of the entry file.

Here's an example first post entry:

Example - first post

This is my first post!

<p>
  This is the body of the first post to my blog.
</p>

Here's a more complex example:

Example - more complex first post

The rain in Spain....
<p>
  The rain
</p>
<p align="center">

  in Spain
</p>
<p align="right">
  is <font color="ff0000">mainly</font> on the plain.
</p>

Here's an example of a post with metadata:

Example - first post with metadata

The rain in Spain....
#mood bored
#music The Doors - Greatest Hits Vol 1

<p>
  The rain
</p>
<p align="center">
  in Spain
</p>
<p align="right">
  is <font color="ff0000">mainly</font> on the plain.

</p>

The metadata variables here would be available in your story template. So for the above example, the template variable $mood would be filled in with bored and $music would be filled in with The Doors - Greatest Hits Vol 1.

[23:35] | [] | #-permalink-#