]> sipb.mit.edu Git - ikiwiki.git/blob - doc/blog.mdwn
web commit by http://joey.kitenet.net/: poll vote (It's too slow!)
[ikiwiki.git] / doc / blog.mdwn
1 [[template id=note text="""
2 [[if test="enabled(inline)"
3      then="This wiki has the inline plugin **enabled**."
4      else="This wiki has the inline plugin **disabled**."]]
5 """]]
6
7 [[if test="enabled(inline)"
8      then="You can"
9      else="If this wiki had the inline plugin enabled, you could"]]
10 turn any page on this wiki into a weblog by using the `inline`
11 [[PreProcessorDirective]].  For example:
12
13         \[[inline pages="blog/* and !*/Discussion" show="10" rootpage="blog"]]
14
15 Any pages that match the specified [[PageSpec]] (in the example, any
16 [[SubPage]] of "blog") will be part of the blog, and the newest 10
17 of them will appear in the page. Note that if files that are not pages
18 match the [[PageSpec]], they will be included in the feed using RSS
19 enclosures, which is useful for podcasting.
20
21 The optional `rootpage` parameter tells the wiki that new posts to this blog
22 should default to being [[SubPage]]s of "blog", and enables a form at the
23 top of the blog that can be used to add new items.
24
25 If you want your blog to have an archive page listing every post ever made
26 to it, you can accomplish that like this:
27
28         \[[inline pages="blog/* and !*/Discussion" archive="yes"]]
29
30 You can even create an automatically generated list of all the pages on the
31 wiki, with the most recently added at the top, like this:
32
33         \[[inline pages="* and !*/Discussion" archive="yes"]]
34
35 If you want to be able to add pages to a given blog feed by tagging them,
36 you can do that too. To tag a page, just make it link to a page or pages 
37 that represent its tags. Then use the special `link()` [[PageSpec]] to match
38 all pages that have a given tag:
39
40         \[[inline pages="link(life)"]]
41
42 Or include some tags and exclude others:
43
44         \[[inline pages="link(debian) and !link(social)"]]