Load additional header lines from header.txt in style directory

This commit is contained in:
Stefan Ritter 2012-01-19 04:59:13 +01:00
parent 2c9970c3d0
commit 5a20e73a5f

View File

@ -388,7 +388,7 @@ else:
document_header("html") document_header("html")
print(ind + "<head>") print(ind + "<head>")
print(ind*2 + "<title>%s</title>" % blog_title) print(ind*2 + "<title>%s</title>" % blog_title)
print(ind*2 + "<meta charset=\"utf-8\">") print(ind*2 + "<meta charset=\"utf-8\" />")
print(ind*2 + "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />") print(ind*2 + "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />")
print(ind*2 + "<meta name=\"keywords\" content=\"%s\" />" % keywords) print(ind*2 + "<meta name=\"keywords\" content=\"%s\" />" % keywords)
print(ind*2 + "<meta name=\"description\" content=\"%s\" />" % blog_title) print(ind*2 + "<meta name=\"description\" content=\"%s\" />" % blog_title)
@ -408,6 +408,13 @@ else:
if icon_type: if icon_type:
print(ind*2 + "<link rel=\"icon\" href=\"styles/%s/favicon.%s\" type=\"%s\" />" % (style, icon_suffix, icon_type)) print(ind*2 + "<link rel=\"icon\" href=\"styles/%s/favicon.%s\" type=\"%s\" />" % (style, icon_suffix, icon_type))
# Load additional header lines from style
if os.path.exists("styles/" + style + "/header.txt"):
content = open("styles/" + style + "/header.txt", "r")
for line in content:
print(ind*2 + line.strip())
content.close()
print(ind + "</head>") print(ind + "</head>")
print(ind + "<body>") print(ind + "<body>")
print("") print("")