Skip to content

Commit

Permalink
Merge pull request #204 from kjaymiller/jm-makes-feed-public
Browse files Browse the repository at this point in the history
  • Loading branch information
kjaymiller committed Jun 16, 2023
2 parents 1d81bdd + 8e8fc85 commit 92badf5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/render_engine/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __init__(
]
)
self.title = self._title

def iter_content_path(self):
"""Iterate through in the collection's content path."""

Expand Down
8 changes: 7 additions & 1 deletion src/render_engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
trim_blocks=True,
)


def to_pub_date(value: datetime):
"""
Parse information from the given class object.
Expand All @@ -52,6 +51,13 @@ def to_absolute(env: Environment, url:str) -> str:
engine.filters["to_absolute"] = to_absolute


@pass_environment
def feed_url(env: Environment, value: str) -> str:
"""Returns the URL for the collections feed"""
routes = env.globals.get("routes")
return routes[value].feed.url_for()
engine.filters["feed_url"] = feed_url

@pass_environment
def url_for(env: Environment, value: str, page: int=0) -> str:
"""Look for the route in the route_list and return the url for the page."""
Expand Down

0 comments on commit 92badf5

Please sign in to comment.