* Add a templates page to the basewiki. It will automatically list all
available templates. Rename the old templates page to wikitemplates. * Include the note template in the basewiki. * Add a popup template in the basewiki. CSS based on some by Martin Krafft. * Make the note, popup, and plugin templates detect missing variables and be self-documenting, listing the available variables.master
parent
08d6f422a7
commit
d73eb7d9b2
|
@ -0,0 +1 @@
|
|||
../doc/templates.mdwn
|
|
@ -0,0 +1 @@
|
|||
../../doc/templates/note.mdwn
|
|
@ -0,0 +1 @@
|
|||
../../doc/templates/popup.mdwn
|
|
@ -5,8 +5,14 @@ ikiwiki (1.49) UNRELEASED; urgency=low
|
|||
real post-commit hook that sshs back to the web server, and runs ikiwiki
|
||||
in post-commit mode to update the wiki.
|
||||
* Fix urls generated by mirrorlist plugin.
|
||||
* Add a templates page to the basewiki. It will automatically list all
|
||||
available templates. Rename the old templates page to wikitemplates.
|
||||
* Include the note template in the basewiki.
|
||||
* Add a popup template in the basewiki. CSS based on some by Martin Krafft.
|
||||
* Make the note, popup, and plugin templates detect missing variables and be
|
||||
self-documenting, listing the available variables.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Fri, 30 Mar 2007 20:40:35 -0400
|
||||
-- Joey Hess <joeyh@debian.org> Sat, 31 Mar 2007 02:23:46 -0400
|
||||
|
||||
ikiwiki (1.48) unstable; urgency=low
|
||||
|
||||
|
|
|
@ -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]]
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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`
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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]]
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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]].
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
2
mdwn2man
2
mdwn2man
|
@ -7,7 +7,7 @@ my $section=shift;
|
|||
print ".TH $prog $section\n";
|
||||
|
||||
while (<>) {
|
||||
s{(\\?)\[\[([^\s\]]+)\]\]}{$1 ? "[[$2]]" : $2}eg;
|
||||
s{(\\?)\[\[([^\s\|\]]+)(\|[^\s\]])?\]\]}{$1 ? "[[$2]]" : $2}eg;
|
||||
if (/^#\s/) {
|
||||
s/^#\s/.SH /;
|
||||
<>; # blank;
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-03-28 13:46-0400\n"
|
||||
"POT-Creation-Date: 2007-03-31 02:06-0400\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
Loading…
Reference in New Issue