diff --git a/TODO b/TODO index 5aba81b..0c9a20b 100644 --- a/TODO +++ b/TODO @@ -3,7 +3,3 @@ Recherche ? Pages par années / mois What happen when a file is moved with git ? Flake8 the whole thing ! :) - -Known bugs : -=========== -@titre not remplaced diff --git a/pre-commit.py b/pre-commit.py index 11d58ad..56029fc 100755 --- a/pre-commit.py +++ b/pre-commit.py @@ -385,6 +385,8 @@ try: index += article_fh.read() with open("gen/footer.gen") as footer_gen_fh: index += footer_gen_fh.read() + + index = index.replace("@titre", params["BLOG_TITLE"], 1) index_fh.write(index) print("[INFO] (INDEX) Index page has been generated successfully.") except IOError: @@ -400,7 +402,7 @@ for tag in list_directory("gen/tags"): with open(tag, "r") as tag_gen_fh: with open("gen/header.gen", "r") as header_fh: tag_content = header_fh.read() - tag_content.replace("