jekyll finds asset file from this plugin in site.pages
aoberoi opened this issue · comments
in my own jekyll site, i use the following code to help build a navigation:
{% assign sorted_pages = site.pages | sort:"order" %}
when i iterate over this collection, i surprisingly find an object in sorted_pages
that looks like this:
{
"content":"@import \"jekyll-theme-primer\";\n",
"dir":"/assets/css/",
"name":"style.scss",
"path":"assets/css/style.scss",
"url":"/assets/css/style.css"
}
it seems that the frontmatter in assets/css/style.scss
in this plugin causes jekyll to interpret that file as a page in my site, which is polluting my navigation. this should not be happening. is there any reason for the empty frontmatter in that file?
this is quite the annoyance because this plugin comes with the default github-pages
gem. the workaround is i could use a filter on the collection to exclude this page, but that's less clean.
{% assign sorted_pages = site.pages | where_exp:"page", "page.name != 'style.scss'" | sort:"order" %}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Really annoying issue. Anyone landing here in the future: this can be fixed by adding theme: null
to _config.yaml
.