In case you want to use code
rather than em
phasis for file names:
As for yer deal, I’d come at it from a different angle. You are trying to fit your special page into the site, but instead figure out what kind of page it is, and then modify the correct template.
For instance, is features
a directory or a single page? _index.html
is for adding content to the various list views (sections, taxonomies, those kinds of things). It sounds like you want a single page that renders differently than the other single pages on your site.
If I were doing this, I’d probably put special one-off pages in their own section, and using front matter I’d set everything.
content/pages/features.md
:
title: "Features"
layout: "special"
slug: "features"
Then I’d create a template based on the single page lookup order, which given my example would be at /layouts/pages/special.html
.
That should do it for ya!
If this seems more difficult than it needs to be, it is because we have an open convention (lookup order) to allow for maximum flexibility. You can accomplish your goal differently, and it is just as valid. But really focus on understanding the lookup order and you’ll figure out what works for your site.