Add language and charset to header

This commit is contained in:
Stefan Ritter 2011-03-22 23:06:21 +01:00
parent 0d024d57e4
commit bf758a26ac
1 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,7 @@ def document_header(string):
if string == "html":
print "Content-type: text/html\n"
print "<!DOCTYPE html>"
print "<html>"
print "<html lang=\"" + language + "\">"
if string == "atom":
print "Content-type: application/atom+xml\n"
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
@ -336,6 +336,7 @@ else:
document_header("html")
print tab + "<head>"
print tab*2 + "<title>%s</title>" % blog_title
print tab*2 + "<meta charset=\"utf-8\">"
print tab*2 + "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />"
print tab*2 + "<meta name=\"keywords\" content=\"%s\" />" % keywords
print tab*2 + "<meta name=\"description\" content=\"%s\" />" % blog_title