From d6fd1f1cc878b5dffdfae30f6dfee77c235c438e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 25 Aug 2008 14:19:39 -0400 Subject: rename preprocessordirective to directive Reasons include: - easier to type - might want postprocessor directives again sometime, and listdirectives can then use the directive/* files for either - that it's done as a preprocessor step is an internal detail (and not a very accurate one, really :-) --- doc/ikiwiki/blog.mdwn | 8 +++---- doc/ikiwiki/directive.mdwn | 39 ++++++++++++++++++++++++++++++++++ doc/ikiwiki/markdown.mdwn | 6 +++--- doc/ikiwiki/preprocessordirective.mdwn | 39 ---------------------------------- doc/ikiwiki/wikilink.mdwn | 6 +++--- doc/ikiwiki/wikilink/discussion.mdwn | 2 +- 6 files changed, 50 insertions(+), 50 deletions(-) create mode 100644 doc/ikiwiki/directive.mdwn delete mode 100644 doc/ikiwiki/preprocessordirective.mdwn (limited to 'doc/ikiwiki') diff --git a/doc/ikiwiki/blog.mdwn b/doc/ikiwiki/blog.mdwn index 19ec7ac30..53d4c7a96 100644 --- a/doc/ikiwiki/blog.mdwn +++ b/doc/ikiwiki/blog.mdwn @@ -7,7 +7,7 @@ then="You can" else="If this wiki had the inline plugin enabled, you could"]] turn any page on this wiki into a weblog by using the `inline` -[[PreProcessorDirective]]. For example: +[[directive]]. For example: \[[!inline pages="blog/* and !*/Discussion" show="10" rootpage="blog"]] @@ -17,9 +17,9 @@ of them will appear in the page. Note that if files that are not pages match the [[PageSpec]], they will be included in the feed using RSS enclosures, which is useful for podcasting. -The optional `rootpage` parameter tells the wiki that new posts to this blog -should default to being [[SubPage]]s of "blog", and enables a form at the -top of the blog that can be used to add new items. +The optional `rootpage` parameter tells the wiki that new posts to this +blog should default to being [[SubPages|SubPage]] of "blog", and enables a +form at the top of the blog that can be used to add new items. If you want your blog to have an archive page listing every post ever made to it, you can accomplish that like this: diff --git a/doc/ikiwiki/directive.mdwn b/doc/ikiwiki/directive.mdwn new file mode 100644 index 000000000..9a01aaa82 --- /dev/null +++ b/doc/ikiwiki/directive.mdwn @@ -0,0 +1,39 @@ +[[!meta robots="noindex, follow"]] +Directives are similar to a [[WikiLink]] in form, except they +begin with `!` and may contain parameters. The general form is: + + \[[!directive param="value" param="value"]] + +This gets expanded before the rest of the page is processed, and can be used +to transform the page in various ways. + +The quotes around values can be omitted if the value is a simple word. +Also, some directives may use parameters without values, for example: + + \[[!tag foo]] + +A directive does not need to all be on one line, it can be +wrapped to multiple lines if you like: + + \[[!directive foo="baldersnatch" + bar="supercalifragalisticexpealadocious" baz=11]] + +Also, multiple lines of *quoted* text can be used for a value. +To allow quote marks inside the quoted text, delimit the block +of text with triple-quotes: + + \[[!directive text=""" + 1. "foo" + 2. "bar" + 3. "baz" + """]] + +ikiwiki also has an older syntax for directives, which requires a +space in directives to distinguish them from [[wikilinks|wikilink]]. This +syntax has several disadvantages: it requires a space after directives with no +parameters (such as `\[[pagecount ]]`), and it prohibits spaces in +[[wikilinks|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. diff --git a/doc/ikiwiki/markdown.mdwn b/doc/ikiwiki/markdown.mdwn index bbda9add7..a4190945f 100644 --- a/doc/ikiwiki/markdown.mdwn +++ b/doc/ikiwiki/markdown.mdwn @@ -8,6 +8,6 @@ For documentation about the markdown syntax, see [[formatting]] and [markdown mode](http://jblevins.org/projects/markdown-mode/) for emacs can help in editing. -Note that [[WikiLink]]s and [[PreProcessorDirective]]s are not part of the -markdown syntax, and are the only bit of markup that this wiki handles -internally. +Note that [[WikiLinks|WikiLink]] and [[directives|directive]] are not part +of the markdown syntax, and are the only bit of markup that this wiki +handles internally. diff --git a/doc/ikiwiki/preprocessordirective.mdwn b/doc/ikiwiki/preprocessordirective.mdwn deleted file mode 100644 index 743c0d9f5..000000000 --- a/doc/ikiwiki/preprocessordirective.mdwn +++ /dev/null @@ -1,39 +0,0 @@ -[[!meta robots="noindex, follow"]] -Preprocessor directives are similar to a [[WikiLink]] in form, except they -begin with `!` and may contain parameters. The general form is: - - \[[!directive param="value" param="value"]] - -This gets expanded before the rest of the page is processed, and can be used -to transform the page in various ways. - -The quotes around values can be omitted if the value is a simple word. -Also, some directives may use parameters without values, for example: - - \[[!tag foo]] - -A preprocessor directive does not need to all be on one line, it can be -wrapped to multiple lines if you like: - - \[[!directive foo="baldersnatch" - bar="supercalifragalisticexpealadocious" baz=11]] - -Also, multiple lines of *quoted* text can be used for a value. -To allow quote marks inside the quoted text, delimit the block -of text with triple-quotes: - - \[[!directive text=""" - 1. "foo" - 2. "bar" - 3. "baz" - """]] - -ikiwiki also has an older syntax for preprocessor directives, which requires a -space in directives to distinguish them from [[wikilinks|wikilink]]. This -syntax has several disadvantages: it requires a space after directives with no -parameters (such as `\[[pagecount ]]`), and it prohibits spaces in -[[wikilinks|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. diff --git a/doc/ikiwiki/wikilink.mdwn b/doc/ikiwiki/wikilink.mdwn index bd5e3d185..371c2528f 100644 --- a/doc/ikiwiki/wikilink.mdwn +++ b/doc/ikiwiki/wikilink.mdwn @@ -23,11 +23,11 @@ page, but the link will appear like this: [[foo_bar|SandBox]]. To link to an anchor inside a page, you can use something like `\[[WikiLink#foo]]` -## Preprocessor directives and wikilinks +## Directives and WikiLinks ikiwiki has two syntaxes for -[[preprocessor_directives|PreprocessorDirective]]. The older syntax -used spaces to distinguish between preprocessor directives and +[[directives|directive]]. The older syntax +used spaces to distinguish between directives and wikilinks; as a result, with that syntax in use, you cannot use spaces in WikiLinks, and must replace spaces with underscores. The newer syntax, enabled with the `prefix_directives` option in an ikiwiki diff --git a/doc/ikiwiki/wikilink/discussion.mdwn b/doc/ikiwiki/wikilink/discussion.mdwn index e69fcb31b..e4b1f933f 100644 --- a/doc/ikiwiki/wikilink/discussion.mdwn +++ b/doc/ikiwiki/wikilink/discussion.mdwn @@ -14,7 +14,7 @@ BTW, ikiwiki doesn't displays the #foo anchor in the example --[[Paweł|ptecza]] > No such syntax exists in markdown. ikiwiki could certainly have a -> [[preprocessor_directive|preprocessordirective]] for it, though. +> [[preprocessor_directive|directive]] for it, though. > --[[JoshTriplett]] >> [[!tag wishlist]] -- cgit v1.2.3