From 878bdba53979f11fa582088e47997df129e56d16 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 26 Apr 2020 14:49:32 +0200 Subject: Don't write tags header to posts if it is empty --- extras/autoship.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'extras') diff --git a/extras/autoship.py b/extras/autoship.py index e6e934b..715e1cf 100755 --- a/extras/autoship.py +++ b/extras/autoship.py @@ -422,8 +422,9 @@ def write_posts(entries, out_dir, meta={}): info = get_project_info() description = get_blurb("README.md") title = info["title"] - meta["Tags"] = ", ".join(info["post_tags"]) meta["Author"] = meta.get("Author", os.getenv("USER")) + if info["post_tags"]: + meta["Tags"] = ", ".join(info["post_tags"]) try: os.mkdir(out_dir) -- cgit v1.2.1