From f35d35abe36166893f68061a1fcb2a26bc056fbc Mon Sep 17 00:00:00 2001 From: David Riebenbauer Date: Sat, 30 Jan 2010 18:22:32 +0100 Subject: Automatically create tag pages, if "tag_autocreate=1" is set in the configuration. The pages will be created in tagbase, if and only if they do not exist in the srcdir yet. Tag pages will be create from "autotag.tmpl". At this stage a second refresh is needed for the tag pages to be rendered. Add autotag.tmpl template. --- templates/autotag.tmpl | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 templates/autotag.tmpl (limited to 'templates') diff --git a/templates/autotag.tmpl b/templates/autotag.tmpl new file mode 100644 index 000000000..754e0b35b --- /dev/null +++ b/templates/autotag.tmpl @@ -0,0 +1,3 @@ +## Pagest tagged ## + +[[!inline pages="tagged()" actions="no" archive="yes"]] -- cgit v1.2.3 From 9330b91703ba245ceb9c36e0682b8cfc0d225eaa Mon Sep 17 00:00:00 2001 From: David Riebenbauer Date: Tue, 2 Feb 2010 16:29:27 +0100 Subject: fix typo in autotag.tmpl --- templates/autotag.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/autotag.tmpl b/templates/autotag.tmpl index 754e0b35b..a8824171b 100644 --- a/templates/autotag.tmpl +++ b/templates/autotag.tmpl @@ -1,3 +1,3 @@ -## Pagest tagged ## +## Pages tagged ## [[!inline pages="tagged()" actions="no" archive="yes"]] -- cgit v1.2.3 From 8cde2365e43f1c96432dcedb378be55d2308dd08 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 21 Apr 2010 19:09:59 -0400 Subject: add separate template variable for tag page and sanitize displayed tag name --- IkiWiki/Plugin/tag.pm | 3 ++- templates/autotag.tmpl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index c98dd80b2..6a6517671 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -83,7 +83,8 @@ sub gentag ($) { debug($message); my $template=template("autotag.tmpl"); - $template->param(tag => $tag); + $template->param(tag => IkiWiki::basename($tag)); + $template->param(tagpage => $tagpage); writefile($tagfile, $config{srcdir}, $template->output); if ($config{rcs}) { IkiWiki::disable_commit_hook(); diff --git a/templates/autotag.tmpl b/templates/autotag.tmpl index a8824171b..7b0d4c90f 100644 --- a/templates/autotag.tmpl +++ b/templates/autotag.tmpl @@ -1,3 +1,3 @@ -## Pages tagged ## +## Pages tagged ## [[!inline pages="tagged()" actions="no" archive="yes"]] -- cgit v1.2.3