add meta data (language, description, keywords)
[sheet.git] / source.plp
index f713a73c3cbe0631d9ccb614f479aa0bf040b057..a813db4a3cd03cc4c4899e4dd59abbb0d78abc8d 100644 (file)
@@ -1,22 +1,28 @@
 <(common.inc.plp)><:
        our $VERSION = 'v1.0';
 
+       my $source = $ENV{PATH_INFO};
+       $source =~ s{^/}{};
+
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
-<html>
+<html lang="en">
 
 <head>
 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title>sheet page source code</title>
+<title><:= $source :> source code</title>
+<meta name="description" content="<:=
+       $source ? "Source code of local $source file"
+                 . ", with syntax highlighted and references linked."
+               : 'Index of source files for this site.'
+:>">
+<meta name="keywords" content="sheet, cheat, source, code, perl, plp, html, agpl">
 <:= stylesheet(qw'light dark mono red') :>
 </head>
 
 <body id="source">
 <:
 
-my $source = $ENV{PATH_INFO};
-$source =~ s{^/}{};
-
 if (not $source) {
        print "<h1>Source files</h1>";