From: xangelo Date: Mon, 21 Jul 2025 19:15:51 +0000 (-0400) Subject: add footer to note that this post was published on medium X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=607768ce47f7750d99f2736c5803fe8b12b3971c;p=xangelo.ca.git add footer to note that this post was published on medium --- diff --git a/.github/scripts/medium_to_hugo.py b/.github/scripts/medium_to_hugo.py index 785355b..6840df6 100644 --- a/.github/scripts/medium_to_hugo.py +++ b/.github/scripts/medium_to_hugo.py @@ -30,6 +30,9 @@ for entry in feed.entries: post["draft"] = False post["medium_link"] = entry.link + # add a line to the bottom of the post to indicate that it's from Medium + post["content"] += "\n\n---\n\nThis was originally published on Medium - " + entry.link + output_path = os.path.join(OUTPUT_DIR, f"{slug}.md") with open(output_path, "w", encoding="utf-8") as f: f.write(frontmatter.dumps(post))