[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Debian JP master SVN www commits (rev.1500)



=======================================================
Repository: /org/svn.debian.or.jp/repos
  Revision: 1500
  Commiter: henrich
      Date: 2013-09-28 17:05:18 +0900 (土, 28  9月 2013)
=======================================================
Log:

try to put appropriate title


=======================================================
Changed:

U   www/trunk/blosxom/data/flavours/head.html
A   www/trunk/blosxom/plugins/permalink

Modified: www/trunk/blosxom/data/flavours/head.html
===================================================================
--- www/trunk/blosxom/data/flavours/head.html	2013-09-28 07:44:58 UTC (rev 1499)
+++ www/trunk/blosxom/data/flavours/head.html	2013-09-28 08:05:18 UTC (rev 1500)
@@ -13,7 +13,7 @@
  <link rel="alternate" type="application/rss+xml" title="RSS" href="/blog/index.cgi/index.rss">
 
  <link rev="made" href="webadmin+at+debian.or.jp">
- <title>Debian JP Project - 最近の話題</title>
+ <title>$permalink::title$permalink::title_sep$blog_title</title>
 </head>
 <body>
 <div class="header">

Added: www/trunk/blosxom/plugins/permalink
===================================================================
--- www/trunk/blosxom/plugins/permalink	                        (rev 0)
+++ www/trunk/blosxom/plugins/permalink	2013-09-28 08:05:18 UTC (rev 1500)
@@ -0,0 +1,49 @@
+# Blosxom Plugin: permalink
+# Author(s): Kyo Nagashima <kyo@xxxxxxxxxx>
+# Version: 2012-04-05T15:28:39+09:00
+# Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/
+# see http://hail2u.net/blog/blosxom/efficient-plugin.html
+
+package permalink;
+
+use strict;
+use vars qw($title $title_sep);
+
+# --- Configurable variables -----------
+
+# separator string between $blog_title and $title
+my $str_title_sep = " - ";
+
+# --- Plug-in package variables --------
+
+my $title_placeholder = '{{{permalink::title}}}';
+my $t;
+
+# --------------------------------------
+
+sub start {
+  if ($blosxom::path_info !~ /\.\Q$blosxom::flavour\E$/) {
+    return 0;
+  }
+
+  $title     = $title_placeholder;
+  $title_sep = $str_title_sep;
+
+  return 1;
+}
+
+sub story {
+  my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_;
+
+  $t = $$title_ref;
+
+  return 1;
+}
+
+sub last {
+  $blosxom::output =~ s/$title_placeholder/$t/m;
+}
+
+1;
+# vim:ft=perl:
+