diff options
author | daniel-Jones <daniel@danieljon.es> | 2017-09-10 16:52:34 +0930 |
---|---|---|
committer | daniel-Jones <daniel@danieljon.es> | 2017-09-10 16:52:34 +0930 |
commit | 32f211876da794180fd2c5994306a846fdc294ce (patch) | |
tree | ccacceaa962b8432a4cd2bdd1ea32f6da984e62a | |
parent | c7352082ebbd1416d3899609617e4fe3f2b7284e (diff) | |
download | website-32f211876da794180fd2c5994306a846fdc294ce.tar.gz website-32f211876da794180fd2c5994306a846fdc294ce.zip |
added meta data to the template, remove new line strips when reading source files
-rw-r--r-- | generatesite.py | 4 | ||||
-rw-r--r-- | template.txt | 8 |
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> |