Skip to content

Commit

Permalink
sitemap fix
Browse files Browse the repository at this point in the history
  • Loading branch information
linesinalandscape committed Dec 5, 2024
1 parent ad8bcf5 commit 5ddebea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ssg.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
+ str(md_file.relative_to(BUILD_DIR).parent) + '/')
permalink = permalink.replace('\\', '/')
permalink = permalink.replace('./', '') # for root index page
page_meta['permalink'] = permalink
page_meta['permalink'] = [permalink]

# set date for the page in priority order:
# date updated in metadata, date in metadata, file modified date
Expand All @@ -83,7 +83,9 @@
# elif page_meta.get('date'):
# date_final = page_meta.get('date')[0]
# page_meta['date_final'] = date_final

date_final = dt.datetime.now().strftime('%Y-%m-%d') # TODO FIX
page_meta['date_final'] = [date_final]

# insert the site metadata into the template
for key in SITE_META:
output = output.replace('{{ ' + key + ' }}', SITE_META.get(key))
Expand Down

0 comments on commit 5ddebea

Please sign in to comment.