summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-09-03 18:12:04 +0200
committerAndreas Gohr <andi@splitbrain.org>2006-09-03 18:12:04 +0200
commit831800b842f178994252970480a806884d2a1d76 (patch)
tree3a2e400963d320c6e7d175de4894ae6454ef2ef6
parent00d24b98b9d39ed278b5ff1d9c7031168748d734 (diff)
downloadrpg-831800b842f178994252970480a806884d2a1d76.tar.gz
rpg-831800b842f178994252970480a806884d2a1d76.tar.bz2
keyword meta header
The <meta name darcs-hash:20060903161204-7ad00-61c823d3806e6fdc2ffa3d4978a90dc9953ef9ce.gz
-rw-r--r--inc/template.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/inc/template.php b/inc/template.php
index d30500e94..81913a8e7 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -187,7 +187,6 @@ function tpl_metaheaders($alt=true){
// setup robot tags apropriate for different modes
if( ($ACT=='show' || $ACT=='export_xhtml') && !$REV){
if($INFO['exists']){
- ptln('<meta name="date" content="'.date('Y-m-d\TH:i:sO',$INFO['lastmod']).'" />',$it);
//delay indexing:
if((time() - $INFO['lastmod']) >= $conf['indexdelay']){
ptln('<meta name="robots" content="index,follow" />',$it);
@@ -203,6 +202,23 @@ function tpl_metaheaders($alt=true){
ptln('<meta name="robots" content="noindex,nofollow" />',$it);
}
+ // set metadata
+ if($ACT == 'show' || $ACT=='export_xhtml'){
+ // date of modification
+ if($REV){
+ ptln('<meta name="date" content="'.date('Y-m-d\TH:i:sO',$REV).'" />',$it);
+ }else{
+ ptln('<meta name="date" content="'.date('Y-m-d\TH:i:sO',$INFO['lastmod']).'" />',$it);
+ }
+
+ // keywords (explicit or implicit)
+ if($INFO['meta']['subject']){
+ ptln('<meta name="keywords" content="'.hsc(join(',',$INFO['meta']['subject'])).' />',$it);
+ }else{
+ ptln('<meta name="keywords" content="'.str_replace(':',',',$ID).'" />',$it);
+ }
+ }
+
// load stylesheets
ptln('<link rel="stylesheet" media="screen" type="text/css" href="'.DOKU_BASE.'lib/exe/css.php" />',$it);
ptln('<link rel="stylesheet" media="print" type="text/css" href="'.DOKU_BASE.'lib/exe/css.php?print=1" />',$it);