summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/features.mdwn6
-rw-r--r--doc/freesoftware.mdwn4
-rw-r--r--doc/plugins/inline.mdwn2
-rw-r--r--doc/plugins/search.mdwn4
-rw-r--r--doc/plugins/template.mdwn6
-rw-r--r--doc/style.css63
-rw-r--r--doc/templates.mdwn58
-rw-r--r--doc/templates/note.mdwn8
-rw-r--r--doc/templates/plugin.mdwn9
-rw-r--r--doc/templates/popup.mdwn16
-rw-r--r--doc/todo/html.mdwn2
-rw-r--r--doc/usage.mdwn4
-rw-r--r--doc/wikitemplates.mdwn53
13 files changed, 153 insertions, 82 deletions
diff --git a/doc/features.mdwn b/doc/features.mdwn
index 26a98295b..551edf811 100644
--- a/doc/features.mdwn
+++ b/doc/features.mdwn
@@ -68,9 +68,9 @@ you would care to syndicate.
## Valid html and [[css]]
ikiwiki aims to produce
-[valid XHTML 1.0](http://validator.w3.org/check?url=referer).
-ikiwiki generates html using [[templates]], and uses [[css]], so you can
-change the look and layout of all pages in any way you would like.
+[valid XHTML 1.0](http://validator.w3.org/check?url=referer). ikiwiki
+generates html using [[templates|wikitemplates]], and uses [[css]], so you
+can change the look and layout of all pages in any way you would like.
## [[Plugins]]
diff --git a/doc/freesoftware.mdwn b/doc/freesoftware.mdwn
index 96293c90e..2b3a0af0c 100644
--- a/doc/freesoftware.mdwn
+++ b/doc/freesoftware.mdwn
@@ -3,6 +3,6 @@
ikiwiki is licensed under the terms of the GNU [[GPL]], version 2 or later.
The parts of ikiwiki that become part of your own wiki (the [[basewiki]] pages
-and the [[templates]]) are licensed as follows: Redistribution and use in
-source and compiled forms, with or without modification, are permitted under
+and the [[templates|wikitemplates]]) are licensed as follows: Redistribution and
+use in source and compiled forms, with or without modification, are permitted under
any circumstances. No warranty.
diff --git a/doc/plugins/inline.mdwn b/doc/plugins/inline.mdwn
index fd894baa1..3b1aaf0a0 100644
--- a/doc/plugins/inline.mdwn
+++ b/doc/plugins/inline.mdwn
@@ -37,7 +37,7 @@ directive:
* `quick` - Build archives in quick mode, without reading page contents for
metadata. By default, this also turns off generation of any feeds.
* `template` - Specifies the template to fill out to display each inlined
- page. By default the `inlinepage` [[template|templates]] is used, while
+ page. By default the `inlinepage` [[template|wikitemplates]] is used, while
the `archivepage` template is used for archives. Set this parameter to
use some other, custom template, such as the `titlepage` template that
only shows post titles. Note that you should still set `archive=yes` if
diff --git a/doc/plugins/search.mdwn b/doc/plugins/search.mdwn
index b324251bf..7b32714f4 100644
--- a/doc/plugins/search.mdwn
+++ b/doc/plugins/search.mdwn
@@ -5,8 +5,8 @@ This plugin is included in ikiwiki, but is not enabled by default. It adds
full text search to ikiwiki, using the [[HyperEstraier]] engine.
It's possible to configure HyperEstraier via one of ikiwiki's
-[[templates]], but for most users, no configuration should be needed aside
-from enabling the plugin.
+[[templates|wikitemplates]], but for most users, no configuration should be
+needed aside from enabling the plugin.
This plugin has a configuration option. To change the path to estseek.cgi,
set `--estseek=/path/to/estseek.cgi`
diff --git a/doc/plugins/template.mdwn b/doc/plugins/template.mdwn
index 98188d7dc..4efab57e3 100644
--- a/doc/plugins/template.mdwn
+++ b/doc/plugins/template.mdwn
@@ -23,9 +23,13 @@ large chunks of marked up text to be embedded into a template:
* Really 8 and a half.
"""]]
+Some templates are included in the wiki by default; these are listed in the
+[[templates]] page.
+
To create a template, make a page in the wiki named `template/foo`. Note
that this is a different location than the directory used for the
-[[templates]] used to build the wiki itself, which is not part of the wiki.
+[[templates|wikitemplates]] used to build the wiki itself, which is not
+part of the wiki.
The template uses the syntax used by the [[cpan HTML::Template]] perl
module, which allows for some fairly complex things to be done. Consult its
diff --git a/doc/style.css b/doc/style.css
index 0fc29f9e1..af460dd0d 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -161,25 +161,6 @@ td.changelog {
padding: 2ex 2ex;
}
-.infobox {
- float: right;
- margin-left: 2ex;
- margin-top: 1ex;
- margin-bottom: 1ex;
- padding: 1ex 1ex;
- border: 1px solid #aaa;
-}
-
-.notebox {
- float: right;
- margin-left: 2ex;
- margin-top: 1ex;
- margin-bottom: 1ex;
- padding: 1ex 1ex;
- border: 1px solid #aaa;
- width: 25%
-}
-
/* outlines */
li.L1 {
list-style: upper-roman;
@@ -236,3 +217,47 @@ input#openid_url {
#blogform { display: none; }
#backlinks { display: none; }
}
+
+/* Provided for use by template plugin for floating info boxes. */
+.infobox {
+ float: right;
+ margin-left: 2ex;
+ margin-top: 1ex;
+ margin-bottom: 1ex;
+ padding: 1ex 1ex;
+ border: 1px solid #aaa;
+}
+
+/* Provided for use by template plugin for floating note boxes. */
+.notebox {
+ float: right;
+ margin-left: 2ex;
+ margin-top: 1ex;
+ margin-bottom: 1ex;
+ padding: 1ex 1ex;
+ border: 1px solid #aaa;
+ width: 25%
+}
+
+/* Used by the popup template. */
+.popup {
+ border-bottom: 1px dotted #366;
+ color: #366;
+}
+.popup .balloon,
+.popup .paren {
+ display: none;
+}
+.popup:hover .balloon,
+.popup:focus .balloon {
+ position: absolute;
+ display: inline;
+ margin: 1em 0 0 -2em;
+ padding: 0.625em;
+ border: 2px solid;
+ background-color: #dee;
+ color: black;
+ opacity: 0.95;
+ -moz-opacity: 0.95;
+ filter: alpha(opacity=95);
+}
diff --git a/doc/templates.mdwn b/doc/templates.mdwn
index 1f98334c9..71bf8a47a 100644
--- a/doc/templates.mdwn
+++ b/doc/templates.mdwn
@@ -1,53 +1,9 @@
-ikiwiki uses the HTML::Template module as its template engine. This
-supports things like conditionals and loops in templates and is pretty easy
-to learn.
+[[if test="enabled(template)"
+ then="This wiki has templates **enabled**."
+ else="This wiki has templates **disabled**."]]
-The aim is to keep almost all html out of ikiwiki and in the templates.
+These templates are available for inclusion onto other pages in this
+wiki:
-It ships with some basic templates which can be customised. These are
-located in /usr/share/ikiwiki/templates by default.
-
-* `page.tmpl` - Used for displaying all regular wiki pages.
-* `misc.tmpl` - Generic template used for any page that doesn't
- have a custom template.
-* `recentchanges.tmpl` - Used for the RecentChanges page.
-* `editpage.tmpl` - Create/edit page.
-* `notifymail.tmpl` - Not a html template, this is used to
- generate change notification mails for users who have subscribed to
- changes to a page.
-* `passwordmail.tmpl` - Not a html template, this is used to
- generate the mail with the user's password in it.
-* `rsspage.tmpl` - Used for generating rss feeds for [[blog]]s.
-* `rssitem.tmpl` - Used for generating individual items on rss feeds.
-* `atompage.tmpl` - Used for generating atom feeds for [[blog]]s.
-* `atomitem.tmpl` - Used for generating individual items on atom feeds.
-* `inlinepage.tmpl` - Used for adding a page inline in a blog
- page.
-* `archivepage.tmpl` - Used for listing a page in a blog archive page.
-* `estseek.conf` - Not a html template, this is actually a template for
- a config file for the [[HyperEstraier]] search engine. If you like you
- can read the [[HyperEstraier]] docs and configure it using this.
-* `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links)
-* `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used.
-* `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create
- a page for a post.
-* `searchform.tmpl` - Used by the [[plugins/search]] plugin to add a search
- form to wiki pages.
-
-If you like, you can add these to further customise it:
-
-* `signin.tmpl` - If it exists, it is used for customising the
- layout of the SignIn form and all assciated forms. The misc.tmpl is
- wrapped around this, so it should only be a template for the form.
-* `prefs.tmpl` - If it exists, it is used for customising the
- layout of the Prefs form and all assciated forms. The misc.tmpl is
- wrapped around this, so it should only be a template for the form.
-
-Note that the SignIn and Prefs forms are implemented using
-CGI::FormBuilder, which interfaces to HTML::Template, so not all of it can
-be customised with templates, although most of it can, by creating these
-templates. Without the templates, CGI::FormBuilder creates the page bodies
-by itself.
-
-The [[plugins/template]] plugin also uses templates, though those templates
-are stored in the wiki.
+[[inline pages="templates/* and !*/discussion" feeds=no archive=yes
+sort=title template=titlepage]]
diff --git a/doc/templates/note.mdwn b/doc/templates/note.mdwn
index 2cbc230b3..d992e0236 100644
--- a/doc/templates/note.mdwn
+++ b/doc/templates/note.mdwn
@@ -1,3 +1,11 @@
<span class="notebox">
<TMPL_VAR text>
</span>
+<TMPL_UNLESS NAME="text">
+Use this template to insert a note into a page. The note will be styled to
+float to the right of other text on the page. This template has one
+parameter:
+<ul>
+<li>`text` - the text to display in the note
+</ul>
+</TMPL_UNLESS>
diff --git a/doc/templates/plugin.mdwn b/doc/templates/plugin.mdwn
index 5ce05b231..b4dabc341 100644
--- a/doc/templates/plugin.mdwn
+++ b/doc/templates/plugin.mdwn
@@ -7,3 +7,12 @@ Currently enabled: [[if test="enabled(<TMPL_VAR name>)" then="yes" else="no"]]<b
</span>
[[if test="sourcepage(plugins/contrib/*)" then="""[[meta title="<TMPL_VAR name> (third party plugin)"]]"""]]
<TMPL_IF core>[[tag type/core]]</TMPL_IF>
+<TMPL_UNLESS NAME="name">
+This template is used to create an infobox for an ikiwiki plugin. It uses
+these parameters:
+<ul>
+<li>name - the name of the plugin
+<li>author - the author of the plugin
+<li>core - set to a true value if the plugin is enabled by default
+</ul>
+</TMPL_UNLESS>
diff --git a/doc/templates/popup.mdwn b/doc/templates/popup.mdwn
new file mode 100644
index 000000000..244c1d4dd
--- /dev/null
+++ b/doc/templates/popup.mdwn
@@ -0,0 +1,16 @@
+<TMPL_UNLESS NAME="mouseover">
+Use this template to create a popup window that is displayed when the mouse
+is over part of the page. This template has two parameters:
+<ul>
+<li>`mouseover` - This is the text or other content that triggers the
+popup.
+<li>`popup` - This should be the content of the popup window. It can be
+anything, even images or a whole little wiki page, but should not be too
+large for good usability.
+</ul>
+Note that browsers that do not support the CSS will display the popup
+inline in the page, inside parens.
+</TMPL_UNLESS>
+<span class="popup"><TMPL_VAR mouseover>
+<span class="paren">[</span><span class="balloon"><TMPL_VAR popup></span><span class="paren">]</span>
+</span>
diff --git a/doc/todo/html.mdwn b/doc/todo/html.mdwn
index a99f87c8a..1c9fe0690 100644
--- a/doc/todo/html.mdwn
+++ b/doc/todo/html.mdwn
@@ -1,4 +1,4 @@
Create some nice(r) stylesheets.
Should be doable w/o touching a single line of code, just
-editing the [[templates]] and/or editing [[style.css]].
+editing the [[wikitemplates]] and/or editing [[style.css]].
diff --git a/doc/usage.mdwn b/doc/usage.mdwn
index 3102245b2..bb6f06aea 100644
--- a/doc/usage.mdwn
+++ b/doc/usage.mdwn
@@ -109,8 +109,8 @@ configuration options of their own.
* --templatedir
- Specify the directory that the page [[templates]] are stored in. Default
- is `/usr/share/ikiwiki/templates`, or another location as configured at
+ Specify the directory that the page [[templates|wikitemplates]] are stored in.
+ Default is `/usr/share/ikiwiki/templates`, or another location as configured at
build time. If the templatedir is changed, missing templates will still
be searched for in the default location as a fallback.
diff --git a/doc/wikitemplates.mdwn b/doc/wikitemplates.mdwn
new file mode 100644
index 000000000..1f98334c9
--- /dev/null
+++ b/doc/wikitemplates.mdwn
@@ -0,0 +1,53 @@
+ikiwiki uses the HTML::Template module as its template engine. This
+supports things like conditionals and loops in templates and is pretty easy
+to learn.
+
+The aim is to keep almost all html out of ikiwiki and in the templates.
+
+It ships with some basic templates which can be customised. These are
+located in /usr/share/ikiwiki/templates by default.
+
+* `page.tmpl` - Used for displaying all regular wiki pages.
+* `misc.tmpl` - Generic template used for any page that doesn't
+ have a custom template.
+* `recentchanges.tmpl` - Used for the RecentChanges page.
+* `editpage.tmpl` - Create/edit page.
+* `notifymail.tmpl` - Not a html template, this is used to
+ generate change notification mails for users who have subscribed to
+ changes to a page.
+* `passwordmail.tmpl` - Not a html template, this is used to
+ generate the mail with the user's password in it.
+* `rsspage.tmpl` - Used for generating rss feeds for [[blog]]s.
+* `rssitem.tmpl` - Used for generating individual items on rss feeds.
+* `atompage.tmpl` - Used for generating atom feeds for [[blog]]s.
+* `atomitem.tmpl` - Used for generating individual items on atom feeds.
+* `inlinepage.tmpl` - Used for adding a page inline in a blog
+ page.
+* `archivepage.tmpl` - Used for listing a page in a blog archive page.
+* `estseek.conf` - Not a html template, this is actually a template for
+ a config file for the [[HyperEstraier]] search engine. If you like you
+ can read the [[HyperEstraier]] docs and configure it using this.
+* `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links)
+* `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used.
+* `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create
+ a page for a post.
+* `searchform.tmpl` - Used by the [[plugins/search]] plugin to add a search
+ form to wiki pages.
+
+If you like, you can add these to further customise it:
+
+* `signin.tmpl` - If it exists, it is used for customising the
+ layout of the SignIn form and all assciated forms. The misc.tmpl is
+ wrapped around this, so it should only be a template for the form.
+* `prefs.tmpl` - If it exists, it is used for customising the
+ layout of the Prefs form and all assciated forms. The misc.tmpl is
+ wrapped around this, so it should only be a template for the form.
+
+Note that the SignIn and Prefs forms are implemented using
+CGI::FormBuilder, which interfaces to HTML::Template, so not all of it can
+be customised with templates, although most of it can, by creating these
+templates. Without the templates, CGI::FormBuilder creates the page bodies
+by itself.
+
+The [[plugins/template]] plugin also uses templates, though those templates
+are stored in the wiki.