--
cgit v1.2.3
From b1f31ab7cbc87a572886673e7809d5e2fc5ee491 Mon Sep 17 00:00:00 2001
From: Simon McVittie
Date: Sun, 26 Jul 2009 16:49:48 +0100
Subject: getsource: in the default template, just say "Source"
All the other actions are single words (apart from RecentChanges), and
are nouns (apart from Edit); saying "Source" is consistent with "History",
for instance.
---
templates/page.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'templates/page.tmpl')
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 599758cc7..653179e5d 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -51,7 +51,7 @@
--
cgit v1.2.3
From e9d20231a0fa99fe614a43cf60c53af7a84fc795 Mon Sep 17 00:00:00 2001
From: Joey Hess
Date: Sat, 15 Aug 2009 17:00:16 -0400
Subject: further otherlanguages list styling
---
doc/style.css | 13 ++++++++-----
templates/page.tmpl | 4 ++--
2 files changed, 10 insertions(+), 7 deletions(-)
(limited to 'templates/page.tmpl')
diff --git a/doc/style.css b/doc/style.css
index 4fa48b140..4770fc942 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -24,6 +24,10 @@
padding: 6px;
list-style-type: none;
}
+.actions li {
+ display: inline;
+ padding: .2em .4em;
+}
.pageheader .actions ul {
border-bottom: 1px solid #000;
}
@@ -37,6 +41,10 @@
padding: 6px;
list-style-type: none;
}
+#otherlanguages li {
+ display: inline;
+ padding: .2em .4em;
+}
.pageheader #otherlanguages {
border-bottom: 1px solid #000;
}
@@ -45,11 +53,6 @@ div.inlinecontent {
margin-top: .4em;
}
-.actions li {
- display: inline;
- padding: .2em .4em;
-}
-
.pagefooter {
clear: both;
}
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 653179e5d..e71ba316d 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -29,7 +29,7 @@
-( %)
+ (%)
@@ -76,7 +76,7 @@
(master)
-( %)
+ (%)
--
cgit v1.2.3
From 9f0931ce21e5f58e2e9de0ef302beca08b8f9177 Mon Sep 17 00:00:00 2001
From: Joey Hess
Date: Mon, 9 Nov 2009 13:32:08 -0500
Subject: localstyle: New plugin, allows overrding the toplevel local.css with
one that is closer to a page.
I chose not to have it override style.css, because style.css is not really
intended to be edited; the one from the underlay is intended to be used as
a base that local.css overrides.
I chose to use a plugin rather than changing the default behavior, both
because I didn't want to have to worry about possibly breaking backwards
compatability (though this seems unlikely), and because it seemed cleaner
to not include style template parameters in the main page template code.
I suppose someone might want a way to not override the toplevel
local.css, but instead include it as well as foo/local.css. Probably the
best way to do that would be to have foo/local.css @import ../local.css
(modulo browser compatability issues). Alternatively, edit page.tmpl
to always include the toplevel local.css, or swap out this plugin for
another one.
---
IkiWiki/Plugin/localstyle.pm | 35 +++++++++++++++++++++++++++++++++++
debian/changelog | 2 ++
doc/css.mdwn | 3 +++
doc/plugins/localstyle.mdwn | 12 ++++++++++++
templates/page.tmpl | 5 +++++
5 files changed, 57 insertions(+)
create mode 100644 IkiWiki/Plugin/localstyle.pm
create mode 100644 doc/plugins/localstyle.mdwn
(limited to 'templates/page.tmpl')
diff --git a/IkiWiki/Plugin/localstyle.pm b/IkiWiki/Plugin/localstyle.pm
new file mode 100644
index 000000000..111f4dc30
--- /dev/null
+++ b/IkiWiki/Plugin/localstyle.pm
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+
+package IkiWiki::Plugin::localstyle;
+
+use warnings;
+use strict;
+use IkiWiki 3.00;
+
+sub import {
+ hook(type => "getsetup", id => "localstyle", call => \&getsetup);
+ hook(type => "pagetemplate", id => "localstyle", call => \&pagetemplate);
+}
+
+sub getsetup () {
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ },
+}
+
+sub pagetemplate (@) {
+ my %params=@_;
+
+ my $template=$params{template};
+
+ if ($template->query(name => "local_css")) {
+ my $best=bestlink($params{page}, 'local.css');
+ if ($best) {
+ $template->param(local_css => $best);
+ }
+ }
+}
+
+1
diff --git a/debian/changelog b/debian/changelog
index 6a5ae30ab..4ab63f175 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ ikiwiki (3.20091032) UNRELEASED; urgency=low
the template is filled out. This improves the search plugin's indexing,
since it will not include navigational elements from the page template
or sidebar.
+ * localstyle: New plugin, allows overrding the toplevel local.css
+ with one that is closer to a page.
-- Joey Hess Fri, 06 Nov 2009 12:04:29 -0500
diff --git a/doc/css.mdwn b/doc/css.mdwn
index 20790b3d1..29a335596 100644
--- a/doc/css.mdwn
+++ b/doc/css.mdwn
@@ -16,3 +16,6 @@ files.
The [[plugins/meta]] plugin can be used to add additional style sheets to a
page.
+
+The [[plugins/localstyle]] plugin can be used to override the toplevel
+[[local.css]] for a whole section of the wiki.
diff --git a/doc/plugins/localstyle.mdwn b/doc/plugins/localstyle.mdwn
new file mode 100644
index 000000000..70a909d68
--- /dev/null
+++ b/doc/plugins/localstyle.mdwn
@@ -0,0 +1,12 @@
+[[!template id=plugin name=localstyle author="[[Joey]]"]]
+[[!tag type/chrome]]
+
+This plugin allows styling different sections of a wiki using different
+versions of the local.css [[CSS]] file. Normally this file is read from the
+top level of the wiki, but with this plugin enabled, standard
+[[ikiwiki/subpage/LinkingRules]] are used to find the closest local.css
+file to each page.
+
+So, for example, to use different styling for page `foo`, as well as all
+of its [[SubPages|ikiwiki/subpage]], such as `foo/bar`, create a
+`foo/local.css`.
diff --git a/templates/page.tmpl b/templates/page.tmpl
index e71ba316d..0e73463ec 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -7,8 +7,13 @@
+
+
+
+
+
--
cgit v1.2.3
From 7dc357a6db55873d02a52ab7fbc451e5192fa5cb Mon Sep 17 00:00:00 2001
From: Joey Hess
Date: Mon, 9 Nov 2009 14:42:18 -0500
Subject: typo
---
templates/page.tmpl | 1 -
1 file changed, 1 deletion(-)
(limited to 'templates/page.tmpl')
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 0e73463ec..968066a19 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -7,7 +7,6 @@
-
--
cgit v1.2.3
From 4dcea6207d03fcdc25bc1c172d69c30673b7254a Mon Sep 17 00:00:00 2001
From: Joey Hess
Date: Wed, 31 Mar 2010 17:51:46 -0400
Subject: page.tmpl: Add Cache-Control must-revalidate to ensure that users
(especially of Firefox) see fresh page content.
Since Firefox version 3, it's done aggressive caching of visited pages, and
does not, by default, check if the cached content is still valid when
reloading or revisiting a page. By default, Firefox seems to not re-contact
the web server at all. Compare with eg, Epiphany and Chromium, which appear
to always check, and get back a 304 when the page is unchanged.
This header makes Firefox do the right thing, at least for html files. It
still over-caches if css, javascript, images, etc, are changed.
---
debian/changelog | 2 ++
templates/page.tmpl | 1 +
2 files changed, 3 insertions(+)
(limited to 'templates/page.tmpl')
diff --git a/debian/changelog b/debian/changelog
index 5ec52d3c0..bbca7cffe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,8 @@ ikiwiki (3.20100324) UNRELEASED; urgency=low
* openid: Use Openid Simple Registration or OpenID Attribute Exchange
to get the user's email address and username. (Neither is yet
used, but they are available in the session object now.)
+ * page.tmpl: Add Cache-Control must-revalidate to ensure that users
+ (especially of Firefox) see fresh page content.
-- Joey Hess Sat, 13 Mar 2010 14:48:10 -0500
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 968066a19..c24f88823 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -3,6 +3,7 @@
+
--
cgit v1.2.3
From baaa848f6c06b0b3a59677d3551e130c65e5fde7 Mon Sep 17 00:00:00 2001
From: Joey Hess
Date: Thu, 15 Apr 2010 15:04:17 -0400
Subject: CSS and templates for sidebar changed to use a class, not an id.
Multiple sidebars should be possible; also, I want to add a sidebar
template.
---
debian/changelog | 3 ++-
doc/examples/blog.mdwn | 2 +-
doc/examples/blog/index.mdwn | 1 -
doc/examples/blog/sidebar.mdwn | 7 -------
doc/style.css | 2 +-
templates/page.tmpl | 2 +-
6 files changed, 5 insertions(+), 12 deletions(-)
delete mode 100644 doc/examples/blog/sidebar.mdwn
(limited to 'templates/page.tmpl')
diff --git a/debian/changelog b/debian/changelog
index c2b0c3c23..03361e6a0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-ikiwiki (3.20100410) UNRELEASED; urgency=low
+ikiwiki (3.20100415) UNRELEASED; urgency=low
[ Joey Hess ]
* bzr: Fix bzr log parsing to work with bzr 2.0. (liw)
@@ -36,6 +36,7 @@ ikiwiki (3.20100410) UNRELEASED; urgency=low
* pagestats: Use style=list to get a list of tags, scaled by use like
in a tag cloud. This is useful to put in a sidebar.
* Rework example blog front page.
+ * CSS and templates for sidebar changed to use a class, not an id.
-- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400
diff --git a/doc/examples/blog.mdwn b/doc/examples/blog.mdwn
index b9b57b944..33637e57d 100644
--- a/doc/examples/blog.mdwn
+++ b/doc/examples/blog.mdwn
@@ -14,7 +14,7 @@ Some additional configuration you might want to do:
\[[!tag tags/life]]
* Enable the [[sidebar|plugins/sidebar]] plugin to get a sidebar listing all
- the categories you've tagged posts with.
+ the categories you've tagged posts with, and other navigation links.
* Enable the [[pagestats|plugins/pagestats]] plugin to get a tag cloud
to display on the [[index]].
diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn
index b273ba1a9..da95e7660 100644
--- a/doc/examples/blog/index.mdwn
+++ b/doc/examples/blog/index.mdwn
@@ -4,7 +4,6 @@
* [[Recent_Comments|comments]]
* [[Archives]]
-[[!if test="enabled(calendar)" then="""
[[!calendar pages="./posts/* and !*/Discussion"]]
"""]]
diff --git a/doc/examples/blog/sidebar.mdwn b/doc/examples/blog/sidebar.mdwn
deleted file mode 100644
index a9fac388e..000000000
--- a/doc/examples/blog/sidebar.mdwn
+++ /dev/null
@@ -1,7 +0,0 @@
-Example sidebar
-
-* [[Blog|index]]
-* [[Archive|posts]]
-
-Categories:
-[[!map pages="./tags/* and !*/Discussion"]]
diff --git a/doc/style.css b/doc/style.css
index 317d4c7aa..af0fc230c 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -228,7 +228,7 @@ div.recentchanges {
.bigPC { font-size: 115%; }
.biggestPC { font-size: 130%; }
-#sidebar {
+.sidebar {
line-height: 3ex;
width: 20ex;
float: right;
diff --git a/templates/page.tmpl b/templates/page.tmpl
index c24f88823..7e850a56b 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -92,7 +92,7 @@
-
+
--
cgit v1.2.3
From a547d2685866898665fad221939b0b820a42a088 Mon Sep 17 00:00:00 2001
From: Joey Hess
Date: Sat, 1 May 2010 20:40:31 -0400
Subject: html5 option
* Ikiwiki can be configured to generate html5 instead of the default xhtml
1.0. The html5 output mode is experimental, not yet fully standards
compliant, and will be subject to rapid change.
---
IkiWiki.pm | 8 ++++++++
IkiWiki/Render.pm | 1 +
debian/changelog | 5 ++++-
doc/bugs/html5_support.mdwn | 12 +++++++-----
doc/roadmap.mdwn | 1 +
templates/misc.tmpl | 5 ++++-
templates/page.tmpl | 5 ++++-
7 files changed, 29 insertions(+), 8 deletions(-)
(limited to 'templates/page.tmpl')
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 5ff1a5ae6..1e11d34e2 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -234,6 +234,13 @@ sub getsetup () {
safe => 1,
rebuild => 1,
},
+ html5 => {
+ type => "boolean",
+ default => 0,
+ description => "generate HTML5? (experimental)",
+ safe => 1,
+ rebuild => 1,
+ },
sslcookie => {
type => "boolean",
default => 0,
@@ -1725,6 +1732,7 @@ sub misctemplate ($$;@) {
wikiname => $config{wikiname},
pagebody => $pagebody,
baseurl => baseurl(),
+ html5 => $config{html5},
@_,
);
run_hooks(pagetemplate => sub {
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 7e3d78861..5923f5e74 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -138,6 +138,7 @@ sub genpage ($$) {
mtime => displaytime($pagemtime{$page}),
ctime => displaytime($pagectime{$page}),
baseurl => baseurl($page),
+ html5 => $config{html5},
);
run_hooks(pagetemplate => sub {
diff --git a/debian/changelog b/debian/changelog
index 8bf6f89b6..fc5a6124b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,12 @@
ikiwiki (3.20100428) UNRELEASED; urgency=low
- * template: Fix typo.
* TMPL_INCLUDE re-enabled for templates read from the templatedir.
(But not in-wiki templates.)
* Version dependency on liburi-perl to >= 1.36; previous versions
did not support building urls from utf-8 strings. Closes: #579713
+ * Ikiwiki can be configured to generate html5 instead of the default xhtml
+ 1.0. The html5 output mode is experimental, not yet fully standards
+ compliant, and will be subject to rapid change.
* htmlscrubber: Allow html5 semantic tags: section, nav, article, aside
hgroup, header, footer, figure, figcaption, time, mark
* htmlscrubber: Also allow some other html5 tags: canvas, progress, meter,
@@ -16,6 +18,7 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low
and form. (Also the form* override attributes for input and buttons.)
* htmlscrubber: Allow additional misc html5 attributes: reversed,
spellcheck, and hidden.
+ * template: Fix typo.
-- Joey Hess Tue, 27 Apr 2010 12:10:51 -0400
diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn
index 2d27ac803..bf782a3bf 100644
--- a/doc/bugs/html5_support.mdwn
+++ b/doc/bugs/html5_support.mdwn
@@ -20,13 +20,14 @@ HTML5](http://www.w3.org/TR/html5-diff/).
> What has been done so far, can be extended. Basically works
> in browsers, if you don't care about standards. A good prerequisite
> for anything else, anyway.
-> 2. Switch to html5 in eg, ikiwiki 4; users have to deal with
+> 2. Have both a html5 and a xhtml mode, allow user to select.
+> 3. Switch to html5 in eg, ikiwiki 4; users have to deal with
> any custom markup on their pages/templates that breaks then.
-> 3. Have both a html5 and a xhtml mode, allow user to select.
->
-> The third option seems fairly tractable from what I see here and in
+>
+> The second option seems fairly tractable from what I see here and in
> your branch. You made only relatively minor changes to 10 templates.
-> It would probably not be too dreadful to put them in ifdefs.
+> It would probably not be too dreadful to put them in ifdefs. I've made a
+> small start at doing that.
>
> Some of your changes are obvious, like using the new `time` and
> and `article` elements. Others less so, and I'm particularly
@@ -70,6 +71,7 @@ HTML5](http://www.w3.org/TR/html5-diff/).
> [[this_todo|Add_label_to_search_form_input_field]]
> * Use details tag instead of the javascript in the toggle plugin.
> (Need to wait on browser support probably.)
+>
> --[[Joey]]
# htmlscrubber.pm needs to not scrub new HTML5 elements
diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn
index c126fd585..4b5f01c45 100644
--- a/doc/roadmap.mdwn
+++ b/doc/roadmap.mdwn
@@ -80,6 +80,7 @@ Probably incomplete list:
* YADA format setup files per default?
* Enable tagbase by default (so that tag autocreation will work by default).
Note that this is already done for wikis created by `auto-blog.setup`.
+* html5 on by default (some day..)
In general, we try to use [[ikiwiki-transition]] or forced rebuilds on
upgrade to deal with changes that break compatability. Some things that
diff --git a/templates/misc.tmpl b/templates/misc.tmpl
index 535a6f06b..0b7fefa08 100644
--- a/templates/misc.tmpl
+++ b/templates/misc.tmpl
@@ -1,6 +1,9 @@
-
+
+
+
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 7e850a56b..661d4a515 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -1,6 +1,9 @@
-
+
+
+
--
cgit v1.2.3
From d69f6057d1e1787fa3c19cc13c40eb3e9b822283 Mon Sep 17 00:00:00 2001
From: Joey Hess
Date: Sun, 2 May 2010 15:09:33 -0400
Subject: use html5 semantic markup in page.tmpl
This is a first pass, it avoids needing to change style.css
except where it refers to tag types.
This goes a bit off the rails at the pageheader with its nested header.
Semantically, there should be an article around the whole page
header, content, and footer. Just as there will be an article around a
whole comment or inlined page header, content, and footer.
But that will mean changing the css that currently refers to pageheader to
refer to the enclosing article instead.
---
debian/changelog | 3 +++
doc/style.css | 5 +----
templates/page.tmpl | 49 +++++++++++++++++++++++++------------------------
3 files changed, 29 insertions(+), 28 deletions(-)
(limited to 'templates/page.tmpl')
diff --git a/debian/changelog b/debian/changelog
index c9fc2e657..789fda1ce 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ ikiwiki (3.20100502) UNRELEASED; urgency=low
* Add parameter to displaytime to specify that it is a pubdate,
and in html5 mode, use time tag.
* Add placeholder text in search form (in html5 mode only).
+ * In html5 mode, use all the nice new semantic tags. Care was taken
+ to not change the id/class named used in the CSS, so only CSS
+ that refers to tag types needed to be changed.
-- Joey Hess Sun, 02 May 2010 13:22:50 -0400
diff --git a/doc/style.css b/doc/style.css
index 7ffcf9fe2..69c7f80d8 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -60,15 +60,12 @@ div.inlinecontent {
clear: both;
}
-.tags {
-}
-
#pageinfo {
margin: 1em 0;
border-top: 1px solid #000;
}
-div.tags {
+.tags {
margin-top: 1em;
}
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 661d4a515..0176b0116 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -5,7 +5,7 @@
-
+
@@ -26,8 +26,8 @@
-
-
+
+
@@ -40,14 +40,14 @@
(%)
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
-
-
+
--
cgit v1.2.3
From 0aad1794ad27da6ab41001e335eba952c2e0ac88 Mon Sep 17 00:00:00 2001
From: Joey Hess
Date: Sun, 2 May 2010 15:41:12 -0400
Subject: improve semantic markup
Now the toplevel layout is:
contentcomments
And I managed to preserve all CSS ids and names in their prior structure,
so CSS should not need changed.
---
templates/page.tmpl | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
(limited to 'templates/page.tmpl')
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 0176b0116..195ce7886 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -26,7 +26,9 @@
-
+
+
+
@@ -92,7 +94,7 @@
-
+
-
+
+
-
-
+
--
cgit v1.2.3
From 2f22ee85e547dfe408fc0ec520aed6a6e137e136 Mon Sep 17 00:00:00 2001
From: Joey Hess
Date: Mon, 3 May 2010 12:15:40 -0400
Subject: Add ACTIONS variable to page.tmpl, which allows plugins to add
arbitrary links to the action bar without modifying the template further.
(COMMENTSLINK and DISCUSSIONLINK could be folded into this, but are kept
separate for now to avoid breaking modified templates.)
---
IkiWiki/Plugin/skeleton.pm.example | 9 +++++++++
IkiWiki/Render.pm | 9 ++++++++-
debian/changelog | 4 ++++
doc/plugins/write.mdwn | 9 +++++++++
templates/page.tmpl | 9 +++++++--
5 files changed, 37 insertions(+), 3 deletions(-)
(limited to 'templates/page.tmpl')
diff --git a/IkiWiki/Plugin/skeleton.pm.example b/IkiWiki/Plugin/skeleton.pm.example
index ddf2996d6..a404e24af 100644
--- a/IkiWiki/Plugin/skeleton.pm.example
+++ b/IkiWiki/Plugin/skeleton.pm.example
@@ -24,6 +24,7 @@ sub import {
hook(type => "format", id => "skeleton", call => \&format);
hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
hook(type => "templatefile", id => "skeleton", call => \&templatefile);
+ hook(type => "pageactions", id => "skeleton", call => \&pageactions);
hook(type => "delete", id => "skeleton", call => \&delete);
hook(type => "change", id => "skeleton", call => \&change);
hook(type => "cgi", id => "skeleton", call => \&cgi);
@@ -146,6 +147,14 @@ sub templatefile (@) {
debug("skeleton plugin running as a templatefile hook");
}
+sub pageactions (@) {
+ my %params=@_;
+ my $page=$params{page};
+
+ debug("skeleton plugin running as a pageactions hook");
+ return ();
+}
+
sub delete (@) {
my @files=@_;
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index cf6943e7d..a824ba539 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -112,7 +112,14 @@ sub genpage ($$) {
}
}
- if ($actions) {
+ my @actions;
+ run_hooks(pageactions => sub {
+ push @actions, map { { action => $_ } }
+ grep { defined } shift->(page => $page);
+ });
+ $template->param(actions => \@actions);
+
+ if ($actions || @actions) {
$template->param(have_actions => 1);
}
diff --git a/debian/changelog b/debian/changelog
index 789fda1ce..e03375bd3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,10 @@ ikiwiki (3.20100502) UNRELEASED; urgency=low
* In html5 mode, use all the nice new semantic tags. Care was taken
to not change the id/class named used in the CSS, so only CSS
that refers to tag types needed to be changed.
+ * Add ACTIONS variable to page.tmpl, which allows plugins to add arbitrary
+ links to the action bar without modifying the template further.
+ (COMMENTSLINK and DISCUSSIONLINK could be folded into this, but
+ are kept separate for now to avoid breaking modified templates.)
-- Joey Hess Sun, 02 May 2010 13:22:50 -0400
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 5e7042c3b..3b1d770eb 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -319,6 +319,15 @@ should return the name of the template file to use (relative to the
template directory), or undef if it doesn't want to change the default
("page.tmpl").
+### pageactions
+
+ hook(type => "pageactions", id => "foo", call => \&pageactions);
+
+This hook allows plugins to add arbitrary actions to the action bar on a
+page (next to Edit, RecentChanges, etc). The hook is passed a "page"
+parameter, and can return a list of html fragments to add to the action
+bar.
+
### sanitize
hook(type => "sanitize", id => "foo", call => \&sanitize);
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 195ce7886..8a9911fae 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -66,11 +66,16 @@
+
--
cgit v1.2.3
From 58a07f9e5436ec815c0cb5736a9680096c977eed Mon Sep 17 00:00:00 2001
From: Joey Hess
Date: Wed, 5 May 2010 18:27:09 -0400
Subject: on second thought, remove FOOTER variable
We always want a footer, just not a pagefooter when doing misctemplate.
---
templates/page.tmpl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'templates/page.tmpl')
diff --git a/templates/page.tmpl b/templates/page.tmpl
index b6c751a3a..f5257058c 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -133,8 +133,8 @@
-
+
-
--
cgit v1.2.3
From 5971a731e98b9b6543d78572c181ffc1bb7e1dd1 Mon Sep 17 00:00:00 2001
From: Joey Hess
Date: Wed, 5 May 2010 18:42:18 -0400
Subject: allow search form visibility to be controlled on the template
hide extrafooter from misctemplate display per default
---
IkiWiki.pm | 1 -
templates/page.tmpl | 4 +++-
2 files changed, 3 insertions(+), 2 deletions(-)
(limited to 'templates/page.tmpl')
diff --git a/IkiWiki.pm b/IkiWiki.pm
index d20a3709c..54271becc 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1757,7 +1757,6 @@ sub misctemplate ($$;@) {
baseurl => baseurl(),
html5 => $config{html5},
have_actions => 0, # force off
- searchform => 0, # ditto
parentlinks => [{ # override
url => $config{url},
page => $config{wikiname},
diff --git a/templates/page.tmpl b/templates/page.tmpl
index f5257058c..eb76cafa6 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -52,9 +52,11 @@
+
+
@@ -184,8 +186,8 @@ Last edited
-
+
--
cgit v1.2.3
From f52f395437a946478da2a126015c05e3e0afdc1f Mon Sep 17 00:00:00 2001
From: Joey Hess
Date: Wed, 5 May 2010 21:08:41 -0400
Subject: consistently drop NAME= in templates
also add template syntax smoke test
---
doc/ikiwiki/directive/template.mdwn | 8 ++---
doc/templates.mdwn | 4 +--
doc/templates/gitbranch.mdwn | 2 +-
doc/templates/note.mdwn | 2 +-
doc/templates/plugin.mdwn | 2 +-
doc/templates/popup.mdwn | 2 +-
templates/aggregatepost.tmpl | 18 +++++------
templates/archivepage.tmpl | 6 ++--
templates/atomitem.tmpl | 24 +++++++-------
templates/atompage.tmpl | 10 +++---
templates/blogpost.tmpl | 8 ++---
templates/change.tmpl | 18 +++++------
templates/comment.tmpl | 30 ++++++++---------
templates/commentmoderation.tmpl | 4 +--
templates/editcomment.tmpl | 12 +++----
templates/editpage.tmpl | 12 +++----
templates/feedlink.tmpl | 8 ++---
templates/googleform.tmpl | 1 +
templates/inlinepage.tmpl | 18 +++++------
templates/microblog.tmpl | 4 +--
templates/page.tmpl | 64 ++++++++++++++++++-------------------
templates/pocreatepage.tmpl | 4 +--
templates/renamesummary.tmpl | 4 +--
templates/rssitem.tmpl | 14 ++++----
templates/titlepage.tmpl | 2 +-
25 files changed, 141 insertions(+), 140 deletions(-)
(limited to 'templates/page.tmpl')
diff --git a/doc/ikiwiki/directive/template.mdwn b/doc/ikiwiki/directive/template.mdwn
index 052ca7873..6c50fa32e 100644
--- a/doc/ikiwiki/directive/template.mdwn
+++ b/doc/ikiwiki/directive/template.mdwn
@@ -53,21 +53,21 @@ few things:
* To insert the raw value of a variable, with wiki markup not yet converted
to html, use ``.
* To make a block of text conditional on a variable being set use
- `text`.
+ `text`.
* To use one block of text if a variable is set and a second if it's not,
- use `textother text`
+ use `textother text`
Here's a sample template:
Name: \[[]]
Age:
-
+
Favorite color:
No favorite color.
-
+
diff --git a/doc/templates.mdwn b/doc/templates.mdwn
index 2444cf14d..8f6561fcf 100644
--- a/doc/templates.mdwn
+++ b/doc/templates.mdwn
@@ -12,9 +12,9 @@ easy to learn. All you really need to know to modify templates is this:
* To insert the value of a template variable, use ``.
* To make a block of text conditional on a variable being set use
- `text`.
+ `text`.
* To use one block of text if a variable is set and a second if it's not,
- use `textother text`
+ use `textother text`
[[!if test="enabled(template)" then="""
## template pages
diff --git a/doc/templates/gitbranch.mdwn b/doc/templates/gitbranch.mdwn
index fcce925d9..962420940 100644
--- a/doc/templates/gitbranch.mdwn
+++ b/doc/templates/gitbranch.mdwn
@@ -3,7 +3,7 @@ Available in a [[!taglink /git]] repository.
Branch:
Author:
-
+
This template is used to create an infobox for a git branch. It uses
these parameters:
diff --git a/doc/templates/note.mdwn b/doc/templates/note.mdwn
index 4cc323c0e..9ef5ad942 100644
--- a/doc/templates/note.mdwn
+++ b/doc/templates/note.mdwn
@@ -1,7 +1,7 @@
-
+
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:
diff --git a/doc/templates/plugin.mdwn b/doc/templates/plugin.mdwn
index c1d1974d6..322c49445 100644
--- a/doc/templates/plugin.mdwn
+++ b/doc/templates/plugin.mdwn
@@ -8,7 +8,7 @@ Currently enabled: [[!if test="enabled()" then="yes" else="no"]]<
[[!if test="sourcepage(plugins/contrib/*)" then="""[[!meta title=" (third party plugin)"]]"""]]
[[!tag plugins/type/core]]
-
+
This template is used to create an infobox for an ikiwiki plugin. It uses
these parameters:
diff --git a/doc/templates/popup.mdwn b/doc/templates/popup.mdwn
index b355daa2e..92455eb21 100644
--- a/doc/templates/popup.mdwn
+++ b/doc/templates/popup.mdwn
@@ -1,4 +1,4 @@
-
+
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: