Publish snippets and Markdown posts through authenticated uploads

This commit is contained in:
2026-09-19 15:34:17 +03:30
parent 17f1a8ef39
commit e42646e09e
14 changed files with 553 additions and 15 deletions
+4
View File
@@ -7,4 +7,8 @@ import re
photos = sorted(set(re.findall(r'id="photo-([a-f0-9]{64})"', Path('_site/art/index.html').read_text())))
Path('_site/photo-publication.json').write_text(json.dumps({
'commit': os.environ['GITHUB_SHA'], 'photos': photos,
'snippets': sorted(set(re.findall(r'id="snippet-([a-f0-9]{64})"',
Path('_site/snippets/index.html').read_text()))),
'posts': sorted(set(revision for page in Path('_site').rglob('*.html')
for revision in re.findall(r'<meta name="upload-revision" content="([a-f0-9]{64})">', page.read_text()))),
}) + '\n')