Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batteries-included RSS/Atom feed support #23

Open
thanethomson opened this Issue Jul 20, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@thanethomson
Copy link
Owner

thanethomson commented Jul 20, 2016

RSS/Atom feeds should be generated automatically from configuration options in the project's config.yml file.

e.g.

project-name: RSS demo project
base-path: /
feeds:
  posts:
    file: /feeds/posts.xml
    query: session.query(Post).order_by(Post.date.desc())
  projects:
    file: /feeds/projects.xml
    query: session.query(Project).order_by(Project.released.desc())
@konstruktiv

This comment has been minimized.

Copy link
Contributor

konstruktiv commented Jan 28, 2018

Wouldn't this only create a feed for all posts/projects/etc? How could we get feeds for more specific queries, such as all posts of a certain category or with a certain tag?

@thanethomson

This comment has been minimized.

Copy link
Owner Author

thanethomson commented Feb 10, 2018

That particular example would get all posts and projects, but to make it more specific, just tweak your SQLAlchemy/MLAlchemy query that generates the feed.

e.g.

feeds:
  programming-posts:
    file: /feeds/programming-posts.xml
    query: session.query(Post).filter(Post.tags.any(name='programming')).order_by(Post.date.desc())

See SQLAlchemy's documentation for details.

@thanethomson thanethomson added this to the v0.23.0 milestone Jan 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.