When does {{#is "index"}} return true other than the home page?

#1

I changed routes.yaml to match the example for a custom page in the dynamic routing docs.

The home page (now at /blog/) of the theme I’m using tests whether the page is an index ({{#is "index"}}). Currently it returns false. I’ve worked around it but for future reference I would like to understand when that test is true. In this scenario it seems like it should be true but I am probably misinterpreting what an “index” page is.

Here is my routes.yaml. The page in question is index.

routes:
/: home

collections:
/blog/:
permalink: /blog/{slug}/
template: index

taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/

Thanks!

#2

Hey @cmckulka :wave:

Here’s a link to the docs that explains the index context:

#3

Doh - missed that whole section. Thank you very much!!

1 Like
closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.