avillafiorita/jekyll-datapage_gen

Empty page.layout and jekyll-sitemap

Tralapo opened this issue · 2 comments

First of all: thanks for the great plugin! I was building complicated workflows combining collections and a data file, but this is way easier and quicker. I did run into two problems though, I hope it's ok to combine them in one issue.

page.layout
I was including extra css in the head of some pages, based on layout:

 {%- if page.layout == "a" -%}
  <link rel="stylesheet" href="extra.css">
  {%- endif -%}

This works great when outputting collections, but when I use this plugin to generate pages with template: 'a', page.layout is empty. I tried page.template as well, but that doesn't work either.

Is there a way to catch the layout used for generating the page?

jekyll-sitemap
I'm using jekyll's jekull-sitemap plugin to auto generate a sitemap with all pages. This worked fine while using collections, but pages generated by this plugin are not included.

Is this a know issue and/or is there a way to fix this?

so sorry for taking so long to start looking at your issue... been extremely busy with a new job.

I am not even sure to hope the issue is still relevant or not ... :-) but in any case, I'll look into the matter. I probably need to add metadata and "talk" with the jekyll-sitemap plugin.

thanks for the report and sorry again for the time it took me to acknowledge the bug.

No problem about the late reaction.

I managed to work around it. I added an extra manual tag to the pages I wanted to add the extra CSS from the example.
I actually don't really remember how I fixed the sitemap one, but I managed to work around it.