Detecting pages created in routes.yaml with "is" or "has"?

I have a beginner question. I need to conditionally render some sidebar widgets, but some of the pages on which I need to render those widgets are neither “pages” nor “posts” in the sense that they were not created in the pages or posts area of the editor. Instead some of these pages were created in routes.yaml. Is there a way to use {{#is}} or {{#has}} to identify these pages created in routes.yaml to conditionally render my widgets?