summaryrefslogtreecommitdiff
path: root/doc/ikiwiki
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ikiwiki')
-rw-r--r--doc/ikiwiki/directive.mdwn16
-rw-r--r--doc/ikiwiki/directive/cutpaste.mdwn10
-rw-r--r--doc/ikiwiki/directive/format.mdwn21
-rw-r--r--doc/ikiwiki/directive/inline.mdwn14
-rw-r--r--doc/ikiwiki/directive/inline/discussion.mdwn11
-rw-r--r--doc/ikiwiki/directive/linkmap.mdwn2
-rw-r--r--doc/ikiwiki/directive/meta.mdwn9
-rw-r--r--doc/ikiwiki/directive/pagestats/discussion.mdwn10
-rw-r--r--doc/ikiwiki/directive/tag.mdwn4
-rw-r--r--doc/ikiwiki/directive/testpagespec/discussion.mdwn6
-rw-r--r--doc/ikiwiki/markdown.mdwn4
-rw-r--r--doc/ikiwiki/pagespec.mdwn24
-rw-r--r--doc/ikiwiki/pagespec/attachment.mdwn2
-rw-r--r--doc/ikiwiki/pagespec/discussion.mdwn27
-rw-r--r--doc/ikiwiki/wikilink/discussion.mdwn15
15 files changed, 134 insertions, 41 deletions
diff --git a/doc/ikiwiki/directive.mdwn b/doc/ikiwiki/directive.mdwn
index c4342dee8..fb88aa72d 100644
--- a/doc/ikiwiki/directive.mdwn
+++ b/doc/ikiwiki/directive.mdwn
@@ -28,15 +28,13 @@ of text with triple-quotes:
3. "baz"
"""]]
-ikiwiki also has an older syntax for directives, which requires a
-space in directives to distinguish them from [[wikilinks|ikiwiki/wikilink]].
-This syntax has several disadvantages: it requires a space after directives
-with no parameters (such as `\[[pagecount ]]`), and it prohibits spaces in
-[[wikilinks|ikiwiki/wikilink]]. ikiwiki now provides the `!`-prefixed syntax
-shown above as the preferred alternative. However, ikiwiki still supports
-wikis using the older syntax, if the `prefix_directives` option is not enabled.
-For backward compatibility with existing wikis, this option currently
-defaults to off, so ikiwiki supports the old syntax.
+ikiwiki also has an older syntax for directives, which requires a space in
+directives to distinguish them from [[wikilinks|ikiwiki/wikilink]]. This
+syntax has several disadvantages: it requires a space after directives with
+no parameters (such as `\[[pagecount ]]`), and it prohibits spaces in
+[[wikilinks|ikiwiki/wikilink]]. ikiwiki now provides the `!`-prefixed
+syntax shown above as default. However, ikiwiki still supports wikis using
+the older syntax, if the `prefix_directives` option is disabled.
[[!if test="enabled(listdirectives)" then="""
Here is a list of currently available directives in this wiki:
diff --git a/doc/ikiwiki/directive/cutpaste.mdwn b/doc/ikiwiki/directive/cutpaste.mdwn
index 012367bdf..ca580e54f 100644
--- a/doc/ikiwiki/directive/cutpaste.mdwn
+++ b/doc/ikiwiki/directive/cutpaste.mdwn
@@ -17,11 +17,11 @@ follow the paste directive that uses its text. In fact, this is quite useful
to postpone big blocks of text like long annotations and have a more natural
flow. For example:
- \[[!toggleable id="cut" text="\[[!paste id=cutlongdesc]]"]]
- \[[!toggleable id="copy" text="\[[!paste id=copylongdesc]]"]]
- \[[!toggleable id="paste" text="\[[!paste id=pastelongdesc]]"]]
+ \[[!toggleable id="cut" text="[[!paste id=cutlongdesc]]"]]
+ \[[!toggleable id="copy" text="[[!paste id=copylongdesc]]"]]
+ \[[!toggleable id="paste" text="[[!paste id=pastelongdesc]]"]]
- \[...some time later...]
+ [...some time later...]
\[[!cut id=cutlongdesc text="""
blah blah blah
@@ -40,7 +40,7 @@ Since you can paste without using double quotes, copy and paste can be used to
nest directives that require multiline parameters inside each other:
\[[!toggleable id=foo text="""
- \[[!toggleable id=bar text="\[[!paste id=baz]]"]]
+ [[!toggleable id=bar text="[[!paste id=baz]]"]]
"""]]
\[[!cut id=baz text="""
diff --git a/doc/ikiwiki/directive/format.mdwn b/doc/ikiwiki/directive/format.mdwn
new file mode 100644
index 000000000..94cf1b04f
--- /dev/null
+++ b/doc/ikiwiki/directive/format.mdwn
@@ -0,0 +1,21 @@
+The `format` directive is supplied by the [[!iki plugins/format desc=format]]
+plugin.
+
+The directive allows formatting a chunk of text using any available page
+format. It takes two parameters. First is the type of format to use,
+ie the extension that would be used for a standalone file of this type.
+Second is the text to format.
+
+For example, this will embed an otl outline inside a page using mdwn or
+some other format:
+
+ \[[!format otl """
+ foo
+ 1
+ 2
+ bar
+ 3
+ 4
+ """]]
+
+[[!meta robots="noindex, follow"]]
diff --git a/doc/ikiwiki/directive/inline.mdwn b/doc/ikiwiki/directive/inline.mdwn
index 9889cda11..f69d55de3 100644
--- a/doc/ikiwiki/directive/inline.mdwn
+++ b/doc/ikiwiki/directive/inline.mdwn
@@ -73,6 +73,8 @@ Here are some less often needed parameters:
configured to `allowatom`, set to "yes" to enable.
* `feeds` - controls generation of all types of feeds. Set to "no" to
disable generating any feeds.
+* `emptyfeeds` - Set to "no" to disable generation of empty feeds.
+ Has no effect if `rootpage` or `postform` is set.
* `template` - Specifies the template to fill out to display each inlined
page. By default the `inlinepage` template is used, while
the `archivepage` template is used for archives. Set this parameter to
@@ -85,7 +87,10 @@ Here are some less often needed parameters:
inlining page.
* `sort` - Controls how inlined pages are sorted. The default, "age" is to
sort newest created pages first. Setting it to "title" will sort pages by
- title, and "mtime" sorts most recently modified pages first.
+ title, and "mtime" sorts most recently modified pages first. If
+ [[!cpan Sort::Naturally]] is installed, `sort` can be set to "title_natural"
+ to sort by title with numbers treated as such ("1 2 9 10 20" instead of
+ "1 10 2 20 9").
* `reverse` - If set to "yes", causes the sort order to be reversed.
* `feedshow` - Specify the maximum number of matching pages to include in
the rss/atom feeds. The default is the same as the `show` value above.
@@ -97,11 +102,16 @@ Here are some less often needed parameters:
in the blog. The format string is passed to the strftime(3) function.
* `feedpages` - A [[PageSpec]] of inlined pages to include in the rss/atom
feeds. The default is the same as the `pages` value above, and only pages
- matches by that value are included, but some of those can be excluded by
+ matched by that value are included, but some of those can be excluded by
specifying a tighter [[PageSpec]] here.
* `guid` - If a URI is given here (perhaps a UUID prefixed with `urn:uuid:`),
the Atom feed will have this as its `<id>`. The default is to use the URL
of the page containing the `inline` directive.
+* `feedfile` - Can be used to change the name of the file generated for the
+ feed. This is particularly useful if a page contains multiple feeds.
+ For example, set "feedfile=feed" to cause it to generate `page/feed.atom`
+ and/or `page/feed.rss`. This option is not supported if the wiki is
+ configured not to use `usedirs`.
[[!meta robots="noindex, follow"]]
diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn
index 91b2ff462..e301190bf 100644
--- a/doc/ikiwiki/directive/inline/discussion.mdwn
+++ b/doc/ikiwiki/directive/inline/discussion.mdwn
@@ -19,3 +19,14 @@ take it as far as implementing "replies" to other comments.
## More dynamic `rootpage` parameter of inline plugin?
(Moved to [[todo/dynamic_rootpage]])
+
+---
+
+## Excluding Images
+
+Is there a simple way to exclude images, stylesheets, and other
+"non-page" files other than a blacklist approach like
+`pages="* and !*.png and !*.css"`? --[[JasonBlevins]]
+
+> The [[plugins/filecheck]] plugin adds a 'ispage()' pagespec test that can do that.
+> --[[Joey]]
diff --git a/doc/ikiwiki/directive/linkmap.mdwn b/doc/ikiwiki/directive/linkmap.mdwn
index 8fdf40c9f..db79a1491 100644
--- a/doc/ikiwiki/directive/linkmap.mdwn
+++ b/doc/ikiwiki/directive/linkmap.mdwn
@@ -9,7 +9,7 @@ Only links between mapped pages will be shown; links pointing to or from
unmapped pages will be omitted. If the pages to include are not specified,
the links between all pages (and other files) in the wiki are mapped. For
best results, only a small set of pages should be mapped, since otherwise
-the map can become very large, unweildy, and complicated. Also, the map is
+the map can become very large, unwieldy, and complicated. Also, the map is
rebuilt whenever one of the mapped pages is changed, which can make the
wiki a bit slow.
diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn
index 74db31943..f29a118bf 100644
--- a/doc/ikiwiki/directive/meta.mdwn
+++ b/doc/ikiwiki/directive/meta.mdwn
@@ -139,6 +139,15 @@ Supported fields:
pages unchanged and avoid_flooding_aggregators
(see [[!iki tips/howto_avoid_flooding_aggregators]]).
+* updated
+
+ Specifies a fake modification time for a page, to be output into RSS and
+ Atom feeds. This is useful to avoid flooding aggregators that sort by
+ modification time, like Planet: for instance, when editing an old blog post
+ to add tags, you could set `updated` to be one second later than the original
+ value. The date/time can be given in any format that
+ [[!cpan TimeDate]] can understand, just like the `date` field.
+
If the field is not one of the above predefined fields, the metadata will be
written to the generated html page as a &lt;meta&gt; header. However, this
won't be allowed if the [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled,
diff --git a/doc/ikiwiki/directive/pagestats/discussion.mdwn b/doc/ikiwiki/directive/pagestats/discussion.mdwn
new file mode 100644
index 000000000..3c9dc7104
--- /dev/null
+++ b/doc/ikiwiki/directive/pagestats/discussion.mdwn
@@ -0,0 +1,10 @@
+I am trying to create a tag cloud using:
+
+ \[[!pagestats pages="tags/*"]]
+
+Nothing shows up when I first used this directive. I found that I had to create a page for the tag for it to show up in pagestats.
+I would rather not find and create a page for every tag I have created or will create. Is there an easier way to create a list of tags?
+
+Thanks
+
+----
diff --git a/doc/ikiwiki/directive/tag.mdwn b/doc/ikiwiki/directive/tag.mdwn
index 267aee660..64736f8cd 100644
--- a/doc/ikiwiki/directive/tag.mdwn
+++ b/doc/ikiwiki/directive/tag.mdwn
@@ -21,6 +21,10 @@ located under a base directory, such as "tags/". This is a useful way to
avoid having to write the full path to tags, if you want to keep them
grouped together out of the way.
+Bear in mind that specifying a tagbase means you will need to incorporate it
+into the `link()` [[ikiwiki/PageSpec]] you use: e.g., if your tagbase is
+`tag`, you would match pages tagged "foo" with `link(tag/foo)`.
+
If you want to override the tagbase for a particular tag, you can use
something like this:
diff --git a/doc/ikiwiki/directive/testpagespec/discussion.mdwn b/doc/ikiwiki/directive/testpagespec/discussion.mdwn
new file mode 100644
index 000000000..66c9a9ca9
--- /dev/null
+++ b/doc/ikiwiki/directive/testpagespec/discussion.mdwn
@@ -0,0 +1,6 @@
+How does one test a user identity? I tried "pagename and user(username) for the match, and had a "no user specified" error.
+
+> You can't test them with this directive, because such pagespecs test to
+> see if logged in user, who is performing some action, matches. When the
+> page with the directive is built, the concept of a user being logged in
+> doesn't really apply. --[[Joey]]
diff --git a/doc/ikiwiki/markdown.mdwn b/doc/ikiwiki/markdown.mdwn
index a4190945f..684191929 100644
--- a/doc/ikiwiki/markdown.mdwn
+++ b/doc/ikiwiki/markdown.mdwn
@@ -4,9 +4,7 @@ is a minimal markup language that resembles plain text as used in
email messages. It is the markup language used by this wiki by default.
For documentation about the markdown syntax, see [[formatting]] and
-[Markdown: syntax](http://daringfireball.net/projects/markdown/syntax). A
-[markdown mode](http://jblevins.org/projects/markdown-mode/) for
-emacs can help in editing.
+[Markdown: syntax](http://daringfireball.net/projects/markdown/syntax).
Note that [[WikiLinks|WikiLink]] and [[directives|directive]] are not part
of the markdown syntax, and are the only bit of markup that this wiki
diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn
index c78666c40..b476bde1f 100644
--- a/doc/ikiwiki/pagespec.mdwn
+++ b/doc/ikiwiki/pagespec.mdwn
@@ -25,6 +25,7 @@ match all pages except for Discussion pages and the SandBox:
Some more elaborate limits can be added to what matches using these functions:
* "`link(page)`" - match only pages that link to a given page (or glob)
+* "`tagged(tag)`" - match pages that are tagged or link to the given tag (or glob)
* "`backlink(page)`" - match only pages that a given page links to
* "`creation_month(month)`" - match only pages created on the given month
* "`creation_day(mday)`" - or day of the month
@@ -47,6 +48,8 @@ Some more elaborate limits can be added to what matches using these functions:
wiki admins.
* "`ip(address)`" - tests whether a modification is being made from the
specified IP address.
+* "`postcomment(glob)`" - matches only when comments are being
+ posted to a page matching the specified glob
For example, to match all pages in a blog that link to the page about music
and were written in 2005:
@@ -63,29 +66,10 @@ More complex expressions can also be created, by using parentheses for
grouping. For example, to match pages in a blog that are tagged with either
of two tags, use:
- blog/* and (link(tag/foo) or link(tag/bar))
+ blog/* and (tagged(foo) or tagged(bar))
Note that page names in PageSpecs are matched against the absolute
filenames of the pages in the wiki, so a pagespec "foo" used on page
"a/b" will not match a page named "a/foo" or "a/b/foo". To match
relative to the directory of the page containing the pagespec, you can
use "./". For example, "./foo" on page "a/b" matches page "a/foo".
-
-## Old syntax
-
-The old PageSpec syntax was called a "GlobList", and worked differently in
-two ways:
-
-1. "and" and "or" were not used; any page matching any item from the list
- matched.
-2. If an item was prefixed with "`!`", then no page matching that item
- matched, even if it matched an earlier list item.
-
-For example, here is the old way to match all pages except for the SandBox
-and Discussion pages:
-
- * !SandBox !*/Discussion
-
-Using this old syntax is still supported. However, the old syntax is
-deprecated and will be removed at some point, and using the new syntax is
-recommended.
diff --git a/doc/ikiwiki/pagespec/attachment.mdwn b/doc/ikiwiki/pagespec/attachment.mdwn
index 2d33db748..344a4a734 100644
--- a/doc/ikiwiki/pagespec/attachment.mdwn
+++ b/doc/ikiwiki/pagespec/attachment.mdwn
@@ -9,7 +9,7 @@ configuration setting.
For example, to limit arbitrary files to 50 kilobytes, but allow
larger mp3 files to be uploaded by joey into a specific directory, and
-check all attachments for virii, something like this could be used:
+check all attachments for viruses, something like this could be used:
virusfree() and ((user(joey) and podcast/*.mp3 and mimetype(audio/mpeg) and maxsize(15mb)) or (!ispage() and maxsize(50kb)))
diff --git a/doc/ikiwiki/pagespec/discussion.mdwn b/doc/ikiwiki/pagespec/discussion.mdwn
index 0733c90c8..4eed3722c 100644
--- a/doc/ikiwiki/pagespec/discussion.mdwn
+++ b/doc/ikiwiki/pagespec/discussion.mdwn
@@ -65,3 +65,30 @@ How can I fix this? --[[sabr]]
> I don't see why that wouldn't work. Can I download the source to your
> wiki from somewhere to investigate? --[[Joey]]
+
+----
+
+Should negation work with user(), with locked_pages in setup? I
+experimented with setting locked_pages => 'user(someuser)' and was able to
+edit as a different user. However, setting locked_pages =>
+'!user(someuser)' doesn't seem to allow edits for only 'someuser' - it
+locks out all users.
+
+> Negation works with anything in any PageSpec. I tested the case you
+> describe, and a negated pagespec worked for me; all users except the
+> listed user (and except wiki admins of course) were locked out.
+> --[[Joey]]
+
+>> It must be a local problem, then, cause I've tried it with two separate
+>> machines. Both are running the most recent release of ikiwiki in
+>> pkgsrc - 2.66. Perhaps an update to a newer version would solve the issue.
+
+----
+
+Is there a way to refer to all subpages of the current page, if the name of the
+current page is not known (i.e. the pagespec is used in a template)? The ./ syntax
+does not seem suitable for this, as
+
+> \[[!map pages="./*"]]
+
+also lists the current page and all its siblings.
diff --git a/doc/ikiwiki/wikilink/discussion.mdwn b/doc/ikiwiki/wikilink/discussion.mdwn
index b5cb848ed..0677ff7de 100644
--- a/doc/ikiwiki/wikilink/discussion.mdwn
+++ b/doc/ikiwiki/wikilink/discussion.mdwn
@@ -51,6 +51,19 @@ simply write [[wikilink]]s like `\[[../bar]]` (or even just `\[[..]]`?), but
this doesn't work, so I had to resort to using `\[[foo/bar]]` instead.
--[[tschwinge]]
+> I believe, that doesn't entirely solve the problem. Just assume, your hierarchy is `/foo/bar/foo/bar`.
+
+> How do you access from the page `/foo/bar/foo/bar` the `/foo/bar` and not `/foo/bar/foo/bar`?
+
+> Do we have a way to implement `\[[../..]]` or `\[[/foo/bar]]`?
+
+> Even worse, trying to link from `/foo/bar` to `/foo/bar/foo/bar` ... this will probably need `\[[./foo/bar]]` --[[Jan|jwalzer]]
+
+>> There is no ".." syntax in wikilinks, but if the link begins with "/" it
+>> is rooted at the top of the wiki, as documented in
+>> [[subpage/linkingrules]]. Therefore, every example page name you listed
+>> above will work unchanged as a wikilink to that page! --[[Joey]]
+
----
How do I make images clickable? The obvious guess, \[[foo.png|/index]], doesn't work. --[[sabr]]
@@ -64,3 +77,5 @@ How do I make images clickable? The obvious guess, \[[foo.png|/index]], doesn't
Is it possible to refer to a page, say \[[foobar]], such that the link text is taken from foobar's title [[directive/meta]] tag? --Peter
> Not yet. :-) Any suggestion for a syntax for it? Maybe something like \[[|foobar]] ? --[[Joey]]
+
+I like your suggestion because it's short and conscise. However, it would be nice to be able to refer to more or less arbitrary meta tags in links, not just "title". To do that, the link needs two parameters: the page name and the tag name, i.e. \[[pagename!metatag]]. Any sufficiently weird separater can be used instead of '!', of course. I like \[[pagename->metatag]], too, because it reminds me of accessing a data member of a structure (which is what referencing a meta tag is, really). --Peter