<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>ode - a simple personal publishing platform for the web</title>
        <link>http://ode-is-simple.com/home/news/friends_of_ode/</link>
        <description>Ode is simple! (Simple means that you know how it works.)</description>
        <language>en</language>
        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
        <generator><!-- name="generator" content="ode/1.2.1" --></generator>
        <managingEditor>rob@ode-is-simple.com (Rob Reed)</managingEditor>
        <webMaster>rob@ode-is-simple.com (Rob Reed)</webMaster>

		<atom:link href="http://ode-is-simple.com/home/index.rss2" rel="self" type="application/rss+xml" />


        <item>
            <title>Here's hoping that 2010 is a great year for Ode.</title>
            <link>http://ode-is-simple.com/home/news/news/announcements/Y-2009/M-12/ode_in2010_2009_1230_258pm</link>
            <description><![CDATA[ <p>Ode in the new year.  </p>

<p>It's just after the first of the year and there is so much in store for Ode in 2010 I wanted to get started right away.  </p>

<p>For those of you who I know watch this site regularly for news, I want to say thanks for your continued interest. I'm happy to be able to tell you that your patience will soon be rewarded.  </p>

<p>For everyone else, welcome to Ode. You've got good timing.  </p>

<p>Here's what to expect in the coming weeks and months:  </p>

<p>Shortly I'll be posting the first publicly available release of Ode itself.  </p>

<h4>About Ode</h4>

<p>I expect that it will work for anyone running an Apache server (or any other webserver that works with CGIs compatible with Apache) with Perl support. (Any reasonably recent version of Perl will do. If Ode won't work with the version of Perl you have installed, then you'll want to update for a host of reasons, least of which is Ode compatibility.)</p>

<p>As for other requirements, the script doesn't depend on anything more exotic than a few of Perl's core modules. You shouldn't need to worry about CPAN or any dependencies whatsoever to get Ode up and running. (The same will be true of a select group of <a href="http://ode-is-simple.com/weblog/about_ode/enhancements/simple_enhancements#simple_enhancements" title="Info about addins at ode-is-simple.com">addins</a> that will be available and maintained with Ode itself. Of course other addins may have different requirements.)</p>

<p>Like everything else about Ode, installation is intended to be simple, but not necessarily easy.  </p>

<p>!--jump--!  </p>

<div class="tangent"><h4>More Information: Simple</h4>  

<p>If you've spent any time browsing this site, you may have figured out that simplicity is a key idea. Just as important is the distinction between 'simple' and 'easy', two terms which I believe are often confused or used interchangeably.  

<p>To my way of thinking, something that is <span class="italicize_me">easy</span> can be accomplished with little to no effort. (This is close to the dictionary definition.) Simple, on the other hand, is a little more subtle. Something that's <span class="italicize_me">simple</span> for you is something that you understand. Anything intended to be simple must be transparent and carefully designed to be easily understood.</p>  

    <p>While easy promises to minimize the effort required to do something, it also typically suggests a limited experience that is not readily adaptable to circumstances not anticipated by the originator. Simple may require a little extra effort, but rewards that effort with knowledge and better utility (e.g. the ability to adapt, extend, or otherwise modify or repurpose the whatever-it-is to suit your unique needs now and in the future).</p>  

<p>Easy may be convenient (when it works for you), but simple is something you can depend on.</p>  

<p>I like to say that Ode is simple with the stipulation that 'simple means that you know how it works'. This seemingly humble goal will require a little investment on the part of everyone involved, developers and end-users alike.</p>  

<p>Something like WordPress, which do I think is wonderful, may be considered easy but is not, in my opinion, particularly simple. You could use WordPress for years without ever hoping to understand how it does what it does. With Ode I wanted to blur the distinction between developer and end user.</p>  

<p>Don't let this intimidate you. If you're comfortable working with files and folders, whether you're familiar with Mac OS X, Windows, Linux or some other modern operating system, regardless of interface, be it command-line or GUI, you should have no trouble installing (and using) Ode.</p>  

<p>Best of all, and this is the key thing about simple, you'll know exactly what installing Ode means.</p></div>  

<p>Each release will include two functionally identical variations.  </p>

<p>The first might be characterized as something like a typical Perl script consisting predominantly of the source code itself with minimal commenting.  </p>

<p>The second version is something else. Though the code itself will be identical to the first version for each release, the source file is heavily annotated and intended to serve as a line-by-line walk-through of the code. I like to think of it as a 'narrative view' of the source.  </p>

<div class="tangent"><h4>More Information: The Annotated Source</h4>  

<p>It's important to understand that though the annotated source does contain the source code, and is executable, the emphasis is on the annotations and not the code. Please don't make the mistake of disregarding this as nothing but obfuscated code. It's an attempt at a narrative approach to the task of developing the software. As such, it is an integral aspect of this project. It captures design-time decisions, serves as documentation, and represents a foundation for future work. (It is also a little unwieldy in its present form.)</p>  

<p>The over 300 pages worth of annotation are intended to represent, in a very literal way, the sort of deep knowledge that underlies the implementation of any software system. It is the application of design decisions as they are made over the development of the system. It is the representation of the knowledge about the program that must be understood to appreciate any particular instance.</p>  

<p>What does this mean to you? Think of the annotated source as the authoritative documentation for Ode.</p>  

<p>While it's possible to read the whole thing from beginning to end (top to bottom, or following the flow of execution), I'm assuming that most people will instead jump to a particular line or section looking for a description of the code (and the corresponding behavior). To facilitate this I'll maintain an HTML formatted copy of the annotated source, such that the source is presented as a single HTML page, with each line of code associated with a named anchor.</p>  

<p>If you're looking for a particular line, just append the line number to the end of the address of the page following a pound symbol ('#').</p>  

<p>For example something like…</p>  

<pre>www.example.net/path/ode_cgi.html#143</pre>  

<p>…would link to a description of line number 143 in the 'code-centric' source file.</p>  

<p class="note">Note: The eventual goal is to explore a general model for writing architecture documentation using Ode as a case study. I'll have much more to say about this in future posts (which you should feel free to ignore if you're not interested). If you are curious, you may want to have a look at a presentation I've put together discussing the challenges of documenting software systems and a <a href="http://ode-is-simple.com/weblog/presentations/arch_doc_model.presentation" title="Gen Model for Architecture Doc presentation at ode-is-simple.com">proposed general model for software architecture documentation</a> I'm working on.</p></div>  

<p>As for how I'm handling version control and that sort of thing, I'm still working that out. I have my own system at the moment that won't scale to support collaborative development or version control as you probably think of it. Initially I'll post official releases to ode-is-simple.com and I ask that anyone with feedback, or other contributions contact me directly (via <a href="http://tinyurl.com/yjk6t3s "Email robreed at ode-is-simple dot com via tinyurl")>email</a>, Twitter -though I don't especially like twitter-, the postal service, or whatever else works for you).  </p>

<p>In addition to the script itself…  </p>

<h4>Addins</h4>

<p>I'll be releasing the small number of addins I've written myself. (There will be more to come.) Each of these will be the subject of one or more future posts here.  </p>

<p>I'm also working on addin 'stubs' for each interface type (think of these as a loose sort of template). These stubs will include the complete interface specification and a 'human-readable' explanation of how the interface works.  </p>

<p><a href="http://ode-is-simple.com/weblog/about_ode/enhancements/simple_enhancements.html" title="more about addins at ode-is-simple.com">Read more about Ode's addins</a>.  </p>

<h4>Themes</h4>

<p>Themes dictate the look and layout of an Ode site.  </p>

<p>I'll be releasing several themes with Ode including one, two, and three column complete designs, and HTML wireframes which you are free to use as is, or modify to suit your needs.  </p>

<div class="tangent"><h4>More Information: Themes</h4>  

<p>The most remarkable thing about Ode's themes is that they're almost completely unremarkable. Themes are pure HTML and CSS. The entire page layout is described by a single file that looks like any other (X)HTML file to a text editor or web design/development app.</p>  

<p>There is no need to change how you work for Ode. Repurposing existing page designs for use with Ode or reworking themes to function with any other platform should be relatively straightforward - assuming the other platform includes some reasonable templating scheme.</p>  

Here is the complete structure for the default theme at ode-is-simple.com  

<pre><code>  
themes/  
    html/  
        content_type.html  
        date.html  
        page.html  
        logic.css  

        images/  
            cod_header.png  
            ode_tag.png  
            ode_title.png  
            xml_badge_bw_sml.png  
</code></pre>  

<p>Of these files, page.html and logic.css would be immediately recognizable to anyone familiar with HTML and CSS, including validation services like <a href="http://validator.w3.org/" title="validator at w3c.org">The W3C Markup Validation Service</a>. (The other files are essentially pro forma and typically they do not need to be modified.)</p>  

<p>page.html starts with a doctype declaration and ends with the closing html tag. Everything a user already knows about HTML and CSS is relevant to themes under Ode. Moreover, there is almost nothing new to learn. Not only is this beneficial for users new to HTML and CSS, but experienced designers and developers can quickly implement a theme under Ode, work out the kinks, and then repurpose it for any other platform without unwinding or otherwise removing the Ode specific elements (because there are virtually no Ode specific elements). It is not necessary to hop among dozens of files inserting bits of markup scattered among sections of PHP and Javascript.</p>  

<p>The fact that Ode themes are so simple does not imply that they are limited. Quite the contrary, Ode's theme mechanism is quite robust. Users can create and simultaneously apply any number of different themes to a single Ode site with the various themes applied on a per request basis.</p>  

<p>Furthermore, Ode supports several features lacking in more established dynamic publishing packages. An example of this is 'dated themes'…</p>  

<p>Let's say that your site has a particular look now. Love it or hate it, you may decide to change the theme in the future. That change may be something as minor as changing a header graphic or as significant as completely redoing the look and layout of the site.</p>  

<p>Sure, the new site looks great, but wouldn't it be nice if visitors had the option of seeing the site as it appeared before the change? With Ode, you can allow for that. Older versions of themes can be archived such that both the new and old versions are available. Visitors can request either the current version (which would typically be the default), or any prior version of the theme to see what your site looked like at any earlier date and time. Ode supports any number of dated archives per theme and of course any number of themes.</p></div>  

<h4>Everything else</h4>

<p>Going forward, this site will be updated regularly with:  </p>

<ul>
<li>More info about Ode itself  </li>
<li>Tips, tutorials, and even screencasts demonstrating how to use Ode  </li>
<li>More addins  </li>
<li>New themes  </li>
<li>Information about 3rd party software and services that work well with Ode  </li>
<li>Hopefully a lot of content from a growing community of users (addins, themes, feedback, etc.). </li>
</ul>

<p>If you have any questions, comments, or concerns, don't hesitate to contact me at <a href="http://tinyurl.com/yjk6t3s" title="Email robreed at ode-is-simple dot com via tinyurl">robreed at ode-is-simple dot com</a>. I'd love to hear from you.  </p>

<p>Here's hoping that 2010 is a great year for Ode. I'll need your help. That's for sure!  </p>

<p>Rob  </p>
 ]]></description>
            <pubDate>Wed, 30 Dec 2009 14:58:00 EST</pubDate>
            <guid>http://ode-is-simple.com/home/news/news/announcements/Y-2009/M-12/ode_in2010_2009_1230_258pm</guid>
            <!-- <guid>http://ode-is-simple.com/home/2009/12/30/14/58/00/</guid> -->
        </item>


        <item>
            <title>Introducing Ode (Hello :)</title>
            <link>http://ode-is-simple.com/home/introduction/about_ode/introduction/ode_introduction</link>
            <description><![CDATA[ <p>Do we need another publishing platform? You might guess that my answer to that question is, "Yes! At least I think we need this one."  </p>

<p>Let's start by talking about what Ode isn't. It's not antoher WordPress. I think the people responsible for that platform are doing just about as good a job with it as is possible.  </p>

<p>If you're looking for something with a relational database management system like MySQL at the backend and 4+ MB worth of PHP, Javascript and CSS then you really should check out that project. I'm not being insincere or cynical I really do think WordPress is pretty fantastic, but Ode is something different.  </p>

<p>That package (and many others) do more than Ode at the moment but as I've already said, Ode is different.  </p>

<p>Different how? Ode is simple.  </p>

<ul>
<li>Ode itself is a single Perl script.  </li>
<li>Content are simple plain-text files.  </li>
<li>The look at layout of an Ode site is determined by a theme that is nothing more than standard (X)HTML and CSS.  </li>
</ul>

<p>Is that all there is to it?  </p>

<p>Are <a href="http://gizmodo.com/tag/lego/" title="Lego tagged posts at gizmodo.com">Legos</a> just interconnectable plastic blocks? <br />
No, that's <a href="http://ode-is-simple.com/home/about_ode/posts/" title="Introducing Ode">just the beginning...</a>  </p>
 ]]></description>
            <pubDate>Wed, 11 Feb 2009 13:15:59 EST</pubDate>
            <guid>http://ode-is-simple.com/home/introduction/about_ode/introduction/ode_introduction</guid>
            <!-- <guid>http://ode-is-simple.com/home/2009/02/11/13/15/59/</guid> -->
        </item>


        <item>
            <title>Simple posts</title>
            <link>http://ode-is-simple.com/home/introduction/about_ode/posts/simple_posts</link>
            <description><![CDATA[ <p>Because posts are plain-text files you're free to use any editor you like. That's a big deal. There are many fantastic editors available, many of the best are open source apps and of course there are also some great commercial applications.</p>

<p>These editors are as varied as the people who use them and the jobs they're asked to do. If you were to ask enough people, the answer to the question, "Which is the best editor?" is likely to result in nearly as many answers as the total number of choices. One thing is for sure, editors, as a class, are some of the most mature, subtlety brilliant software applications available. Why then, when it comes to writing online, are we asked to abandon these finely honed tools in favor of the blunt instrument that is the HTML form? Even with all of the new spiffy 'Ajax-ified' features that have come to define the new wave of web apps, the best web-based option is a poor substitute for even a mediocre standalone editor.</p>

<p>Ahh, but being able to write in a browser is so much more convenient. I agree... Ode's simple posts allows us to do both :) (More on web-based posting later.)</p>

<p><a href="http://ode-is-simple.com/home/about_ode/writing/simple_writing">Next (Simple Writing)</a></p>
 ]]></description>
            <pubDate>Wed, 11 Feb 2009 13:15:58 EST</pubDate>
            <guid>http://ode-is-simple.com/home/introduction/about_ode/posts/simple_posts</guid>
            <!-- <guid>http://ode-is-simple.com/home/2009/02/11/13/15/58/</guid> -->
        </item>


        <item>
            <title>Simple writing for the web</title>
            <link>http://ode-is-simple.com/home/introduction/about_ode/writing/simple_writing</link>
            <description><![CDATA[ <p>The purpose of XHTML and CSS is two-fold.</p>

<p>Firstly, to allow the developer or designer to control the structure and layout of a site, and secondly to style or format content.</p>

<p>The structural bit is the responsibility of XHTML and the job of formatting and style falls to CSS.</p>

<p>The past several years have seen a lot of work in this area. From those efforts we have the emergence of standards based on CSS and the formalization of HTML as an application of XML. Combined, these technologies make a solid architecture for publication, they're terrible authoring or writing tools. They're just not simple enough for the job.</p>

<ul>
<li>The syntax is (necessarily) formal
which results in a lot of overhead.
Far too much for efficient writing.</li>
<li>While complexity helps a markup language
to be expressive and precise it leads to a laborious and error-prone
writing experience.</li>
<li>Syntax errors break the interpretation of the markup
and detract from content.</li>
<li>The burden of slogging through syntax
discourages content creation.</li>
<li>Mistakes in syntax with XHTML tend to cascade through documents
in odd ways causing unexpected
and often difficult to diagnose problems.</li>
<li>Noisy markup distracts from and complicates writing and editing.
Working with XHTML directly,
it is not unusual for the amount of syntax
to exceed the content itself!</li>
</ul>

<p>For these reasons various lightweight markup languages have been developed for the purpose of presenting a minimal syntax intended to facilitate a more natural style of writing. These languages are typically implemented as both a syntax and a program capable of translating between its own grammar and XHTML.</p>

<p>These are intended to address many of the problems associated with writing on the web by:</p>

<ul>
<li>Simplifying plain-text formatted (source) documents
so that they are as readable as possible,
even without being converted.</li>
<li>Encouraging the appropriate use of formatting
to improve the readability of the resulting XHTML
as displayed in the browser.</li>
<li>Avoiding the problem of mistakes cascading through a document.
Broken syntax simply does not translate and does not disturb
the rest of the document.</li>
</ul>

<p>The unofficial but preferred syntax for Ode is Markdown. There are a few alternatives, most prominent among them, Textile, which is another very nice implementation of a lightweight language.</p>

<p>So why Markdown?</p>

<p>Because more than the others, Markdown emphasizes readability of the plain-text document and that seems very much in agreement with Ode.</p>

<p>The other reason to choose Markdown is that it is written first in Perl and Ode is itself a Perl app.</p>

<p>Is this a big deal?
Are we limited only to Perl when working with Ode?</p>

<p>No, but keeping as much of what is distributed with Ode in Perl will simplify things for new developers (more on development later).</p>

<p>I'll let the author of Markdown explain its advantages and raison d'être:</p>

<blockquote>
  <p>Markdown is a text-to-HTML conversion tool for web writers.
Markdown 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>Thus, “Markdown” is two things:
(1) a plain text formatting syntax; and
(2) a software tool, written in Perl,
that converts the plain text formatting to HTML.
See the Syntax page for details pertaining to Markdown’s formatting syntax.
You can try it out, right now, using the online Dingus.</p>

<p>The overriding design goal for Markdown’s
formatting syntax is to make it as readable as possible.
The idea is that a Markdown-formatted document should be publishable as-is,
as plain text,
without looking like it’s been marked up with tags
or formatting instructions.
While Markdown’s syntax has been influenced
by several existing text-to-HTML filters,
the single biggest source of inspiration for Markdown’s syntax
is the format of plain text email.</p>
</blockquote>

<p>Does that mean that you're stuck with Markdown?</p>

<p>No, Markdown is implemented as an addin. You're free to replace it with some other syntax using Ode's addin architecture (more on addins and development later).</p>

<p>It does mean that Markdown will always be distributed with Ode, that you should expect Markdown to work, and discussion of Markdown is considered relevant to this project.</p>

<p>In addition to Markdown, posts support HTML. Just keep in mind that they are contained within a larger page structure. So for example a body tag (<body>) should never find its way into your posts.</p>

<p><a href="http://ode-is-simple.com/home/about_ode/content_management/" title="Content Management">Next (Simple Content Management)</a></p>
 ]]></description>
            <pubDate>Wed, 11 Feb 2009 13:15:57 EST</pubDate>
            <guid>http://ode-is-simple.com/home/introduction/about_ode/writing/simple_writing</guid>
            <!-- <guid>http://ode-is-simple.com/home/2009/02/11/13/15/57/</guid> -->
        </item>


        <item>
            <title>Simple content management</title>
            <link>http://ode-is-simple.com/home/introduction/about_ode/content_management/simple_content_management</link>
            <description><![CDATA[ <p>We've already hinted that Ode uses the filesystem as a content database, which of course is different than saying that there is no content database. Decades worth of effort speak to the effectiveness of filesystems at storing and organizing files and the data they contain. Modern filesystems are made to handle the rigors and requirements of modern operating systems and include numerous features designed to ensure the scalability, security, integrity, and availability of data. That's good enough for me.</p>

<p>Sure a filesystem is different than a relational database and we need to take advantage of its strengths rather than railing against its limitations. For example, filesystems are strongly hierarchical so we should take advantage of that organization.</p>

<p>Posts are organized hierarchically according to a topic-based categorization scheme. For example, the root of the weblog may contain any number of folders, which are categories, such as 'Technology', 'Politics', 'Music', 'School', etc. Each of these categories may contain any number of posts as well as subcategories (i.e. subdirectories). For example, 'School' may contain subdirectories for each of a number of different courses. Within each of these subcategories there may be more posts and additional categories.</p>

<p>As long as we are willing to organize posts hierarchically the advantages of using the file system as content database are numerous.</p>

<p>If you know how to manage and organize other types of files then you already know how to manage your Ode site (simple, right?). Even if you're new to computing, the skills you develop working with Ode are applicable to just about everything else you'll do with a computer.</p>

<p>That's just one aspect of simple content management. Here are some others:</p>

<p>Adding, editing, and deleting posts - your operating system's file manager and/or your editor are all you need.</p>

<p>Importing and exporting content - because posts are discrete text files, there are no distinct import/export procedures. With plain-text files you are in great shape to migrate your data to any other platform and if you are using something else now, at the very least you should be able to recover your content as text. You do not need to worry about being locked into Ode or losing access to your data.</p>

<p>Backing up and restoring - your posts are dicrete files which, as far as your operating system and backup routines are concerned, are no different than the other files on your computer. In fact the same thing goes for the rest of your Ode installation (not just your content). You can continue to use whatever backup mechanism you're using now. What's more your site can be backed up and restored incrementally at the level of a single post.</p>

<p>If your're not backing up your files currently, you really should start. In this case Ode doesn't complicate the decision about how to manage it or limit your range of options.</p>

<p>Permissions - Permissions for Ode are governed by the file and folder permissions and access controls dictated by your operating system. There's nothing special that you need to be conerned about. Even if you're not comfortable with permissions, for the vast majority of installations a simple permissions 'recipe', i.e. a straightforward set of rules is all you need. (See the documentation for more info.)</p>

<p>Interacting with a remote server - This is no more complicated than file transfer. Use sFTP/SSH/WebDAV/HTTP or any other file sharing protocol that works for you/your hosting provider/your environment.</p>

<p>File synchronization - Let's say that you want to run an instance of Ode locally on a laptop and also run a publically available server with the same content. For those times when you have your laptop but no internet access, you'd like to be able to create and edit posts locally. At other times, you may not have your laptop but you do have access to the internet from some other computer. You'd like to be able to sync the local and public sites.</p>

<p>This is the sort of thing that is very difficult to do with other packages and trivial with Ode. Taking advantage of best in class file synchonization utilities for your platform, you have the ability to mirror changes in either direction.</p>

<p>Well, that's probably enough of the simple content management shtick and there is so much more to discuss. Before moving on I want to point out that simple content management does not mean stupid content management. As simple as it is, we can do some clever things with Ode. Some examples:</p>

<p>In addition to the hierarchical categorization scheme that results naturally from the organization of files and directories, Ode is capable of interpreting date based requests. </p>

<p>For example:</p>

<p>(put in a table)
sample.net/weblog/2007/         All posts created in 2007
sample.net/weblog/2007/01/      Posts from January 2007
sample.net/weblog/2007/01/02/   Only those posts dated January 2nd.</p>

<p>What's more we can combine the date and categorization schemes to limit posts in a given category by date, e.g.:</p>

<p>(put in a table)
sample.net/weblog/Technology/Apple/MacOSX/2007/01/ 
Only posts in the MacOSX category created in January of 2007.</p>

<p>This scheme, which is ideal for date-based navigation and browsing, is built into Ode. Other schemes can be implemented using Ode's addin architecture. (More about addins later.)</p>

<p>Furthermore these date-based 'paths' make for perfect permalinks allowing you to reorganize your site at will without breaking links or violating one of the key tenants of the web, namely 'Cool URIs don't change'.</p>

<p>But that's not all. Because Ode sites are organized hierarchically (by date or category) they play nicely with search engines like Google. Just as simple posting means that we can write more efficiently, simple content management means that what we write can be shared and discovered by others more efficiently.</p>

<p>But we still haven't extracted all of the simple goodness.</p>

<p>Simple content management, in combination with Ode's themes, allows us to syndicate the entire site and every category separately. Maybe one of our visitors is interested in everything we write and another only in what we have to say about 'Technology', or just 'Technology/Apple'. Ode has the flexibility to do that, and without requiring that we make any special arrangements.</p>

<p><a href="http://ode-is-simple.com/home/about_ode/simple_themes/">Next (Simple Themes)</a></p>
 ]]></description>
            <pubDate>Wed, 11 Feb 2009 13:15:56 EST</pubDate>
            <guid>http://ode-is-simple.com/home/introduction/about_ode/content_management/simple_content_management</guid>
            <!-- <guid>http://ode-is-simple.com/home/2009/02/11/13/15/56/</guid> -->
        </item>


        <item>
            <title>Simple themes</title>
            <link>http://ode-is-simple.com/home/introduction/about_ode/simple_themes/simple_themes</link>
            <description><![CDATA[ <p>Themes allow for customization of an Ode site.</p>

<p>The most remarkable thing about Ode's themes is that they're almost completely unremarkable. Themes are pure HTML and CSS. The look and layout of a page is described by a single file that looks like any other (X)HTML file to your text editor or web design and development app.</p>

<p>There is no need for you to change how you work with HTML/CSS for Ode. Repurposing your existing themes for use with Ode or reworking your Ode themes to work with any other package with a reasonable templating scheme should all be relatively straightforward.</p>

<p>Let's look at the complete structure of a typical Ode theme.</p>

<pre><code>html-2011_0824/
    content_type.html
    date.html
    page.html
    page_no_posts.html
    logic.css

images/
    site_header.png
    ode_mascot110x50.png
    i_heart_validator_badge101x46.png
</code></pre>

<p>Of these, page.html and logic.css together are almost entirely responsible for the look and layout of the site.</p>

<p>'logic.css' is a CSS stylesheet, identical to any other you might see. There is nothing special about a stylesheet for an Ode theme. If you know how to use CSS to style a webpage then you already know how to style an Ode theme.</p>

<p>There is <em>almost</em> nothing Ode-specific 'page.html'. It starts with a doctype declaration
and ends with the closing html tag. All nearly identical to a standard HTML document, except that it contains some Ode-specific variables that serve as placeholders. When run in response to a request from a web browser or some other UA (user agent), the script substitutes replaces the variables with appropriate values. These variables are powerful, but just as importantly they're simple to work with.</p>

<p>For example, nearly every theme will include the variable</p>

<pre><code>$config::site_title
</code></pre>

<p>It should be obvious that this represents the site title. Just as importantly, it shows you that this is a user configurable variable that's set in Ode's config file.</p>

<p>The config file is a plain text file you can edit in your favorite editor, or other app of choice, in the exact same way you create content for your site, and design your themes.</p>

<p>If you look at that plain text file, you'll find quite a few settings. All of them extensively annotated, so you exactly what each of them does, and what sort of value is expected.</p>

<p>Site title is the fifth setting in the file. And as is described in detail by the annotations included in the file itself, you set the site title by replacing the string on this line:</p>

<pre><code>$site_title = "My brand new Ode site";
</code></pre>

<p>This tells us that by default the title of every Ode site is:</p>

<pre><code>My brand new Ode site
</code></pre>

<p>If you wanted to change that, which of course you will, you'd just change the text between the double-quotes, like so:</p>

<pre><code>$site_title = "ode - a simple personal publishing platform for the web";
</code></pre>

<p>Hopefully you'll agree that's pretty easy to understand.</p>

<p>$config::site_title is the title of the site and is set in the config file.</p>

<p>Other variables serve different purposes, but they all work in the same way.</p>

<p>Do these variables 'play well' with standard HTML and CSS? Yes, they do!</p>

<p>For example, to style the site title (as well as incorporate it into the site structure) we could just wrap it in a header (an h1 seems appropriate for the site title.) Take would look like:</p>

<pre><code>&lt;h1&gt;$site_title&lt;/h1&gt;
</code></pre>

<p>And when the script substitutes the value for the variable, we get</p>

<pre><code>&lt;h1&gt;My brand new Ode site&lt;/h1&gt;
</code></pre>

<p>There is nothing at all non standard about that.</p>

<p>Everything you know about HTML and CSS applies. There is nothing new to learn. What's more, there's no need to hop around among dozens of files inserting bits of HTML here and there (being careful not to disturb sections of PHP and Javascript).</p>

<p>Not only is this beneficial for users new to HTML and CSS, but experienced designers and developers can quickly build an Ode theme using the same workflow and reusing HTML code they already have on hand, work out the kinks, and then repurpose it for any other platform - without rolling back a lot of Ode specific elements (there aren't any).</p>

<p>Simple doesn't mean limited. You can have any number of themes with Ode and switch among them at will. You can display any page using any installed theme without changing the configuration of your site. You can apply a different default theme for any category or subcategory on your site. (Themes associated with a category carry through to all subcategories but can be easily overridden.) Using nothing more than your browser's address bar, or standard link, have different looks for pages on your site, and even present multiple views of the same page.</p>

<p>Hopefully this little introduction has you excited about what's possible with Ode's themes. Future posts will explore themes in greater detail - from installing themes, to a list of variables available for use in themes. We'll also look briefly at the other required theme files that I didn't discuss here.</p>

<p>So for example, you can establish a default theme for the entire site simply by associating one with the root category. If we want a consistent look for the entire site then that's all there is to it. However, if the 'Technology' and 'Music' categories should have different themes we can easily override the default for those two without affecting the rest of the site.</p>

<p>How does this work?</p>

<p>Each category can contain a 'Themes' directory. Each 'Themes' directory can contain any number of individual themes, each of which is contained in its own folder along with all of the associated files.</p>

<p>When a visitor requests an address, that request specifies one of either:</p>

<p>the root of the weblog
(ode-is-simple.com/weblog/),</p>

<p>some subcategory
(ode-is-simple.com/weblog/meta/),</p>

<p>or an individual post
(ode-is-simple.com/weblog/meta/hello_world).</p>

<p>Ode determines which theme to use by starting at the most specific path to the request and working back toward the root. As soon as it finds a theme that matches the request (or a default if no specific theme was specified), it stops looking.</p>

<p>Themes are flexible enough that we can create any look we might want.</p>

<p>Bundled with Ode you will find one, two, and three column themes as well as several specialty themes including:</p>

<p>print theme
text page theme (suitable for longer posts)
RSS 2.0 theme
presentation theme (compliant with the S5 standard)</p>

<p>All of these themes are standards compliant (XHTML 1.0 Strict).</p>

<p>What's more, care has been taken to insure that the themes are logically organized and as simple as possible. Working from these you should be able to create a site of your own design with a minimum amount of fuss.</p>

<p><a href="http://ode-is-simple.com/home/about_ode/enhancements/">Next (Simple Enhancements)</a></p>
 ]]></description>
            <pubDate>Wed, 11 Feb 2009 13:15:55 EST</pubDate>
            <guid>http://ode-is-simple.com/home/introduction/about_ode/simple_themes/simple_themes</guid>
            <!-- <guid>http://ode-is-simple.com/home/2009/02/11/13/15/55/</guid> -->
        </item>


        <item>
            <title>Simple upgrades</title>
            <link>http://ode-is-simple.com/home/introduction/about_ode/upgrades/simple_upgrades</link>
            <description><![CDATA[ <p>Upgrading Ode involves replacing a single file. Because configuration details are kept out of the script itself (and your content, themes, and addins are unaffected by an upgrade) all that's required is replacing the current version of the script with the new one.</p>

<p>Simple Configuration</p>

<p>There is a single configuration file. A default config file is available for download (and included in the bundles and XAMPP packages). All of the configuration options are well documented and include sample settings to help resolve any ambiguity in the description of what these options do and how they should be set.</p>

<p>What's more, you won't find dozens or hundreds of options. Expect to spend no more than 5 - 10 minutes configuring Ode, the majority of it reading through the descriptions of the various settings. That time will save you potentially many hours trying to resolve problems due to misconfiguration.</p>

<p><a href="http://ode-is-simple.com/home/about_ode/security/">Next (Simple security)</a></p>
 ]]></description>
            <pubDate>Wed, 11 Feb 2009 13:15:54 EST</pubDate>
            <guid>http://ode-is-simple.com/home/introduction/about_ode/upgrades/simple_upgrades</guid>
            <!-- <guid>http://ode-is-simple.com/home/2009/02/11/13/15/54/</guid> -->
        </item>


        <item>
            <title>Simple enhancements</title>
            <link>http://ode-is-simple.com/home/introduction/about_ode/enhancements/simple_enhancements</link>
            <description><![CDATA[ <p>Ode implements an addin architecture. Addins are modules that extend or redefine how Ode operates. You may be familiar with other projects where this same sort of thing is referred to as an extension, module, addon, plugin, etc.</p>

<p>I chose the term addin because</p>

<ol>
<li><p>'add in' describes more accurately than the other terms how modules work with Ode,
i.e. simply add them to your installation and you're done.
The term 'addon' seems a little disparaging, as if the modules are of
lesser importance. Moreover, because it's possible to replace core routines included
in the script itself and not just 'add on' new functionality addon seems
not entirely accurate.</p></li>
<li><p>addin is not as commonly used as some of the other terms.
So it is less likely that
references to Ode addins in documentation or tutorials
will be confused with something else,
for example Perl or Apache 'modules'.</p></li>
</ol>

<p>Essentially addins allow anyone familiar with Perl and Ode to redefine just about any aspect of the script (by redefining key subroutines) or extend the functionality of Ode in an infinite number of ways by introducing entirely new routines (more on developement later).</p>

<p>To install an addin simply download and copy it to Ode's addins directory. Each addin is completely self-contained. No need to worry about
becoming confused over which what goes where.</p>

<p>These individual addin directories are referred to as bundles.</p>

<p>Is there anything that makes Ode's addins simple? I'm glad you asked.</p>

<p>Addins are managed by directly manipulating corresponding files via the filesystem, in much the same way as posts.</p>

<p>Interacting with the addin files directly avoids the problems and confusion that can result from using a web form that deals with the state of addins on your behalf.</p>

<p>For example,</p>

<p>With Ode you will deal with addins in exactly the same way whether everything is running smoothly or you're having trouble.</p>

<p>With many other packages if a module malfunctions you may lose control over it from the administration interface, or what's worse a malfunctioning or misconfigured module may prevent the software from running at all, which means that you cannot access the admin interface, and in turn cannot fix or remove the problem module. Or at least you can't do these things in the way that you would normally manage the software.</p>

<p>With Ode you specify an absolute order in which installed addins are run. This simplifies interaction among addins and puts you in control. After all, no one else has exactly the same installation that you do.</p>

<p>Modules can be disabled without being moved or uninstalled.</p>

<p>Addins are disabled by appending a trailing underscore to the bundle name. The advantage here is that it's possible to see at a glance whether a module is enabled or disabled.</p>

<p>Disabled modules do not affect the behavior of Ode and do not impact performance.</p>

<p>Without talking too much about development here, I do want to make a couple of points about the philosophy of addin development under Ode.</p>

<p>Addins should be self-sufficient with a minimum of dependencies.</p>

<p>External dependencis are problematic because they add to the minimum requirements necessary to use the software, and while adding one or another library may not be a problem for some installations it may be very nearly impossible for others. Furthermore, external dependencies complicate installation, configuration, and documentation.</p>

<p>Internal dependencies among addins should also be avoided. Things get tricky when, as an end-user, I can install the module I want but not some other module it requires because of a conflict.</p>

<p>In the interest of minimizing internal dependencies, addins should be single purpose. </p>

<p>If, as an end user, I'm installing a module to pick up one feature, it can complicate things for me if a bunch of other (unwanted) routines come along for the ride.</p>

<p>Small, single purpose modules should mean faster, more reliable development and finer granularity of control for the end user over what's running on her site.</p>

<p>All addins should be made available here at ode-is-simple.com.</p>

<p>This means that we won't need to worry about hunting for these things all over the internet. </p>

<p>Let me qualify that, of course developers are free to create addins only for themselves or put them up at their own site rather than submitting them to ode-is-simple. But, in order to keep things simple (and safe), addins which are not submitted to and downloaded from ode-is-simple.com are considered outside of the scope of the project.</p>

<p>Obviously, all developers are encouraged to submit their addins.</p>

<p>The following addins are available with Ode immediately:</p>

<p>Indexette - indexes posts so that Ode doesn't need to completely traverse its content directory with every request. Instead, Ode discovers posts by examining the index. </p>

<p>Additionally, Indexette allows new posts to be included without rebuilding the entire index.</p>

<p>Finally, Indexette helps to preserve the creation dates for posts. This is an important aspect of the addin. Without Indexette Ode considers the modification time of the file to be the post date. The trouble with this arrangement is that modification times may be updated when posts are edited and may change as a result of other actions. These 'other actions' are not always predictable or consistent from one installation to another (depending on various factors).</p>

<p>Indexette adds a tag to each post with the original modification time when the post is created. Post dates can be updated by manually changing the date and time recorded in the tag or by deleting the tag altogether (which causes indexette to add a new tag corresponding to the current modification time).</p>

<p>Taking this a step further, Indexette can be made to keep the modification time of the files in sync with the post date as recorded in the tag. This makes it possible to disable the Indexette addin without affecting the post dates or migrate posts to some other platform with the original modification times intact.</p>

<p>Everyone is encouraged to use Indexette.</p>

<p>Editedit - Pronounced 'Edited it', Editedit, in combination with the included edit theme allows posts to be added and updated using only a web browser.</p>

<p>The bundled edit theme includes a live preview of the post that understands Markdown (based on Showdown, a Javascript implementation). In other words, as you edit the text of the post, the addin provides a formatted preview.</p>

<p>Additionally, you can inspect the corresponding HTML markup and the previous revision of your post.</p>

<p>Editedit includes a basic password mechanism but because the password is transmitted as plain-text you should not use Editedit without taking additional security measures (more on security later).</p>

<p>Editedit is very convenient, but don't forget about your editor! Also, please be careful when posting this way because Editedit does not (yet) autosave. If you navigate away from the page while you are editing a post, close your browser window, or if your your browser or operating system malfunctions, you may lose any unsaved changes.</p>

<p>To be safe, if you want to use the web form and you have a long post, use a text editor and copy and paste the finished post to the Editedit form.</p>

<p>Markdown - Markdown has already been dicussed (see Simple Writing). The Markdown addin is nothing more than a wrapper around the Markdown script itself.</p>

<p>Exscape - Allows you to define various escape sequences, for example replacing special characters with corresponding HTML entity references. Keep in mind that some of this is handled by Markdown (See the Markdown syntax reference for more information about how Markdown handles escape sequences).</p>

<p>Many more addins are on the way. I'll shortly post a list of the addins I'm working on and invite other developers to do the same, i.e. start working on new addins and post a list of addins they're working on and a 'best-estimate' timeframe so that other developers and end-users can anticipate work that is being done related to the project.</p>

<p>Note that Ode does not use a package manager (like CPAN). Why? Doing so adds an external dependency, potentially fractures support and maintenance issues between multiple projects, and complicates initial setup and configuration, especially for users new to both Ode and the package manager who must, at the outset, contend with multiple new projects.</p>

<p><a href="http://ode-is-simple.com/home/about_ode/upgrades/">Next (Simple upgrades)</a></p>
 ]]></description>
            <pubDate>Wed, 11 Feb 2009 13:15:54 EST</pubDate>
            <guid>http://ode-is-simple.com/home/introduction/about_ode/enhancements/simple_enhancements</guid>
            <!-- <guid>http://ode-is-simple.com/home/2009/02/11/13/15/54/</guid> -->
        </item>


        <item>
            <title>Simple security</title>
            <link>http://ode-is-simple.com/home/introduction/about_ode/security/simple_security</link>
            <description><![CDATA[ <p>Let's be honest, security isn't that simple. W can keep security simple for Ode by doing as little as possible. Anything we do in Ode itself is unlikely to improve the security outlook and in fact may introduce more risk. Instead, let's rely on some trusted friends: SSH, sFTP, SSL.</p>

<p>SSH is a network protocol that allows for secure data exchange between computers. SSH is a well tested, widely distributed, open standard and is very well regarded. What's more, SSH is very flexible, making possible a wide range of communications from remote administration through a secure console, file transfer, and tunneling of other protocols (whereby unsecure applications and there protocols are redirected through the SSH to a remote host over the encrypted SSH connection).</p>

<p>SFTP is a file transfer protocol which is typically implemented on top of SSH. Using SFTP is no more difficult than using FTP, in fact many people confuse confuse the two. Chances are that your file transfer client supports SFTP (if not it's time to get a new client).</p>

<p>Both SSH/SFTP are relatively easy <em>to use</em>. The details of how they work to establish and maintain a secure channel are actually quite complex. Support for SSH and SFTP is built into most modern mainstream operating systems, and available for every one. Furthermore, if you plan on hosting your site, you should expect your provider to support at least SFTP in addition to possibly other secure mechanisms for interacting with your site (all of which will work well with Ode). See the documentation for help enabling and using SSH and SFTP for Linux, Mac OS X, and Windows.</p>

<p>Last but not least there is TLS (Transport Layer Security)/SSL (Secure Sockets Layer). If you have heard of SSL but not TLS, it is an update to SSL intended to bring SSL into the fold as a standard internet protocol (under the auspices of the IETF) as well as introduce some new features and resolve outstanding issues with SSL.</p>

<p>These protocols provide for secure transactions between browser and server on the web, i.e. secure HTTP transactions. HTTP is the application protocol of the web and is itself is not secure. SSL is a secure lower level protocol whcih can be used to encrypt and transport HTTP data. Support for the protocol is included in all mainstream web browsers in such a way that it is easy to secure transactions between the brower and a web server using SSL. Like SSH and SFTP, SSL is easy <em>to use</em>. Unlike SSH and SFTP the web server must be configured properly to use SSL. Configuring your web server to use SSL is not necessary difficult to do but it is not trivial either.</p>

<p>If you are hosting your site, your provider may be able to help you configure your website to use SSL (they will probably charge you a fee for this service). If you are hosting your own server you can configure your server to use SSL on your own. See the documentation for help setting up SSL for Apache.</p>

<p>Do you need to use SSL? It depends. If you are sending sensitive information between your web browser and a web server then yes, you really should use SSL. OK, well do I need to do that then? Normally no, but there is an exception.</p>

<p>The rule</p>

<p>Typically the information you transmit between your computer and your web browser is not secure. The whole idea of having a public web server is to share information. If anyone is free to browse the content of your site there is little point in encrypting and otherwise securing that same content as it is en route. You should never store information you do not intend to make public on a public web server unless you are absolutely confident you know what you're doing.</p>

<p>The exception</p>

<p>The Editedit addin allows you to post to your site through a browser. Presumably the post is intended to be public so as discussed above we don't necessary care about encrypting the post. However, so that not just anyone can edit your posts, Editedit includes a basic password mechanism. When the option to use a password is enabled, the correct password must be specified to add or edit content on the site. Without SSL, this password will be transmitted as clear text. Unlike the post, the password is sensitive because with the password anyone can edit your site. So you really should enable SSL to secure the password whenever you use the Editedit addin.</p>

<p>Generally speaking, it is not super difficult to configure SSL, though it is a bit of a pain. Unfortunately, for those of you with a hosting provider, you are subject to their requirements, restrictions (and fees).</p>

<p>The final point I want to make about SSL. Typically setting up SSL involves creating a certificate, which is essentially an identifier and a key and having that certificate signed by a certificate authority, which a third party well known to be reputable and capable of verifying and endorsing the identity of the entity represented by the certificate.</p>

<p>If you don't know anything about cryptography its enough for the discussion here to know that a key is randomly generated string of sufficient length and complexity that they cannot be guessed or discovered through trial and error.</p>

<p>The Certificate Authority (CA) plays an integral role in guaranteeing the security of public key cryptography. Communication cannot be considered secure unless the authenticity of all entites involved can be established, i.e. there must be a guarentee that you know with whom you are communicating.</p>

<p>That having been said, if you are setting up SSL on your own server solely for your own use then you can forgo the CA and 'self-sign' your own certificate. You can know that the key is valid without the CA's validation. This may be sufficient for your Ode blog, as long as you are the only person who needs to trust that the certificate is valid. If on the other hand you are using Ode in such a way that visitors to use SSL, then please do work with a certificate authority in the process of setting up SSL. See the documentation for help setting up SSL for Apache.</p>

<p>Please do invest the reasonable amount of time and effort required to configure SSL. You'll only need to do it up once.</p>

<p>The final point I want to make about security has to do with passwords.</p>

<p>It is highly recommended that any password you use with Ode be different from any other password used on your system!</p>

<p>Otherwise, please be careful to choose a good password.</p>

<p>Some simple guidelines:</p>

<ol>
<li>Password should be at least 6 characters long (preferrably 8 or more)</li>
<li>should not be included in any dictionary.  </li>
<li>should use a combination of upper and lowercase alpha characters and digits  </li>
<li>should not be associated with you in any way.  </li>
<li>should not be based on a visual cue 'hidden' anywhere near your computer.</li>
</ol>

<p>That's the end of this short introduction to Ode.</p>

<p>Check back for updates (or <a href="http://ode-is-simple.com/home/index.rss2" title="RSS 2.0 feed for ode-is-simple.com/home">subscribe to the site's feed</a>).</p>

<p>You will find more info at <a href="news.ode-is-simple.com/weblog" title="A weblog about Ode (ode-is-simple.com)">news.ode-is-simple.com/weblog</a>, which is a new weblog dedicated to Ode, and topics relevant to the project.</p>

<p>Feel free to contact me if you have any questions or comments at rob @ ode-is-simple dot com.</p>
 ]]></description>
            <pubDate>Wed, 11 Feb 2009 13:15:52 EST</pubDate>
            <guid>http://ode-is-simple.com/home/introduction/about_ode/security/simple_security</guid>
            <!-- <guid>http://ode-is-simple.com/home/2009/02/11/13/15/52/</guid> -->
        </item>


        <item>
            <title>Markdown: Syntax</title>
            <link>http://ode-is-simple.com/home/news/friends_of_ode/markdown_syntax_daring_fireball</link>
            <description><![CDATA[ <h1>Markdown: Syntax</h1>

<ul id="ProjectSubmenu">
    <li><a href="/projects/markdown/" title="Markdown Project Page">Main</a></li>
    <li><a href="/projects/markdown/basics" title="Markdown Basics">Basics</a></li>
    <li><a class="selected" title="Markdown Syntax Documentation">Syntax</a></li>
    <li><a href="/projects/markdown/license" title="Pricing and License Information">License</a></li>
    <li><a href="/projects/markdown/dingus" title="Online Markdown Web Form">Dingus</a></li>
</ul>

<ul>
<li><a href="#overview">Overview</a>
<ul>
<li><a href="#philosophy">Philosophy</a></li>
<li><a href="#html">Inline HTML</a></li>
<li><a href="#autoescape">Automatic Escaping for Special Characters</a></li>
</ul></li>
<li><a href="#block">Block Elements</a>
<ul>
<li><a href="#p">Paragraphs and Line Breaks</a></li>
<li><a href="#header">Headers</a></li>
<li><a href="#blockquote">Blockquotes</a></li>
<li><a href="#list">Lists</a></li>
<li><a href="#precode">Code Blocks</a></li>
<li><a href="#hr">Horizontal Rules</a></li>
</ul></li>
<li><a href="#span">Span Elements</a>
<ul>
<li><a href="#link">Links</a></li>
<li><a href="#em">Emphasis</a></li>
<li><a href="#code">Code</a></li>
<li><a href="#img">Images</a></li>
</ul></li>
<li><a href="#misc">Miscellaneous</a>
<ul>
<li><a href="#backslash">Backslash Escapes</a></li>
<li><a href="#autolink">Automatic Links</a></li>
</ul></li>
</ul>

<hr />

<h2 id="overview">Overview</h2>

<h3 id="philosophy">Philosophy</h3>

<p>Markdown is intended to be as easy-to-read and easy-to-write as is feasible.</p>

<p>Readability, however, is emphasized above all else. A Markdown-formatted
document should be publishable as-is, as plain text, without looking
like it's been marked up with tags or formatting instructions. While
Markdown's syntax has been influenced by several existing text-to-HTML
filters -- including <a href="http://docutils.sourceforge.net/mirror/setext.html">Setext</a>, <a href="http://www.aaronsw.com/2002/atx/">atx</a>, <a href="http://textism.com/tools/textile/">Textile</a>, <a href="http://docutils.sourceforge.net/rst.html">reStructuredText</a>,
<a href="http://www.triptico.com/software/grutatxt.html">Grutatext</a>, and <a href="http://ettext.taint.org/doc/">EtText</a> -- the single biggest source of
inspiration for Markdown's syntax is the format of plain text email.</p>

<p>To this end, Markdown's syntax is comprised entirely of punctuation
characters, which punctuation characters have been carefully chosen so
as to look like what they mean. E.g., asterisks around a word actually
look like *emphasis*. Markdown lists look like, well, lists. Even
blockquotes look like quoted passages of text, assuming you've ever
used email.</p>

<h3 id="html">Inline HTML</h3>

<p>Markdown's syntax is intended for one purpose: to be used as a
format for <em>writing</em> for the web.</p>

<p>Markdown is not a replacement for HTML, or even close to it. Its
syntax is very small, corresponding only to a very small subset of
HTML tags. The idea is <em>not</em> to create a syntax that makes it easier
to insert HTML tags. In my opinion, HTML tags are already easy to
insert. The idea for Markdown is to make it easy to read, write, and
edit prose. HTML is a <em>publishing</em> format; Markdown is a <em>writing</em>
format. Thus, Markdown's formatting syntax only addresses issues that
can be conveyed in plain text.</p>

<p>For any markup that is not covered by Markdown's syntax, you simply
use HTML itself. There's no need to preface it or delimit it to
indicate that you're switching from Markdown to HTML; you just use
the tags.</p>

<p>The only restrictions are that block-level HTML elements -- e.g. <code>&lt;div&gt;</code>,
<code>&lt;table&gt;</code>, <code>&lt;pre&gt;</code>, <code>&lt;p&gt;</code>, etc. -- must be separated from surrounding
content by blank lines, and the start and end tags of the block should
not be indented with tabs or spaces. Markdown is smart enough not
to add extra (unwanted) <code>&lt;p&gt;</code> tags around HTML block-level tags.</p>

<p>For example, to add an HTML table to a Markdown article:</p>

<pre><code>This is a regular paragraph.

&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;Foo&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

This is another regular paragraph.
</code></pre>

<p>Note that Markdown formatting syntax is not processed within block-level
HTML tags. E.g., you can't use Markdown-style <code>*emphasis*</code> inside an
HTML block.</p>

<p>Span-level HTML tags -- e.g. <code>&lt;span&gt;</code>, <code>&lt;cite&gt;</code>, or <code>&lt;del&gt;</code> -- can be
used anywhere in a Markdown paragraph, list item, or header. If you
want, you can even use HTML tags instead of Markdown formatting; e.g. if
you'd prefer to use HTML <code>&lt;a&gt;</code> or <code>&lt;img&gt;</code> tags instead of Markdown's
link or image syntax, go right ahead.</p>

<p>Unlike block-level HTML tags, Markdown syntax <em>is</em> processed within
span-level tags.</p>

<h3 id="autoescape">Automatic Escaping for Special Characters</h3>

<p>In HTML, there are two characters that demand special treatment: <code>&lt;</code>
and <code>&amp;</code>. Left angle brackets are used to start tags; ampersands are
used to denote HTML entities. If you want to use them as literal
characters, you must escape them as entities, e.g. <code>&amp;lt;</code>, and
<code>&amp;amp;</code>.</p>

<p>Ampersands in particular are bedeviling for web writers. If you want to
write about 'AT&amp;T', you need to write '<code>AT&amp;amp;T</code>'. You even need to
escape ampersands within URLs. Thus, if you want to link to:</p>

<pre><code>http://images.google.com/images?num=30&amp;q=larry+bird
</code></pre>

<p>you need to encode the URL as:</p>

<pre><code>http://images.google.com/images?num=30&amp;amp;q=larry+bird
</code></pre>

<p>in your anchor tag <code>href</code> attribute. Needless to say, this is easy to
forget, and is probably the single most common source of HTML validation
errors in otherwise well-marked-up web sites.</p>

<p>Markdown allows you to use these characters naturally, taking care of
all the necessary escaping for you. If you use an ampersand as part of
an HTML entity, it remains unchanged; otherwise it will be translated
into <code>&amp;amp;</code>.</p>

<p>So, if you want to include a copyright symbol in your article, you can write:</p>

<pre><code>&amp;copy;
</code></pre>

<p>and Markdown will leave it alone. But if you write:</p>

<pre><code>AT&amp;T
</code></pre>

<p>Markdown will translate it to:</p>

<pre><code>AT&amp;amp;T
</code></pre>

<p>Similarly, because Markdown supports <a href="#html">inline HTML</a>, if you use
angle brackets as delimiters for HTML tags, Markdown will treat them as
such. But if you write:</p>

<pre><code>4 &lt; 5
</code></pre>

<p>Markdown will translate it to:</p>

<pre><code>4 &amp;lt; 5
</code></pre>

<p>However, inside Markdown code spans and blocks, angle brackets and
ampersands are <em>always</em> encoded automatically. This makes it easy to use
Markdown to write about HTML code. (As opposed to raw HTML, which is a
terrible format for writing about HTML syntax, because every single <code>&lt;</code>
and <code>&amp;</code> in your example code needs to be escaped.)</p>

<hr />

<h2 id="block">Block Elements</h2>

<h3 id="p">Paragraphs and Line Breaks</h3>

<p>A paragraph is simply one or more consecutive lines of text, separated
by one or more blank lines. (A blank line is any line that looks like a
blank line -- a line containing nothing but spaces or tabs is considered
blank.) Normal paragraphs should not be indented with spaces or tabs.</p>

<p>The implication of the "one or more consecutive lines of text" rule is
that Markdown supports "hard-wrapped" text paragraphs. This differs
significantly from most other text-to-HTML formatters (including Movable
Type's "Convert Line Breaks" option) which translate every line break
character in a paragraph into a <code>&lt;br /&gt;</code> tag.</p>

<p>When you <em>do</em> want to insert a <code>&lt;br /&gt;</code> break tag using Markdown, you
end a line with two or more spaces, then type return.</p>

<p>Yes, this takes a tad more effort to create a <code>&lt;br /&gt;</code>, but a simplistic
"every line break is a <code>&lt;br /&gt;</code>" rule wouldn't work for Markdown.
Markdown's email-style <a href="#blockquote">blockquoting</a> and multi-paragraph <a href="#list">list items</a>
work best -- and look better -- when you format them with hard breaks.</p>

<h3 id="header">Headers</h3>

<p>Markdown supports two styles of headers, <a href="http://docutils.sourceforge.net/mirror/setext.html">Setext</a> and <a href="http://www.aaronsw.com/2002/atx/">atx</a>.</p>

<p>Setext-style headers are "underlined" using equal signs (for first-level
headers) and dashes (for second-level headers). For example:</p>

<pre><code>This is an H1
=============

This is an H2
-------------
</code></pre>

<p>Any number of underlining <code>=</code>'s or <code>-</code>'s will work.</p>

<p>Atx-style headers use 1-6 hash characters at the start of the line,
corresponding to header levels 1-6. For example:</p>

<pre><code># This is an H1

## This is an H2

###### This is an H6
</code></pre>

<p>Optionally, you may "close" atx-style headers. This is purely
cosmetic -- you can use this if you think it looks better. The
closing hashes don't even need to match the number of hashes
used to open the header. (The number of opening hashes
determines the header level.) :</p>

<pre><code># This is an H1 #

## This is an H2 ##

### This is an H3 ######
</code></pre>

<h3 id="blockquote">Blockquotes</h3>

<p>Markdown uses email-style <code>&gt;</code> characters for blockquoting. If you're
familiar with quoting passages of text in an email message, then you
know how to create a blockquote in Markdown. It looks best if you hard
wrap the text and put a <code>&gt;</code> before every line:</p>

<pre><code>&gt; This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
&gt; consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
&gt; Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
&gt; 
&gt; Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
&gt; id sem consectetuer libero luctus adipiscing.
</code></pre>

<p>Markdown allows you to be lazy and only put the <code>&gt;</code> before the first
line of a hard-wrapped paragraph:</p>

<pre><code>&gt; This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

&gt; Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
id sem consectetuer libero luctus adipiscing.
</code></pre>

<p>Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by
adding additional levels of <code>&gt;</code>:</p>

<pre><code>&gt; This is the first level of quoting.
&gt;
&gt; &gt; This is nested blockquote.
&gt;
&gt; Back to the first level.
</code></pre>

<p>Blockquotes can contain other Markdown elements, including headers, lists,
and code blocks:</p>

<pre><code>&gt; ## This is a header.
&gt; 
&gt; 1.   This is the first list item.
&gt; 2.   This is the second list item.
&gt; 
&gt; Here's some example code:
&gt; 
&gt;     return shell_exec("echo $input | $markdown_script");
</code></pre>

<p>Any decent text editor should make email-style quoting easy. For
example, with BBEdit, you can make a selection and choose Increase
Quote Level from the Text menu.</p>

<h3 id="list">Lists</h3>

<p>Markdown supports ordered (numbered) and unordered (bulleted) lists.</p>

<p>Unordered lists use asterisks, pluses, and hyphens -- interchangably
-- as list markers:</p>

<pre><code>*   Red
*   Green
*   Blue
</code></pre>

<p>is equivalent to:</p>

<pre><code>+   Red
+   Green
+   Blue
</code></pre>

<p>and:</p>

<pre><code>-   Red
-   Green
-   Blue
</code></pre>

<p>Ordered lists use numbers followed by periods:</p>

<pre><code>1.  Bird
2.  McHale
3.  Parish
</code></pre>

<p>It's important to note that the actual numbers you use to mark the
list have no effect on the HTML output Markdown produces. The HTML
Markdown produces from the above list is:</p>

<pre><code>&lt;ol&gt;
&lt;li&gt;Bird&lt;/li&gt;
&lt;li&gt;McHale&lt;/li&gt;
&lt;li&gt;Parish&lt;/li&gt;
&lt;/ol&gt;
</code></pre>

<p>If you instead wrote the list in Markdown like this:</p>

<pre><code>1.  Bird
1.  McHale
1.  Parish
</code></pre>

<p>or even:</p>

<pre><code>3. Bird
1. McHale
8. Parish
</code></pre>

<p>you'd get the exact same HTML output. The point is, if you want to,
you can use ordinal numbers in your ordered Markdown lists, so that
the numbers in your source match the numbers in your published HTML.
But if you want to be lazy, you don't have to.</p>

<p>If you do use lazy list numbering, however, you should still start the
list with the number 1. At some point in the future, Markdown may support
starting ordered lists at an arbitrary number.</p>

<p>List markers typically start at the left margin, but may be indented by
up to three spaces. List markers must be followed by one or more spaces
or a tab.</p>

<p>To make lists look nice, you can wrap items with hanging indents:</p>

<pre><code>*   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
    viverra nec, fringilla in, laoreet vitae, risus.
*   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
    Suspendisse id sem consectetuer libero luctus adipiscing.
</code></pre>

<p>But if you want to be lazy, you don't have to:</p>

<pre><code>*   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
viverra nec, fringilla in, laoreet vitae, risus.
*   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
Suspendisse id sem consectetuer libero luctus adipiscing.
</code></pre>

<p>If list items are separated by blank lines, Markdown will wrap the
items in <code>&lt;p&gt;</code> tags in the HTML output. For example, this input:</p>

<pre><code>*   Bird
*   Magic
</code></pre>

<p>will turn into:</p>

<pre><code>&lt;ul&gt;
&lt;li&gt;Bird&lt;/li&gt;
&lt;li&gt;Magic&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>But this:</p>

<pre><code>*   Bird

*   Magic
</code></pre>

<p>will turn into:</p>

<pre><code>&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Bird&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Magic&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>List items may consist of multiple paragraphs. Each subsequent
paragraph in a list item must be indented by either 4 spaces
or one tab:</p>

<pre><code>1.  This is a list item with two paragraphs. Lorem ipsum dolor
    sit amet, consectetuer adipiscing elit. Aliquam hendrerit
    mi posuere lectus.

    Vestibulum enim wisi, viverra nec, fringilla in, laoreet
    vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
    sit amet velit.

2.  Suspendisse id sem consectetuer libero luctus adipiscing.
</code></pre>

<p>It looks nice if you indent every line of the subsequent
paragraphs, but here again, Markdown will allow you to be
lazy:</p>

<pre><code>*   This is a list item with two paragraphs.

    This is the second paragraph in the list item. You're
only required to indent the first line. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit.

*   Another item in the same list.
</code></pre>

<p>To put a blockquote within a list item, the blockquote's <code>&gt;</code>
delimiters need to be indented:</p>

<pre><code>*   A list item with a blockquote:

    &gt; This is a blockquote
    &gt; inside a list item.
</code></pre>

<p>To put a code block within a list item, the code block needs
to be indented <em>twice</em> -- 8 spaces or two tabs:</p>

<pre><code>*   A list item with a code block:

        &lt;code goes here&gt;
</code></pre>

<p>It's worth noting that it's possible to trigger an ordered list by
accident, by writing something like this:</p>

<pre><code>1986. What a great season.
</code></pre>

<p>In other words, a <em>number-period-space</em> sequence at the beginning of a
line. To avoid this, you can backslash-escape the period:</p>

<pre><code>1986\. What a great season.
</code></pre>

<h3 id="precode">Code Blocks</h3>

<p>Pre-formatted code blocks are used for writing about programming or
markup source code. Rather than forming normal paragraphs, the lines
of a code block are interpreted literally. Markdown wraps a code block
in both <code>&lt;pre&gt;</code> and <code>&lt;code&gt;</code> tags.</p>

<p>To produce a code block in Markdown, simply indent every line of the
block by at least 4 spaces or 1 tab. For example, given this input:</p>

<pre><code>This is a normal paragraph:

    This is a code block.
</code></pre>

<p>Markdown will generate:</p>

<pre><code>&lt;p&gt;This is a normal paragraph:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;This is a code block.
&lt;/code&gt;&lt;/pre&gt;
</code></pre>

<p>One level of indentation -- 4 spaces or 1 tab -- is removed from each
line of the code block. For example, this:</p>

<pre><code>Here is an example of AppleScript:

    tell application "Foo"
        beep
    end tell
</code></pre>

<p>will turn into:</p>

<pre><code>&lt;p&gt;Here is an example of AppleScript:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;tell application "Foo"
    beep
end tell
&lt;/code&gt;&lt;/pre&gt;
</code></pre>

<p>A code block continues until it reaches a line that is not indented
(or the end of the article).</p>

<p>Within a code block, ampersands (<code>&amp;</code>) and angle brackets (<code>&lt;</code> and <code>&gt;</code>)
are automatically converted into HTML entities. This makes it very
easy to include example HTML source code using Markdown -- just paste
it and indent it, and Markdown will handle the hassle of encoding the
ampersands and angle brackets. For example, this:</p>

<pre><code>    &lt;div class="footer"&gt;
        &amp;copy; 2004 Foo Corporation
    &lt;/div&gt;
</code></pre>

<p>will turn into:</p>

<pre><code>&lt;pre&gt;&lt;code&gt;&amp;lt;div class="footer"&amp;gt;
    &amp;amp;copy; 2004 Foo Corporation
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
</code></pre>

<p>Regular Markdown syntax is not processed within code blocks. E.g.,
asterisks are just literal asterisks within a code block. This means
it's also easy to use Markdown to write about Markdown's own syntax.</p>

<h3 id="hr">Horizontal Rules</h3>

<p>You can produce a horizontal rule tag (<code>&lt;hr /&gt;</code>) by placing three or
more hyphens, asterisks, or underscores on a line by themselves. If you
wish, you may use spaces between the hyphens or asterisks. Each of the
following lines will produce a horizontal rule:</p>

<pre><code>* * *

***

*****

- - -

---------------------------------------
</code></pre>

<hr />

<h2 id="span">Span Elements</h2>

<h3 id="link">Links</h3>

<p>Markdown supports two style of links: <em>inline</em> and <em>reference</em>.</p>

<p>In both styles, the link text is delimited by [square brackets].</p>

<p>To create an inline link, use a set of regular parentheses immediately
after the link text's closing square bracket. Inside the parentheses,
put the URL where you want the link to point, along with an <em>optional</em>
title for the link, surrounded in quotes. For example:</p>

<pre><code>This is [an example](http://example.com/ "Title") inline link.

[This link](http://example.net/) has no title attribute.
</code></pre>

<p>Will produce:</p>

<pre><code>&lt;p&gt;This is &lt;a href="http://example.com/" title="Title"&gt;
an example&lt;/a&gt; inline link.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://example.net/"&gt;This link&lt;/a&gt; has no
title attribute.&lt;/p&gt;
</code></pre>

<p>If you're referring to a local resource on the same server, you can
use relative paths:</p>

<pre><code>See my [About](/about/) page for details.
</code></pre>

<p>Reference-style links use a second set of square brackets, inside
which you place a label of your choosing to identify the link:</p>

<pre><code>This is [an example][id] reference-style link.
</code></pre>

<p>You can optionally use a space to separate the sets of brackets:</p>

<pre><code>This is [an example] [id] reference-style link.
</code></pre>

<p>Then, anywhere in the document, you define your link label like this,
on a line by itself:</p>

<pre><code>[id]: http://example.com/  "Optional Title Here"
</code></pre>

<p>That is:</p>

<ul>
<li>Square brackets containing the link identifier (optionally
indented from the left margin using up to three spaces);</li>
<li>followed by a colon;</li>
<li>followed by one or more spaces (or tabs);</li>
<li>followed by the URL for the link;</li>
<li>optionally followed by a title attribute for the link, enclosed
in double or single quotes, or enclosed in parentheses.</li>
</ul>

<p>The following three link definitions are equivalent:</p>

<pre><code>[foo]: http://example.com/  "Optional Title Here"
[foo]: http://example.com/  'Optional Title Here'
[foo]: http://example.com/  (Optional Title Here)
</code></pre>

<p><strong>Note:</strong> There is a known bug in Markdown.pl 1.0.1 which prevents
single quotes from being used to delimit link titles.</p>

<p>The link URL may, optionally, be surrounded by angle brackets:</p>

<pre><code>[id]: &lt;http://example.com/&gt;  "Optional Title Here"
</code></pre>

<p>You can put the title attribute on the next line and use extra spaces
or tabs for padding, which tends to look better with longer URLs:</p>

<pre><code>[id]: http://example.com/longish/path/to/resource/here
    "Optional Title Here"
</code></pre>

<p>Link definitions are only used for creating links during Markdown
processing, and are stripped from your document in the HTML output.</p>

<p>Link definition names may consist of letters, numbers, spaces, and
punctuation -- but they are <em>not</em> case sensitive. E.g. these two
links:</p>

<pre><code>[link text][a]
[link text][A]
</code></pre>

<p>are equivalent.</p>

<p>The <em>implicit link name</em> shortcut allows you to omit the name of the
link, in which case the link text itself is used as the name.
Just use an empty set of square brackets -- e.g., to link the word
"Google" to the google.com web site, you could simply write:</p>

<pre><code>[Google][]
</code></pre>

<p>And then define the link:</p>

<pre><code>[Google]: http://google.com/
</code></pre>

<p>Because link names may contain spaces, this shortcut even works for
multiple words in the link text:</p>

<pre><code>Visit [Daring Fireball][] for more information.
</code></pre>

<p>And then define the link:</p>

<pre><code>[Daring Fireball]: http://daringfireball.net/
</code></pre>

<p>Link definitions can be placed anywhere in your Markdown document. I
tend to put them immediately after each paragraph in which they're
used, but if you want, you can put them all at the end of your
document, sort of like footnotes.</p>

<p>Here's an example of reference links in action:</p>

<pre><code>I get 10 times more traffic from [Google] [1] than from
[Yahoo] [2] or [MSN] [3].

  [1]: http://google.com/        "Google"
  [2]: http://search.yahoo.com/  "Yahoo Search"
  [3]: http://search.msn.com/    "MSN Search"
</code></pre>

<p>Using the implicit link name shortcut, you could instead write:</p>

<pre><code>I get 10 times more traffic from [Google][] than from
[Yahoo][] or [MSN][].

  [google]: http://google.com/        "Google"
  [yahoo]:  http://search.yahoo.com/  "Yahoo Search"
  [msn]:    http://search.msn.com/    "MSN Search"
</code></pre>

<p>Both of the above examples will produce the following HTML output:</p>

<pre><code>&lt;p&gt;I get 10 times more traffic from &lt;a href="http://google.com/"
title="Google"&gt;Google&lt;/a&gt; than from
&lt;a href="http://search.yahoo.com/" title="Yahoo Search"&gt;Yahoo&lt;/a&gt;
or &lt;a href="http://search.msn.com/" title="MSN Search"&gt;MSN&lt;/a&gt;.&lt;/p&gt;
</code></pre>

<p>For comparison, here is the same paragraph written using
Markdown's inline link style:</p>

<pre><code>I get 10 times more traffic from [Google](http://google.com/ "Google")
than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
[MSN](http://search.msn.com/ "MSN Search").
</code></pre>

<p>The point of reference-style links is not that they're easier to
write. The point is that with reference-style links, your document
source is vastly more readable. Compare the above examples: using
reference-style links, the paragraph itself is only 81 characters
long; with inline-style links, it's 176 characters; and as raw HTML,
it's 234 characters. In the raw HTML, there's more markup than there
is text.</p>

<p>With Markdown's reference-style links, a source document much more
closely resembles the final output, as rendered in a browser. By
allowing you to move the markup-related metadata out of the paragraph,
you can add links without interrupting the narrative flow of your
prose.</p>

<h3 id="em">Emphasis</h3>

<p>Markdown treats asterisks (<code>*</code>) and underscores (<code>_</code>) as indicators of
emphasis. Text wrapped with one <code>*</code> or <code>_</code> will be wrapped with an
HTML <code>&lt;em&gt;</code> tag; double <code>*</code>'s or <code>_</code>'s will be wrapped with an HTML
<code>&lt;strong&gt;</code> tag. E.g., this input:</p>

<pre><code>*single asterisks*

_single underscores_

**double asterisks**

__double underscores__
</code></pre>

<p>will produce:</p>

<pre><code>&lt;em&gt;single asterisks&lt;/em&gt;

&lt;em&gt;single underscores&lt;/em&gt;

&lt;strong&gt;double asterisks&lt;/strong&gt;

&lt;strong&gt;double underscores&lt;/strong&gt;
</code></pre>

<p>You can use whichever style you prefer; the lone restriction is that
the same character must be used to open and close an emphasis span.</p>

<p>Emphasis can be used in the middle of a word:</p>

<pre><code>un*frigging*believable
</code></pre>

<p>But if you surround an <code>*</code> or <code>_</code> with spaces, it'll be treated as a
literal asterisk or underscore.</p>

<p>To produce a literal asterisk or underscore at a position where it
would otherwise be used as an emphasis delimiter, you can backslash
escape it:</p>

<pre><code>\*this text is surrounded by literal asterisks\*
</code></pre>

<h3 id="code">Code</h3>

<p>To indicate a span of code, wrap it with backtick quotes (<code>`</code>).
Unlike a pre-formatted code block, a code span indicates code within a
normal paragraph. For example:</p>

<pre><code>Use the `printf()` function.
</code></pre>

<p>will produce:</p>

<pre><code>&lt;p&gt;Use the &lt;code&gt;printf()&lt;/code&gt; function.&lt;/p&gt;
</code></pre>

<p>To include a literal backtick character within a code span, you can use
multiple backticks as the opening and closing delimiters:</p>

<pre><code>``There is a literal backtick (`) here.``
</code></pre>

<p>which will produce this:</p>

<pre><code>&lt;p&gt;&lt;code&gt;There is a literal backtick (`) here.&lt;/code&gt;&lt;/p&gt;
</code></pre>

<p>The backtick delimiters surrounding a code span may include spaces --
one after the opening, one before the closing. This allows you to place
literal backtick characters at the beginning or end of a code span:</p>

<pre><code>A single backtick in a code span: `` ` ``

A backtick-delimited string in a code span: `` `foo` ``
</code></pre>

<p>will produce:</p>

<pre><code>&lt;p&gt;A single backtick in a code span: &lt;code&gt;`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;A backtick-delimited string in a code span: &lt;code&gt;`foo`&lt;/code&gt;&lt;/p&gt;
</code></pre>

<p>With a code span, ampersands and angle brackets are encoded as HTML
entities automatically, which makes it easy to include example HTML
tags. Markdown will turn this:</p>

<pre><code>Please don't use any `&lt;blink&gt;` tags.
</code></pre>

<p>into:</p>

<pre><code>&lt;p&gt;Please don't use any &lt;code&gt;&amp;lt;blink&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;
</code></pre>

<p>You can write this:</p>

<pre><code>`&amp;#8212;` is the decimal-encoded equivalent of `&amp;mdash;`.
</code></pre>

<p>to produce:</p>

<pre><code>&lt;p&gt;&lt;code&gt;&amp;amp;#8212;&lt;/code&gt; is the decimal-encoded
equivalent of &lt;code&gt;&amp;amp;mdash;&lt;/code&gt;.&lt;/p&gt;
</code></pre>

<h3 id="img">Images</h3>

<p>Admittedly, it's fairly difficult to devise a "natural" syntax for
placing images into a plain text document format.</p>

<p>Markdown uses an image syntax that is intended to resemble the syntax
for links, allowing for two styles: <em>inline</em> and <em>reference</em>.</p>

<p>Inline image syntax looks like this:</p>

<pre><code>![Alt text](/path/to/img.jpg)

![Alt text](/path/to/img.jpg "Optional title")
</code></pre>

<p>That is:</p>

<ul>
<li>An exclamation mark: <code>!</code>;</li>
<li>followed by a set of square brackets, containing the <code>alt</code>
attribute text for the image;</li>
<li>followed by a set of parentheses, containing the URL or path to
the image, and an optional <code>title</code> attribute enclosed in double
or single quotes.</li>
</ul>

<p>Reference-style image syntax looks like this:</p>

<pre><code>![Alt text][id]
</code></pre>

<p>Where "id" is the name of a defined image reference. Image references
are defined using syntax identical to link references:</p>

<pre><code>[id]: url/to/image  "Optional title attribute"
</code></pre>

<p>As of this writing, Markdown has no syntax for specifying the
dimensions of an image; if this is important to you, you can simply
use regular HTML <code>&lt;img&gt;</code> tags.</p>

<hr />

<h2 id="misc">Miscellaneous</h2>

<h3 id="autolink">Automatic Links</h3>

<p>Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:</p>

<pre><code>&lt;http://example.com/&gt;
</code></pre>

<p>Markdown will turn this into:</p>

<pre><code>&lt;a href="http://example.com/"&gt;http://example.com/&lt;/a&gt;
</code></pre>

<p>Automatic links for email addresses work similarly, except that
Markdown will also perform a bit of randomized decimal and hex
entity-encoding to help obscure your address from address-harvesting
spambots. For example, Markdown will turn this:</p>

<pre><code>&lt;address@example.com&gt;
</code></pre>

<p>into something like this:</p>

<pre><code>&lt;a href="&amp;#x6D;&amp;#x61;i&amp;#x6C;&amp;#x74;&amp;#x6F;:&amp;#x61;&amp;#x64;&amp;#x64;&amp;#x72;&amp;#x65;
&amp;#115;&amp;#115;&amp;#64;&amp;#101;&amp;#120;&amp;#x61;&amp;#109;&amp;#x70;&amp;#x6C;e&amp;#x2E;&amp;#99;&amp;#111;
&amp;#109;"&gt;&amp;#x61;&amp;#x64;&amp;#x64;&amp;#x72;&amp;#x65;&amp;#115;&amp;#115;&amp;#64;&amp;#101;&amp;#120;&amp;#x61;
&amp;#109;&amp;#x70;&amp;#x6C;e&amp;#x2E;&amp;#99;&amp;#111;&amp;#109;&lt;/a&gt;
</code></pre>

<p>which will render in a browser as a clickable link to "address@example.com".</p>

<p>(This sort of entity-encoding trick will indeed fool many, if not
most, address-harvesting bots, but it definitely won't fool all of
them. It's better than nothing, but an address published in this way
will probably eventually start receiving spam.)</p>

<h3 id="backslash">Backslash Escapes</h3>

<p>Markdown allows you to use backslash escapes to generate literal
characters which would otherwise have special meaning in Markdown's
formatting syntax. For example, if you wanted to surround a word
with literal asterisks (instead of an HTML <code>&lt;em&gt;</code> tag), you can use
backslashes before the asterisks, like this:</p>

<pre><code>\*literal asterisks\*
</code></pre>

<p>Markdown provides backslash escapes for the following characters:</p>

<pre><code>\   backslash
`   backtick
*   asterisk
_   underscore
{}  curly braces
[]  square brackets
()  parentheses
#   hash mark
+   plus sign
-   minus sign (hyphen)
.   dot
!   exclamation mark
</code></pre>
 ]]></description>
            <pubDate>Wed, 14 Jan 2009 09:56:30 EST</pubDate>
            <guid>http://ode-is-simple.com/home/news/friends_of_ode/markdown_syntax_daring_fireball</guid>
            <!-- <guid>http://ode-is-simple.com/home/2009/01/14/09/56/30/</guid> -->
        </item>


    </channel>
</rss>

