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 <i> etc.master
parent
22df49a2bf
commit
8fd9c9accb
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ td.changelog {
|
|||
margin: 1em 0;
|
||||
}
|
||||
|
||||
#pageinfo {
|
||||
.pageinfo {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]]
|
||||
|
|
|
@ -3,10 +3,16 @@
|
|||
|
||||
<TMPL_VAR CONTENT>
|
||||
|
||||
<p>
|
||||
<i>
|
||||
<span class="pageinfo">
|
||||
Posted <TMPL_VAR CTIME>
|
||||
<TMPL_IF NAME="TAGS">Tags: <TMPL_VAR TAGS></TMPL_IF>
|
||||
</i>
|
||||
</p>
|
||||
</span>
|
||||
|
||||
<span class="tags">
|
||||
<TMPL_IF NAME="TAGS">
|
||||
Tags:
|
||||
<TMPL_LOOP NAME="TAGS">
|
||||
<TMPL_VAR NAME=LINK>
|
||||
</TMPL_LOOP>
|
||||
</TMPL_IF>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,5 @@
|
|||
<TMPL_VAR PAGELINK><br />
|
||||
<i>
|
||||
Posted <TMPL_VAR CTIME>
|
||||
<!-- <TMPL_IF NAME="TAGS"><TMPL_VAR TAGS></TMPL_IF> -->
|
||||
</i>
|
||||
</p>
|
||||
|
|
|
@ -49,6 +49,15 @@
|
|||
<TMPL_VAR CONTENT>
|
||||
</div>
|
||||
|
||||
<div class="tags">
|
||||
<TMPL_IF NAME="TAGS">
|
||||
Tags:
|
||||
<TMPL_LOOP NAME="TAGS">
|
||||
<TMPL_VAR NAME=LINK>
|
||||
</TMPL_LOOP>
|
||||
</TMPL_IF>
|
||||
</div>
|
||||
|
||||
<div id="backlinks">
|
||||
<TMPL_IF NAME="BACKLINKS">
|
||||
Links:
|
||||
|
@ -59,10 +68,9 @@ Links:
|
|||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<span id="pageinfo">
|
||||
<span class="pageinfo">
|
||||
<!-- from <TMPL_VAR NAME=WIKINAME> -->
|
||||
Last edited <TMPL_VAR NAME=MTIME>
|
||||
<TMPL_IF NAME="TAGS">Tags: <TMPL_VAR TAGS></TMPL_IF>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue