diff --git a/rophako/__init__.py b/rophako/__init__.py index ad3f627..b94f75d 100644 --- a/rophako/__init__.py +++ b/rophako/__init__.py @@ -64,7 +64,7 @@ def before_request(): "author": "Noah Petherbridge", "photo_url": config.PHOTO_ROOT_PUBLIC, }, - "uri": request.path.split("/")[1:], + "uri": request.path, "session": { "login": False, # Not logged in, until proven otherwise. "username": "guest", diff --git a/rophako/modules/blog.py b/rophako/modules/blog.py index accff22..d90d5e6 100644 --- a/rophako/modules/blog.py +++ b/rophako/modules/blog.py @@ -356,6 +356,7 @@ def partial_index(): selected = [] stop = offset + BLOG_ENTRIES_PER_PAGE if stop > len(posts): stop = len(posts) + index = 1 # Let each post know its position on-page. for i in range(offset, stop): post_id = posts[i] post = Blog.get_entry(post_id) @@ -375,6 +376,8 @@ def partial_index(): # Count the comments for this post post["comment_count"] = Comment.count_comments("blog-{}".format(post_id)) + post["position_index"] = index + index += 1 selected.append(post) g.info["count"] += 1