From 8fd9c9accbc3c3e977aa78cb38bf7b264c53bace Mon Sep 17 00:00:00 2001 From: joey Date: Fri, 28 Jul 2006 00:21:13 +0000 Subject: [PATCH] Hope encrico doesn't mind, but I changed the location and layout of the tags on the templates. This way seems to fit better with the links. Also some css cleanup, avoid hardcoded etc. --- IkiWiki/Plugin/tag.pm | 8 ++++---- Makefile.PL | 3 ++- basewiki/style.css | 2 +- debian/changelog | 4 ++-- doc/plugins/tag.mdwn | 6 +++++- templates/inlinepage.tmpl | 16 +++++++++++----- templates/inlinepagetitle.tmpl | 1 - templates/page.tmpl | 12 ++++++++++-- 8 files changed, 35 insertions(+), 17 deletions(-) diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index 957fd986d..c4e12e61d 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -40,10 +40,10 @@ sub pagetemplate (@) { #{{{ my $destpage=$params{destpage}; my $template=$params{template}; - $template->param(tags => join(', ', - map { IkiWiki::htmllink($page, $destpage, $_) } - @{$tags{$page}})) - if exists $tags{$page} && $template->query(name => "tags"); + $template->param(tags => [ + map { link => IkiWiki::htmllink($page, $destpage, $_) }, + @{$tags{$page}} + ]) if exists $tags{$page} && @{$tags{$page}} && $template->query(name => "tags"); } # }}} 1 diff --git a/Makefile.PL b/Makefile.PL index 59c5d86ba..05547ff05 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -16,7 +16,8 @@ extra_build: --wikiname="ikiwiki" --verbose --no-rcs \ --exclude=/discussion --no-discussion \ --plugin=brokenlinks --plugin=pagecount \ - --plugin=orphans --plugin=haiku --plugin=meta + --plugin=orphans --plugin=haiku --plugin=meta \ + --plugin=tag ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man diff --git a/basewiki/style.css b/basewiki/style.css index 74186ab3b..f96e11ab0 100644 --- a/basewiki/style.css +++ b/basewiki/style.css @@ -74,7 +74,7 @@ td.changelog { margin: 1em 0; } -#pageinfo { +.pageinfo { font-style: italic; } diff --git a/debian/changelog b/debian/changelog index 282fdf249..0e7a07669 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,10 +8,10 @@ ikiwiki (1.11) UNRELEASED; urgency=low value. - Fixes preprocessor directive parameter parsing so that foo=bar baz now means "foo=bar" and a "baz" with no value. - * Run pagetemplate hooks when inlining pages so that inlines pages also + * Run pagetemplate hooks when inlining pages so that inlined pages also list their tags. * Make all plugins with pagetemplate hooks check that variables exist - on the template before setting them. + on the template before setting them, for robustness. * Switch pagetemplate hooks to using named parameters. * Pass a "destpage" parameter to preprocessor and pagetemplate hooks. This will be the page that a source page will be part of, which is diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn index 95a346622..4d45c6bfd 100644 --- a/doc/plugins/tag.mdwn +++ b/doc/plugins/tag.mdwn @@ -6,4 +6,8 @@ The tags work the same as if you had put a (hidden) [[WikiLink]] on the page for each tag, so you can use a [[GlobList]] to link to all pages that are tagged with a given tag, for example. -This plugin is included in ikiwiki, but is not enabled by default. +This plugin is included in ikiwiki, but is not enabled by default. If it is +enabled, you'll see a note below that this page is tagged with the "tags" +tag. + +[[tag tags]] diff --git a/templates/inlinepage.tmpl b/templates/inlinepage.tmpl index b470c5585..0f0c47767 100644 --- a/templates/inlinepage.tmpl +++ b/templates/inlinepage.tmpl @@ -3,10 +3,16 @@ -

- + Posted -Tags: - -

+ + + + +Tags: + + + + + diff --git a/templates/inlinepagetitle.tmpl b/templates/inlinepagetitle.tmpl index 8527b197d..10469f81c 100644 --- a/templates/inlinepagetitle.tmpl +++ b/templates/inlinepagetitle.tmpl @@ -2,6 +2,5 @@
Posted -

diff --git a/templates/page.tmpl b/templates/page.tmpl index 8439ef8e4..5bdde1fbc 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -49,6 +49,15 @@ +
+ +Tags: + + + + +
+ -- 2.39.2