The very first release of a textile 2 plugin for Blosxom is now available, based on Brad Choate's MT Textile 2 beta.

This is beta, or worse. It's been tested on all of half a dozen documents. The underlying engine it uses is also beta. You should expect both the plugin syntax and the markup syntax to change.

To use:

  1. download mttextile-2_0b.zip from Brad Choate's page
  2. download textile2-0-1i.zip
  3. create lib and lib/Text directories in your plugin state directory2, if you don't have them. install extlib/Text/Textile.pm from mttextile-2_0b in that directory
  4. install textile2 from textile2-0-1i.zip in your plugin directory
  5. look at textile2's configuration variables, consider changing them
  6. install the meta plugin if you don't have it installed
  7. rename plugins with numeric prefixes to ensure proper ordering, if necessary. meta needs to be before textile2, and is required. If you're using it, SmartyPants needs to be after textile2. Although it's not as important (or necessarily right), most other plugins that do text changes probably should be after textile2; that would include macros, wikiwordish, imagesizer (which isn't actually needed, in its stock form), and the like.3
  8. create a test story with meta-markup: textile2 in its header
  9. hope

The textile2 syntax is both more regular and more extensive than the textile 1 syntax, and is intended to be at least mostly backwards compatible. In at least one way that matters to me, it isn't, though1, so this plugin is designed to be usable side-by-side with the earlier textile plugin. If you're willing & wanting to switch over entirely, configure the $handle_textile_1 variable to 1 and remove the textile plugin; then meta-markup: textile will invoke textile2.

1 With textile 1, there doesn't have to be any space between the final '!' on an image link and following text; with textile 2, there does.

2 That's your plugin directory, not your plugin state directory; thanks to Andy Fragen for the note.

3 This step added following Andy Fragen's difficulties -- thanks for being a guinea pig, Andy!

That should be a h1 (well, h4, with my configuration)

this is a blockquote

this ia a normal paragraph

  1. this is
  2. a numbered
  3. list
  • this is
  • an unnumbered
  • list
this isa wikistyle table
with tworows andthree columns

Up to there, that's all textile-1 syntax too

this is a code block

this is a paragraph with id "first"

  1. Multi-level
  2. lists
    1. are now
    2. supported
  3. although
    1. it's not obvious
    2. how you would
  4. format them
    1. if you didn't have one
    2. parent item between
      1. each
      2. sublist

This is code here.

This is a test link

this should go back to first

bq.* Can blockquotes
* contain lists
* now?

This is a genericisation/port of Brad Choate's mttextile Movable Type Textile plugin. Hopefully at some point, the changes to the core will be incorporated into the main distribution, so this will just be the plugin wrapper. The Textile language was developed by Dean Allen; he has an online demo of the original implementation.

This is a very early release. Image sizing in particular hasn't been tested (and it's not clear that, in the Blosxom system, it really belongs here -- using imagesizer or something similar (my own not-yet(?)-released 'fancyimage', maybe?) makes more sense, I think.

  1. Download the package
  2. Create a 'lib/bradchoate' directory under your Blosxom plugin directory
  3. Copy 'textile.pm' to $plugin_dir/lib/bradchoate
  4. Copy 'textile' to $plugin_dir. You may wish to name it something like '50textile', and rename other plugins with other numbers, to get them loaded in the right order. "The right order" is still somewhat unknown, but I'd suggest using textile before SmartPants but after most other body-modifying plugins (such as macro packages).
  5. Install Rael's meta plugin if you don't already have it installed.
  6. Create a test post; mark it as Textile by using "meta-markup: textile" on
    the line after the title. See the meta documentation for more information
    on meta variables.

Report any problems (or success reports!) to jtl-blosxom-plugins@molehill.org.

Sample:

heading level 1

headling level 2.

Textile works by looking at your text in terms of lines and paragraphs. Paragraphs are composed of one or more lines, separated by a single new-line character. Paragraphs are separated by one or more blank lines.

this is explicitely marked as a paragraph

this is implicitely a paragraph

there are a number of markup items supported

  1. headings
  2. blockquotes
  3. paragraphs
  4. lists
  • unnumbered lists, too
  • and unformatted text
  • and tables
this isa table

There are also inline options like emphasis, strong, cite, deleted, inserted, superscript, subscript, and other HTML attributes.

There can be links too. And images, but there's lots of options there and this post doesn't test any of them.

The way this plugin works, it doesn't automatically invoke the "SmartPants" plugin, but if they're installed properly SmartyPants will get invoked afterwards and it will Just Work anyway...


Same sample, unformatted:

h1. heading level 1 h2. headling level 2. bq. Textile works by looking at your text in terms of lines and paragraphs. Paragraphs are composed of one or more lines, separated by a single new-line character. Paragraphs are separated by one or more blank lines. p. this is explicitely marked as a paragraph this is implicitely a paragraph there are a number of markup items supported # headings # blockquotes # paragraphs # lists * unnumbered lists, too * and unformatted text * and tables | this is | a table | blah blah blah There are also inline options like _emphasis_, *strong*, ??cite??, -deleted-, +inserted+, ^superscript^, ~subscript~, and other HTML(hypertext markup langauge) attributes. There can be "links (this is the title)":http://bradchoate.com/past/mttextile.php too. And images, but there's lots of options there and this post doesn't test any of them. The way this plugin works, it doesn't automatically invoke the "SmartPants" plugin, but if they're installed properly SmartyPants will get invoked afterwards and it will Just Work anyway...