Prev / Next

2007-12-05 / ちょっとだけ LDRize に対応 4

ちょっとだけですまなくなってしまいましたが,続き.

今日の課題は
はてぶで otsune さんに

hAtomはISO8601形式の"updated"とhCardな"author"がrequired(必須)だから、ちょっと足りない
とコメントされた件.

まずは ISO8601 形式の時間を扱うために chalow に手を入れる.

feed で使うために JST な ISO8601 形式の時間が $dcdate という変数に
保存されているので,これを html の生成時に渡してやれば,
template で ISO8601 形式の時間を使える.

--- /usr/bin/chalow~	2006-10-10 05:36:46.000000000 +0900
+++ /usr/bin/chalow	2007-12-05 22:46:09.000000000 +0900
@@ -691,6 +691,7 @@
             $t->param(cl_name => $changelog_name);
             $t->param(css_file => $css_file);
             $t->param(lastupdate => $what_time_is_it_now);
+            $t->param(dcdate => $dcdate);
             $t->param(signature => $signature);

             $t->param(cat_name => $catname);
@@ -777,6 +778,7 @@
 	    $t->param(cl_name => $changelog_name);
 	    $t->param(css_file => $css_file);
 	    $t->param(lastupdate => $what_time_is_it_now);
+            $t->param(dcdate => $dcdate);
 	    $t->param(signature => $signature);

 	    $t->param(ymd => $ymd);
@@ -834,6 +836,7 @@
 	$t->param(cl_name => $changelog_name);
 	$t->param(css_file => $css_file);
 	$t->param(lastupdate => $what_time_is_it_now);
+	$t->param(dcdate => $dcdate);
 	$t->param(signature => $signature);

 	$t->param(ymd => $ymd);
@@ -887,6 +890,7 @@
 	$t->param(cl_name => $changelog_name);
 	$t->param(css_file => $css_file);
 	$t->param(lastupdate => $what_time_is_it_now);
+	$t->param(dcdate => $dcdate);
 	$t->param(signature => $signature);

 	$t->param(ym => $ym);
@@ -932,6 +936,7 @@
     $t->param(cl_name => $changelog_name);
     $t->param(css_file => $css_file);
     $t->param(lastupdate => $what_time_is_it_now);
+    $t->param(dcdate => $dcdate);
     $t->param(signature => $signature);

     $t->param(ymd => $ymd);	# 最新エントリの日付




template の編集

各ページのテンプレートの更新時間部分

<p>最終更新時間: <TMPL_VAR name=lastupdate></p>



<p>最終更新時間: <abbr class="updated" title="<TMPL_VAR name=dcdate>">
<TMPL_VAR name=lastupdate></abbr>
By <span class="vcard author"><span class="fn">ftnk</span></p>


のように変更.

以上で,大丈夫だと思うんだけど,一度,時間をとって
- hatom - Microformats
  http://microformats.org/wiki/hatom#Entry_Updated
を読んだほうがいい.

- ちょっとだけ LDRize に対応 [2007-11-28-2]
- ちょっとだけ LDRize に対応 2 [2007-12-03-2]
- ちょっとだけ LDRize に対応 3 [2007-12-04-2]

Referrer (Inside):
[2007-12-09-1] chalow を hAtom に対応させる
[2007-12-06-1] ちょっとだけ LDRize に対応 5
[2007-12-04-2] ちょっとだけ LDRize に対応 3
comments powered by Disqus