Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty page.layout and jekyll-sitemap #107

Open
Tralapo opened this issue May 24, 2021 · 2 comments
Open

Empty page.layout and jekyll-sitemap #107

Tralapo opened this issue May 24, 2021 · 2 comments
Labels

Comments

@Tralapo
Copy link

Tralapo commented May 24, 2021

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?

@avillafiorita
Copy link
Owner

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.

@Tralapo
Copy link
Author

Tralapo commented Mar 2, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants