Skip to content

Commit

Permalink
Merge pull request #229 from blattms/prettify-urls-in-post-context
Browse files Browse the repository at this point in the history
Use prettified URL for blog posts.
  • Loading branch information
ibarria0 committed Jun 26, 2016
2 parents 1a510e9 + ba0beff commit c5664e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cactus/skeleton/plugins/blog.disabled.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def find(name):
postContext['title'] = find('title')
postContext['author'] = find('author')
postContext['date'] = find('date')
postContext['path'] = page.path
postContext['path'] = page.final_url
postContext['body'] = getNode(get_template(page.path), name="body")

# Parse the date into a date object
Expand Down Expand Up @@ -81,7 +81,7 @@ def preBuildPage(site, page, context, data):
context['posts'] = POSTS

for post in POSTS:
if post['path'] == page.path:
if post['path'] == page.final_url:
context.update(post)

return context, data
2 changes: 1 addition & 1 deletion cactus/tests/data/skeleton/plugins/blog.disabled.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def find(name):
postContext['title'] = find('title')
postContext['author'] = find('author')
postContext['date'] = find('date')
postContext['path'] = page.path
postContext['path'] = page.final_url
postContext['body'] = getNode(get_template(page.path), name="body")

# Parse the date into a date object
Expand Down

0 comments on commit c5664e1

Please sign in to comment.