summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generatesite.py4
-rw-r--r--template.txt8
2 files changed, 8 insertions, 4 deletions
diff --git a/generatesite.py b/generatesite.py
index 7f6af81..e2972cf 100644
--- a/generatesite.py
+++ b/generatesite.py
@@ -30,7 +30,7 @@ def generateindex():
print("generating {}/index.html from {}".format(outdir, indexsrc));
copyfile(template, outdir + "/index.html");
with open(indexsrc, "r") as contentfile:
- content = contentfile.read().replace('\n', '');
+ content = contentfile.read();
replace(outdir + "/index.html", "{TITLE}", cfg.get("index", "title"));
replace(outdir + "/index.html", "{INFO}", cfg.get("index", "header"));
replace(outdir + "/index.html", "{CONTENT}", content);
@@ -54,7 +54,7 @@ def generateportfolio():
print("generating {}/portfolio.html from {}".format(outdir, portfoliosrc));
copyfile(template, outdir + "/portfolio.html");
with open(portfoliosrc, "r") as contentfile:
- content = contentfile.read().replace('\n', '');
+ content = contentfile.read();
replace(outdir + "/portfolio.html", "{TITLE}", cfg.get("portfolio", "title"));
replace(outdir + "/portfolio.html", "{INFO}", cfg.get("portfolio", "header"));
replace(outdir + "/portfolio.html", "{CONTENT}", content);
diff --git a/template.txt b/template.txt
index 5184c14..2e8b62a 100644
--- a/template.txt
+++ b/template.txt
@@ -1,7 +1,11 @@
-<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
-<meta content="utf-8" http-equiv="encoding">
<html>
<head>
+<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
+<meta content="utf-8" http-equiv="encoding">
+<meta name="keywords" content="Programming, C++, C, Blog">
+<meta name="description" content="Personal blog/portfolio/site for Daniel Jones">
+<meta name="author" content="Daniel Jones">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{TITLE}</title>
</head>