Skip to content

post.url as a shortcut for {{ url_for("post", slug=post.slug) }} #29

Closed
@semente

Description

@semente

I have multiple directories containing posts and I want to be able to generate a RSS feed for the posts of all these directories, and not just individually. And I could achieve this using the following route:

(weblorg-route
 :name "feed"
 :input-pattern "*/*.org"
 :input-aggregate #'weblorg-input-aggregate-all-desc
 :template "feed.xml"
 :output ".build/feed.xml"
 :url "/feed.xml")

The problem is that I can't set a proper item.link or item.guid for the RSS entry because it can't guess what is the route of some post. url_for requires a route name and I can't do something like <link>{{ url_for(post.route.name, slug=post.slug) }}</link>.

So I propose a post.url attribute to make this possible. It will also help those who want to reuse a feed.xml template between different "posts directories".

(by the way, would be interesting to support post.route.name as well)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions