Over deze pagina
d.d. 20 februari 2006
titel Blogging with PmWiki
in Graffiti
tags
Recepten - Mijn bronnen »
« Brokeback Mountain Bafta winnaar

Blogging with PmWiki

This is a description of how to blog with a bog-down standard PmWiki installation. Almost everything is automated. There is no need for cookbook recipes. Updated january 14 2007.

Presumptions:

There are three groups in the Wiki: Main and Blog and Category (four if you take the SiteGroup into account).

  • The BlogGroup holds all the blog-entries. We create a page Blog.RecentPublished where all the blog entries will be kept in historical order. This page is to be used as a trail page.
  • The CategoryGroup will be used for automatic slicing and dicing of the blog entries.
  • Main.Home-page is the page where everything is happening and your blog is published.

The Blog group

The Blog.RecentPublished page.

This page is the hart of the blogging system. On it all the blog-entries will sit in historical order. This page will be used for constructing a historical trail trough all the Blog-entires. It will be used to generate pagelists of the most recent xx entries. And use it to generate RSS on the Blog.

  1. A new entry in the Blog starts on the page Blog.RecentPublished. I create a *-list with the latest entry on top, simply with: [[Blog.NewEntry|+]]
    The page Blog.RecentPublished is used as a trail page, for making a "previous-next" trail trhough the entries. Or (by using the (:pagelist trail=Blog.RecentPublished :)) to make pagelist elsewhere on the site (the trail= markup is easy on the server).
  2. Archive page(s)
    To make archive pages, copy  [1] the relevant links from the RecentPublished-page to the designated archive page, i.e. copy all the links from the last quarter of 2006 to the page Blog.Archive2006Q4.
    Use some mark-up like : [[Blog.NewEntry|+]] : (:include Blog.NewEntry lines=1..1:) or John Rankin's excellent 'mark-up extensions' T: or (:para :), to make the archives better readable.
  3. Blog.Blog page
    On the Blog.Blog page I display the 10 (or 30 if you want) most recent blogentries (:pagelist trail=Blog.RecentPublished count=10:). Use the format you want, but including the first lines of an entry or the (:description :) is a nice touch. This page is not strictly necessary.

Blog.Template

Make a Blog.Template page giving an outline of how your Blogpage should look. It should act as a reminder of where things need to go.
The template I use looks like this:

  
date - firstparagraphtobeincludedwithlines=1..1
secondparagraph
thirdparagraph
filed under [[! ]] [[! ]] 
(:title :) (:description :) 

The last two lines are there to remind me of putting in some categories and a good title (normally my page-names are short, a sort of abstract of the title)

PagelistTemplate

Make a pagelist template that includes (some of) the text of the pages in the list.

 
[[#include]](:if ! equal {<$Group} {=$Group}:)
(:if true:)!![[{=$FullName}|+]]
(:include {=$FullName}##desc:)
%silver%[[{=$FullName}|';more ...;']](:if:)
[[<<]]
[[#includeend]] 

Category group

To use Categories put the following mark-up into the Category.Groupheader (or GroupFooter):

'~Previous, in the category {$Name}:~'
(pagelist fmt=#title order=title link="Category.{$Name}" list=normal:) 

And now when you start, is the time to rename this group into something more meaningful then Category. To do this put the following line in your local/config file: SDV($CategoryGroup,'Tags'); (That is: if you want the new name to be 'Tags')

Update 14 january 07
I create pages in the "Tags/Category"-group manually and then only for the more important categories. For the other Tags the page is empty and contains no description; only the pagelist is displayed.

Main.Home-page

The blog entries are published on the Main.Home-page via a (:pagelist:).
(:pagelist order=title count=9 group=Blog list=normal fmt=#include:)
Options to use here:

  • order=-ctime (latest/newest post on top)
  • count=9 (set this to a sensible figure so as not to create a extremely long Homepage)
  • group=Blog (only the pages from the Blog group are included)
  • list=normal (to exclude drafts and RecentChanges)
  • fmt=#include (see PagelistTemplate above)

And this is all there is to blogging with PmWiki. Writing that line on the Blog.Blog page is the one and only manual labour you have to do when posting a new entry. All the rest is automated.

Missing

Do we miss functionality absolutely necessary before we can call PmWiki a blogging tool? Yes!

The must have's:

  • A good mechanism to extract the first (or two) paragraph(s) of the blog entry. This mechanism should be able to strip out mark-up like <div> or (:keywords:). It should be able to do this automaticaly or using anchors.

Update 14 jan 07
The 'mark-up extensions' T: or (:para :) are good alternatives, provided you keep in your entry all the markup like (:title:) etc. at the end of the entry-page.

  • commentary: a good commentary system is missed, but then absolutely necessary it is not, seeing the abuse it gets (spam at al.)
  • a "NewPages page" like "RecentChanges." It would automate the process of making the trail page

Update 14 january 07
What we really miss is functionality to paginate pagelists. We can limit the length of a pagelist via the option "count= ". But this means that we can only play with the first xx of a pagelsit. It is not possible the pick the numbers 11..20 from a list.
We need either something like count= 5..10 for dispaying the itmes #5 till (and including) the 10th. This can work with all types of pagelists.
AND/OR we need to be able to make a pagelist based on a trail to include only the part between anchors (like the (:include##:) mark-up)
I would love to do the following on the Homepage (in reverse order of creationtime, newest on top).:

  • (:pagelist count=1:) and display the full entry.
  • (:pagelist count=2..4:) displaying the entry with a teaser.
  • (:pagelist count=5..10:) displaying only the title.

And I want to make archives, based on the RecentPublished page. At the proper place in the list insert the anchors (f.i. [[#Q1]] and [[#Q2]] and you have the list of all entries for Q1 of the year.

Should have's:

Track-back: perhaps?

Want to have but not now:

Ping: I don't need it

 

[1] And I mean copy and not cut. The information on the RecentPublished page stays unaltered!


Filed under ,

Meer documenten uit het Dossier PmWiki:
< Blogging: beautifying it   -   Sidenote or Footnote >