skip-front-matter together with jekyll-titles-from-headings

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

skip-front-matter together with jekyll-titles-from-headings

Hi all,

We're currently using jekyll-titles-from-headings in order to infer page's titles from = headings, rather than explicitly specify them in Jekyll front matter with title:. And we're also using :skip-front-matter: in order to include one file (e.g., baz.adoc) in another (e.g., foo.adoc) without seeing the former's front matter in the latter's HTML output. A working example is at (provided you move default.html to a _layouts directory. It's perhaps worth noting that baz.adoc has "published: false" in its front matter so that Asciidoctor includes it from foo.adoc while Jekyll doesn't output a partial baz.html file for it.

However, when we move foo.adoc and baz.adoc into a collection (e.g., _pages) and change _config.yml from to in order to support that collection, we're finding that jekyll-titles-from-headings no longer infers a page's title correctly; the page's title instead becomes the page's filename, with the first letter capitalized (i.e., Foo). If, though, we remove :skip-front-matter: from foo.adoc, then jekyll-titles-from-headings starts working again, and foo.adoc ends up with a title of Bar as expected.

Does this sound like an issue with :skip-front-matter: or perhaps with the jekyll-titles-from-headings plugin instead? Or is our _config.yml (with the collection) perhaps just misconfigured?

Thanks very much!