mirror of
https://github.com/evennia/evennia.git
synced 2026-04-04 23:17:17 +02:00
More feed updates
This commit is contained in:
parent
fa0c583e51
commit
88042665b7
3 changed files with 15 additions and 7 deletions
|
|
@ -54,6 +54,7 @@ START_PAGE = "index.html"
|
|||
BLOG_TEMPLATE = "blog.html"
|
||||
POST_TEMPLATE = "post.html"
|
||||
|
||||
RSS_FEED_FILE = "feed.rss"
|
||||
RSS_FEED = "feed"
|
||||
|
||||
CURRENT_YEAR = datetime.utcnow().year
|
||||
|
|
@ -286,6 +287,10 @@ def build_pages(blog_pages):
|
|||
remove(pathjoin(OUTDIR, IMG_DIR_NAME))
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
try:
|
||||
remove(pathjoin(OUTDIR, RSS_FEED))
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
html_pages, rss_feed = md2html()
|
||||
|
||||
|
|
@ -303,13 +308,15 @@ def build_pages(blog_pages):
|
|||
fil.write(html_page)
|
||||
|
||||
# build rss file
|
||||
with open(pathjoin(OUTDIR, RSS_FEED), 'w') as fil:
|
||||
with open(pathjoin(OUTDIR, RSS_FEED_FILE), 'w') as fil:
|
||||
fil.write(rss_feed)
|
||||
|
||||
# link static resources and the start page
|
||||
chdir(OUTDIR)
|
||||
symlink
|
||||
symlink(IMG_REL_LINK, IMG_DIR_NAME)
|
||||
symlink(latest_page, START_PAGE)
|
||||
symlink(RSS_FEED_FILE, RSS_FEED)
|
||||
|
||||
print(f"Output HTML + RSS written to {OUTDIR}{sep}. Latest year is {latest_year}.")
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
1
devblog/feed
Symbolic link
1
devblog/feed
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
feed.rss
|
||||
6
devblog/feed.rss
Normal file
6
devblog/feed.rss
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue