Skip to content

Commit d0d4f43

Browse files
committed
add content date
1 parent dbf1590 commit d0d4f43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contentify.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ def addfrontmatter(wfile, tfile):
1212
else:
1313
title = basename(wfile)[:-3]
1414

15-
date = '2025-03-08T11:49:11+09:00'
15+
date = datetime.utcfromtimestamp(getmtime(wfile)).astimezone().strftime('%Y-%m-%dT%H:%M:%S%z')
16+
date = date[:-2] + ':' + date[-2:]
1617

1718
tmpfile.write('---\n')
1819
tmpfile.write(f'title: {title}\n')

0 commit comments

Comments
 (0)