"limit" parameter in routes.yaml

Hi!
I need to set different post limits per page for the homepage and for the tag pages. One of the chat bots suggested using the limit parameter inside routes.yaml. It worked! But I’m confused because this parameter isn’t mentioned in the official documentation: https://docs.ghost.org/themes/routing.

Is it planned to be deprecated? Or can I safely use it without worrying that it might be removed in the future?

I was not aware of that as well. But it’s a nice feature if it works. Maybe you can ask your chatbot a source link for that information :blush:

Interesting. I’ve also used limit, although I’ve never tried setting up tags under collections.

Here’s another undocumented trick:

routes:

  /rss/:

    template: rss

    content_type: text/xml

    limit: 100

  /tag/:slug/rss/:

    template: rss_for_tags

    content_type: text/xml

    limit: 100

:backhand_index_pointing_up: Useful for when you need to use a custom template for your tags rss feeds. :slight_smile:

Like you, I don’t know whether support here is intended or accidental.

2 Likes

I asked several times, but unfortunately it refuses to provide any links.