Skip to content

Commit

Permalink
Sitemap generator added.
Browse files Browse the repository at this point in the history
  • Loading branch information
ckunte committed Mar 25, 2015
1 parent 09af4f0 commit 8411273
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chisel.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ def write_feed(url, data):
with open(path, "w") as file:
file.write(data.encode('UTF-8'))

def write_sitemap(url, data):
path = DESTINATION + url
with gzip.open(path, "wb") as file:
file.write(data.encode('UTF-8'))

@step
def gen_home(f, e):
write_file('index' + URLEXT, e.get_template('home.html').render(entries=f[:HOME_SHOW]))
Expand Down

0 comments on commit 8411273

Please sign in to comment.