Home
/
xangelo.ca.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a1967f
)
add footer to note that this post was published on medium
author
xangelo
<me@xangelo.ca>
Mon, 21 Jul 2025 19:15:51 +0000
(15:15 -0400)
committer
xangelo
<me@xangelo.ca>
Mon, 21 Jul 2025 19:15:51 +0000
(15:15 -0400)
.github/scripts/medium_to_hugo.py
patch
|
blob
|
history
diff --git
a/.github/scripts/medium_to_hugo.py
b/.github/scripts/medium_to_hugo.py
index 785355baaa3b84dca44eeeb990e80ee77db39c4a..6840df66a1f2cdc943ebaf1e75d11cbbe1ba29b1 100644
(file)
--- 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))