Fork me on GitHub

Sample Posts

This page shows many of the features that blogofile supports on the post level. For each example, the HTML rendering is shown first and secondly the source used to render it.

Test syntax highlighting

March 09, 2009 at 01:09 PM | | categories: test | View Comments

This tests some syntax highlighting, using the syntax highlight filter based on pygments:

Some Python, in the default murphy style:

def test():
    for x in "Hello, Python!":
        print x.upper(),
    print "done"

Some Haskell, with line numbers turned on:

1
2
3
4
5
hamming = 1 : map (2*) hamming `merge` map (3*) hamming `merge` map (5*) hamming
     where merge (x:xs) (y:ys) 
            | x < y = x : xs `merge` (y:ys)
            | x > y = y : (x:xs) `merge` ys
            | otherwise = x : xs `merge` ys

Some javascript, using the monokai style and line numbers on:

1
2
3
4
5
6
document.write("<h1>This is a header</h1>");
$(document).ready(function(){
   $("a").click(function(event){
       alert("jQuery is cool!");
   });
});

Some plain HTML:

    <h1>This is a test</h1>
    <p>
      This is <a href="http://www.blogofile.com">Blogofile</a>.
    </p>
    <p>
      Notice how in the source, <tags> don't have to be re-written 
      with HTML entities like some syntax highlighters out there.
    </p>

Source:

---
categories: Test
date: 2009/03/09 13:09:05
permalink: http://www.blogofile.com/demo/sample_posts.html
tags: ''
title: Test syntax highlighting
---
<p>
This tests some syntax highlighting, using the 
<a href="http://github.com/EnigmaCurry/blogofile.com/blob/master/_filters/syntax_highlight.py">
syntax highlight</a> filter based on <a href="http://pygments.org">pygments</a>:
</p>

<p>Some Python, in the default <i>murphy</i> style:
$$code(lang=python)
def test():
    for x in "Hello, Python!":
        print x.upper(),
    print "done"
$$/code
</p>

<p>
Some Haskell, with line numbers turned on:

$$code(lang=haskell, linenums=true)
hamming = 1 : map (2*) hamming `merge` map (3*) hamming `merge` map (5*) hamming
     where merge (x:xs) (y:ys) 
            | x < y = x : xs `merge` (y:ys)
            | x > y = y : (x:xs) `merge` ys
            | otherwise = x : xs `merge` ys
$$/code

</p>

<p>
Some javascript, using the <i>monokai</i> style and line numbers on:

$$code(lang=javascript, style=monokai, linenums=true)
document.write("<h1>This is a header</h1>");
$(document).ready(function(){
   $("a").click(function(event){
       alert("jQuery is cool!");
   });
});
$$/code

</p>
<p>
  Some plain HTML:

$$code(lang=html)
    <h1>This is a test</h1>
    <p>
      This is <a href="http://www.blogofile.com">Blogofile</a>.
    </p>
    <p>
      Notice how in the source, <tags> don't have to be re-written 
      with HTML entities like some syntax highlighters out there.
    </p>
$$/code

</p>

Testing Markdown

March 09, 2009 at 01:09 PM | | categories: test | View Comments

Markdown is cool

It even works in blogofile

This is a list:

  • one
  • two
  • three

This is a quote:

Stop trying to control. Let go of fixed plans and concepts, and the world will govern itself. -- Lao Tsu

Source:

---
categories: Test
date: 2009/03/09 13:09:03
permalink: http://www.blogofile.com/demo/sample_posts.html
title: Testing Markdown
---
### Markdown is cool ###

It even works in [blogofile](http://www.blogofile.com)

This is a list:

* one
* two
* three

This is a quote:

> Stop trying to control.
> Let go of fixed plans and concepts,
> and the world will govern itself.
>  -- Lao Tsu

Testing Textile

March 09, 2009 at 01:09 PM | | categories: test | View Comments

This post is a textile example.

Stop trying to control.
Let go of fixed plans and concepts,
and the world will govern itself.

Header Header Header
Cell 1 Cell 2 Cell 3
Cell 1 Cell 2 Cell 3

Source:

---
categories: Test
date: 2009/03/09 13:09:01
permalink: http://www.blogofile.com/demo/sample_posts.html
title: Testing Textile
---

h3. This post is a textile example.

bq. Stop trying to control.
Let go of fixed plans and concepts,
and the world will govern itself.

|_. Header |_. Header |_. Header |
| Cell 1 | Cell 2 | Cell 3 |
| Cell 1 | Cell 2 | Cell 3 |

HTML test

March 09, 2009 at 01:09 PM | | categories: test | View Comments

HTML test

This is just plain HTML

How boring is that?

Source:

---
categories: Test
date: 2009/03/09 13:09:00
permalink: http://www.blogofile.com/demo/sample_posts.html
tags: ''
title: HTML test
---
<h3>HTML test</h3>
<p>
  This is just <i>plain HTML</i>
</p>
<p>
  How <b>boring</b> is that?
</p>