Migrate escaped directives (\[[) in doc/plugins to have \[[! prefix

master
Simon McVittie 2008-07-21 12:46:35 +01:00
parent 1ca63edde0
commit 953a959be7
33 changed files with 69 additions and 69 deletions

View File

@ -6,11 +6,11 @@ some blogs.
# examples
\[[calendar ]]
\[[!calendar ]]
\[[calendar type="month" pages="blog/* and !*/Discussion"]]
\[[!calendar type="month" pages="blog/* and !*/Discussion"]]
\[[calendar type="year" year="2005" pages="blog/* and !*/Discussion"]]
\[[!calendar type="year" year="2005" pages="blog/* and !*/Discussion"]]
This plugin is inspired by the calendar plugin for Blosxom, but
derives no code from it. This plugin is essentially a fancy front end

View File

@ -4,7 +4,7 @@
With this plugin, you can make text be conditionally displayed on a page.
For example:
\[[if test="enabled(smiley)"
\[[!if test="enabled(smiley)"
then="The smiley plugin is enabled :-)"
else="No smiley plugin here.."]]

View File

@ -38,10 +38,10 @@ I have a sidebar that contains
<pre>
#### Archives
\[[calendar type="year" months_per_row="6" pages="blog/* and !*/Discussion"]]
\[[calendar type="month" pages="blog/* and !*/Discussion"]]
\[[!calendar type="year" months_per_row="6" pages="blog/* and !*/Discussion"]]
\[[!calendar type="month" pages="blog/* and !*/Discussion"]]
&lt;h4&gt;Indices&lt;/h4&gt
\[[map pages="archives/* and !*/Discussion"]]
\[[!map pages="archives/* and !*/Discussion"]]
</pre>
I am trying to make it so that the archives and index only show up if the destpage is either blog/* or / -- the top of the wiki. Unfortunately, I don't think I am getting the
conditional right -- I have a "]] left over at the end (looking at the rendered html). Ideally, I would like to be able to do todays calendar on the top level pagel and

View File

@ -6,7 +6,7 @@ SVN repository of plugin is located at <http://ned.snow-crash.org:8080/svn/ikiwi
USAGE :
\[[gallery imagedir="images" option="value"]]
\[[!gallery imagedir="images" option="value"]]
Available options : <br>
* imagedir(required) => Directory containing images. It will scan all the files with jpg|png|gif extension from the directory and will put it in the gallery.<br>

View File

@ -10,18 +10,18 @@ differently scaled versions of the image, why not just create three pages
and use the plugin once per page? Something like this on the first one if
it's got multiple clickable thumbnails:
\[[img foo.jpg width=256 link=page2]]
\[[!img foo.jpg width=256 link=page2]]
This on the second:
\[[img foo.jpg width=1024 link=page3]]
\[[!img foo.jpg width=1024 link=page3]]
\[[small|page1]]
\[[medium|page2]]
\[[large|page3]]
This on the third:
\[[img foo.jpg link=page3]]
\[[!img foo.jpg link=page3]]
\[[small|page1]]
\[[medium|page2]]
\[[large|parge3]]

View File

@ -20,14 +20,14 @@ Translatable pages and translations must have the following format:
`pagename.$LANG`, where `$LANG` is a ISO639-1 (two-letter) language code.
To enable linguas, add the following line in the source code of the page:
\[[linguas ]]
\[[!linguas ]]
Note that linguas is only required in one of the pages (the original,
for instance); the rest of translations will be automatically
updated. Additionally, it is also possible to specify the title of
the translation:
\[[linguas title="Translated title"]]
\[[!linguas title="Translated title"]]
Template
@ -103,4 +103,4 @@ The following fixes it:
+ push @links, IkiWiki::htmllink($page, $destpage, $trans, noimageinline => 0, forcesubpage => 0, linktext => $link);
}
my $otherlinguas = 'Translations:';
my $otherlinguas = 'Translations:';

View File

@ -25,8 +25,8 @@ The global dictionary page is like this:
## Technical terms
- [[!sar search="smtp" first="\[[wp SMTP]]" next="SMTP"]]
- [[!sar search="pop3" first="\[[wp POP3]]" next="POP3"]]
- [[!sar search="smtp" first="\[[!wp SMTP]]" next="SMTP"]]
- [[!sar search="pop3" first="\[[!wp POP3]]" next="POP3"]]
The search expressions must be surrounded by double dashes in a source ikiwiki
page, like this:
@ -70,11 +70,11 @@ value is `*`, but a recommended value is `link(tag/sar)`.
In a ikiwiki source page we can write this
\[[sar search=debian replace="__Debian__"]]
\[[!sar search=debian replace="__Debian__"]]
for define a global replace for the term `--debian--` or
\[[sar search=ibm first=[IBM](http://www.ibm.com)
\[[!sar search=ibm first=[IBM](http://www.ibm.com)
next="_IBM_"]]
to define a replace for the first match of the string `--ibm--` and a different

View File

@ -17,7 +17,7 @@ In the case of file parameter, `syntax` will build a html link for direct downlo
Example:
\[[syntax type="perl" text="""
\[[!syntax type="perl" text="""
#!/usr/bin/perl
my $a = "World";
@ -26,7 +26,7 @@ Example:
or
\[[syntax file="/examples/hello.pl" description="My first perl program"]]
\[[!syntax file="/examples/hello.pl" description="My first perl program"]]
This plugin create the following CSS styles:

View File

@ -4,7 +4,7 @@
This just uses the `fortune` program to insert a fortune into the page.
Usage:
\[[fortune ]]
\[[!fortune ]]
[[!if test="enabled(fortune)" then="""
Here's a fortune for you:

View File

@ -11,7 +11,7 @@ content. This plugin is an example of how to deal with this in ikiwiki.
Example use:
\[[googlecalendar html="""
\[[!googlecalendar html="""
<iframe src="http://www.google.com/calendar/embed?src=adkrdken8mupngh13jshlbenoc%40group.calendar.google.com&title=OSEL%20Calendar&chrome=NAVIGATION&bgcolor=%2371d873&height=588" style=" border-width:0 " width="480" frameborder="0" height="588"></iframe>
"""]]

View File

@ -4,7 +4,7 @@
This plugin allows embedding [graphviz](http://www.graphviz.org/) graphs in a
page. Example usage:
\[[graph src="a -> b -> c; a -> c;"]]
\[[!graph src="a -> b -> c; a -> c;"]]
Note that graphs will only show up in previews if your browser has
[[!wikipedia data: URI]] support, or if the same graph already exists on that

View File

@ -4,7 +4,7 @@
This plugin allows inserting a randomly generated haiku into a wiki page.
Just type:
\[[haiku hint="argument"]]
\[[!haiku hint="argument"]]
[[!haiku hint="argument test"]]

View File

@ -14,7 +14,7 @@ Note that this is a stripped down version of Christian Mock's
## usage
\[[img image1.jpg size="200x200" alt="clouds"]]
\[[!img image1.jpg size="200x200" alt="clouds"]]
The image file will be searched for using the same rules as used to find
the file pointed to by a [[ikiwiki/WikiLink]].
@ -35,7 +35,7 @@ to another page instead, or "link=no" to disable the link, or
You can also set default values that will be applied to all later images on
the page, unless overridden. Useful when including many images on a page.
\[[img defaults size=200x200 alt="wedding photo"]]
\[[img photo1.jpg]]
\[[img photo2.jpg]]
\[[img photo3.jpg size=200x600]]
\[[!img defaults size=200x200 alt="wedding photo"]]
\[[!img photo1.jpg]]
\[[!img photo2.jpg]]
\[[!img photo3.jpg size=200x600]]

View File

@ -3,7 +3,7 @@
This is a [[ikiwiki/PreProcessorDirective]] that allows including one wiki page
inside another. For example:
\[[inline pages="blog/*"]]
\[[!inline pages="blog/*"]]
The most common use of inlining is generating blogs and RSS or Atom feeds.
See [[ikiwiki/blog]] for details.

View File

@ -4,7 +4,7 @@
This plugin uses [graphviz](http://www.graphviz.org/) to generate a graph showing the links between a
set of pages in the wiki. Example usage:
\[[linkmap pages="* and !blog/* and !*/Discussion"]]
\[[!linkmap pages="* and !blog/* and !*/Discussion"]]
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,

View File

@ -4,7 +4,7 @@
This plugin provides a way to have a "more" link on a page in a blog, that
leads to the full version of the page. Use it like this:
\[[more linktext="click for more" text="""
\[[!more linktext="click for more" text="""
This is the rest of my post. Not intended for people catching up on
their blogs at 30,000 feet. Because I like to make things
difficult.

View File

@ -1,7 +1,7 @@
[[!template id=plugin name=pagecount author="[[Joey]]"]]
[[!tag type/meta]]
Provides a \\[[pagecount ]] [[ikiwiki/PreProcessorDirective]] that is
Provides a \\[[!pagecount ]] [[ikiwiki/PreProcessorDirective]] that is
replaced with the total number of pages currently in the wiki.
The optional parameter "pages" can be a [[ikiwiki/PageSpec]] specifying the

View File

@ -7,8 +7,8 @@ links to each page.
Here's how to use it to create a [[tag]] cloud:
\[[pagestats pages="tags/*"]]
\[[!pagestats pages="tags/*"]]
And here's how to create a table of all the pages on the wiki:
\[[pagestats style="table"]]
\[[!pagestats style="table"]]

View File

@ -11,4 +11,4 @@ This plugin can only use templates that are already installed in
/usr/share/ikiwiki/templates (or wherever ikiwiki is configured to look for
them). You can choose to use any .tmpl files in that directory. Example:
\[[pagetemplate template=my_fancy.tmpl]]
\[[!pagetemplate template=my_fancy.tmpl]]

View File

@ -4,7 +4,7 @@
This plugin allows you to create online polls in the wiki. Here's an
example use:
\[[poll 0 "red" 0 "green" 0 "blue"]]
\[[!poll 0 "red" 0 "green" 0 "blue"]]
The numbers indicate how many users voted for that choice. When a user
votes for a choice in the poll, the page is modified and the number

View File

@ -4,7 +4,7 @@
This plugin allows inserting text generated by polygen into a wiki page.
For example:
\[[polygen grammar="genius"]]
\[[!polygen grammar="genius"]]
It's also possible to specify a starting nonterminal for the grammar by
including `symbol="text"` in the directive.

View File

@ -7,11 +7,11 @@ statistics about a set of pages, such as posts to a blog.
# examples
Post interval:
\[[postsparkline pages="blog/* and !*/Discussion" max=100
\[[!postsparkline pages="blog/* and !*/Discussion" max=100
formula=interval style=bar barwidth=2 barspacing=1 height=13]]
Posts per month this year:
\[[postsparkline pages="blog/* and !*/Discussion" max=12
\[[!postsparkline pages="blog/* and !*/Discussion" max=12
formula=permonth style=bar barwidth=2 barspacing=1 height=13]]
# usage

View File

@ -8,19 +8,19 @@ pages can be joined together with [[inline]] to generate the
Typically only the RecentChanges page will use the pages generated by this
plugin, but you can use it elsewhere too if you like. It's used like this:
\[[inline pages="internal(recentchanges/change_*)"
\[[!inline pages="internal(recentchanges/change_*)"
template=recentchanges show=0]]
Here's an example of how to show only changes to "bugs/*".
This matches against the title of the change, which includes a list of
modified pages.
\[[inline pages="internal(recentchanges/change_*) and title(*bugs/*)"
\[[!inline pages="internal(recentchanges/change_*) and title(*bugs/*)"
template=recentchanges show=0]]
Here's an example of how to show only changes that Joey didn't make.
(Joey commits sometimes as user `joey`, and sometimes via openid.)
\[[inline pages="internal(recentchanges/change_*) and
\[[!inline pages="internal(recentchanges/change_*) and
!author(joey) and !author(http://joey.kitenet.net*)"
template=recentchanges show=0]]

View File

@ -24,7 +24,7 @@ This plugin also uses the [[!cpan Digest::SHA1]] perl module.
# examples
\[[sparkline 1 3 5 -3 10 0 width=40 height=16
\[[!sparkline 1 3 5 -3 10 0 width=40 height=16
featurepoint="4,-3,red,3" featurepoint="5,10,green,3"]]
This creates a simple line graph, graphing several points.
@ -35,7 +35,7 @@ featurepoint="4,-3,red,3" featurepoint="5,10,green,3"]]
It will be drawn 40 pixels wide and 16 pixels high. The high point in the
line has a green marker, and the low point has a red marker.
\[[sparkline 1 -1(red) 1 -1(red) 1 1 1 -1(red) -1(red) style=bar barwidth=2
\[[!sparkline 1 -1(red) 1 -1(red) 1 1 1 -1(red) -1(red) style=bar barwidth=2
barspacing=1 height=13]]
This more complex example generates a bar graph.

View File

@ -8,14 +8,14 @@ It needs the perl module [[!cpan Text::CSV]] for the CSV data.
## examples
\[[table data="""
\[[!table data="""
Customer|Amount
Fulanito|134,34
Menganito|234,56
Menganito|234,56
"""]]
\[[table class="book_record" format=csv file="data/books/record1"]]
\[[!table class="book_record" format=csv file="data/books/record1"]]
In this second example the `record1` page should be similar to:
@ -26,7 +26,7 @@ In this second example the `record1` page should be similar to:
To make a cell span multiple columns, follow it with one or more empty
cells. For example:
\[[table data="""
\[[!table data="""
left||right|
a|b|c|d
this cell spans 4 columns|||

View File

@ -3,7 +3,7 @@
This plugin allows tagging pages. List tags as follows:
\[[tag tech life linux]]
\[[!tag tech life linux]]
The tags work the same as if you had put a (hidden) [[ikiwiki/WikiLink]] on
the page for each tag, so you can use a [[ikiwiki/PageSpec]] match all
@ -14,8 +14,8 @@ in RSS and Atom feeds.
If you want a visible [[ikiwiki/WikiLink]] along with the tag, use taglink
instead:
\[[taglink foo]]
\[[taglink tagged_as_foo|foo]]
\[[!taglink foo]]
\[[!taglink tagged_as_foo|foo]]
This plugin has a configuration option. Set --tagbase=tags and links to tags
will be located under the specified base page. If ikiwiki is configured

View File

@ -1,4 +1,4 @@
I'd like to modify this plugin such that the tag pages are automatically created and populated with a list of relevant posts. The content of the tag page is simply `"\[[inline pages="link(tag/$tag)"]]`. The tag plugin will have to determine whether a page for the given tag already exists, and if not use that Markdown fragment to generate it.
I'd like to modify this plugin such that the tag pages are automatically created and populated with a list of relevant posts. The content of the tag page is simply `"\[[!inline pages="link(tag/$tag)"]]`. The tag plugin will have to determine whether a page for the given tag already exists, and if not use that Markdown fragment to generate it.
There are clearly many ways to do this, but any opinions on which is the cleanest?

View File

@ -6,18 +6,18 @@ page, and to see the part that matches, or causes the match to fail.
Example uses:
\[[testpagespec pagespec="foopage and barpage" match="foopage"]]
\[[!testpagespec pagespec="foopage and barpage" match="foopage"]]
This will print out something like "no match: barpage does not match
foopage", highlighting which part of the [[ikiwiki/PageSpec]] is causing
the match to fail.
\[[testpagespec pagespec="foopage or !bar*" match="barpage"]]
\[[!testpagespec pagespec="foopage or !bar*" match="barpage"]]
This will print out something like "no match: bar* matches barpage", since
the part of the [[ikiwiki/PageSpec]] that fails is this negated match.
\[[testpagespec pagespec="foopage or barpage" match="barpage"]]
\[[!testpagespec pagespec="foopage or barpage" match="barpage"]]
This will print out something like "match: barpage matches barpage",
indicating the part of the [[ikiwiki/PageSpec]] that caused it to match.

View File

@ -9,14 +9,14 @@ may not be part of a regular texlive installation.
## examples
\[[teximg code="\ce{[Cu(NH3)3]^{2+}}"]]
\[[teximg code="\frac{1}{2}"]]
\[[teximg code="E = - \frac{Z^2 \cdot \mu \cdot e^4}{32\pi^2 \epsilon_0^2 \hbar^2 n^2}" ]]
\[[!teximg code="\ce{[Cu(NH3)3]^{2+}}"]]
\[[!teximg code="\frac{1}{2}"]]
\[[!teximg code="E = - \frac{Z^2 \cdot \mu \cdot e^4}{32\pi^2 \epsilon_0^2 \hbar^2 n^2}" ]]
To scale the image, use height=x:
\[[teximg code="\ce{[Cu(NH3)3]^{2+}}" height="17"]]
\[[teximg code="\ce{[Cu(NH3)3]^{2+}}" height="8"]]
\[[!teximg code="\ce{[Cu(NH3)3]^{2+}}" height="17"]]
\[[!teximg code="\ce{[Cu(NH3)3]^{2+}}" height="8"]]
If no height is choosen the default height 12 is used. Valid heights are: 8, 9,
10, 11, 12, 14, 17, 20. If another height is entered, the closest available
@ -24,6 +24,6 @@ height is used.
To add an alt text to the image, use alt="text":
\[[teximg code="\frac{1}{2}" alt="1/2"]]
\[[!teximg code="\frac{1}{2}" alt="1/2"]]
See [this site](http://www.der-winnie.de/opensource/gsoc2007) for rendered images.

View File

@ -3,18 +3,18 @@
Add a table of contents to a page:
\[[toc ]]
\[[!toc ]]
The table of contents will be automatically generated based on the
headers of the page. By default only the largest headers present on the
page will be shown; to control how many levels of headers are shown, use
the `levels` parameter:
\[[toc levels=2]]
\[[!toc levels=2]]
The toc plugin will take the level of the first header as the topmost
level, even if there are higher levels seen later in the file.
The table of contents will be created as an ordered list. If you want
an unordered list instead, you can change the list-style in your local
style sheet.
style sheet.

View File

@ -9,15 +9,15 @@ always see the full page content.
Example use:
\[[toggle id="ipsum" text="show"]]
\[[!toggle id="ipsum" text="show"]]
\[[toggleable id="ipsum" text="""
\[[!toggleable id="ipsum" text="""
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat.
[[toggle id="ipsum" text="hide"]]
[[!toggle id="ipsum" text="hide"]]
"""]]
Note that you can include wiki markup in the toggleable text,

View File

@ -8,4 +8,4 @@ updating the version number.
Use is simple:
\[[version ]]
\[[!version ]]

View File

@ -139,7 +139,7 @@ Ok, one more enhancement. Just incrementing the numbers is pretty boring.
It would be nice to be able to jump directly to a given point in the
sequence:
\[[fib seed=20]], [[!fib ]], [[!fib ]]
\[[!fib seed=20]], [[!fib ]], [[!fib ]]
Just insert these lines of code inside `preprocess`, in the appropriate
spot: