pages-gem
pages-gem copied to clipboard
External styles are being added when no theme is declared in _config.yml
Before submitting an issue, please be sure to
- [x] Read the contributing instructions
- [x] Update to the latest Gem version (run
bundle update github-pages
)
This issue affects
- [x] The site generated by GitHub Pages
- [x] Building sites locally
The GitHub Pages Gem is intended to help users replicate the GitHub Pages build environment locally. If your issue affects both the hosted version and the version previewed locally, you may be better suited reporting seeking support in other forums.
What did you do (e.g., steps to reproduce)
- Clone my repo:
git clone [email protected]:bryanbraun/bryanbraun.github.io.git
- Install dependencies:
bundle install
- Delete every file ending in
.scss
(for good measure) - Run
jekyll build
. - See the generated file in
_site/assets/style.css
What did you expect to happen?
No CSS files should be generated.
What happened instead?
A CSS file is generated containing normalize.css
and other styles from jekyll-theme-primer
. It looks like my site is falling back to using jekyll-theme-primer
as its theme, even though I have no themes defined in _config.yml
(and I don't want to use any external theme).
Possible workaround: If I set theme: null
it seems like the stylesheet doesn't get added. I'm not sure if this is good to rely on, since it isn't documented anywhere.
Additional information
This issue was previously reported in jekyll/jekyll but it appears to be an issue with pages-gem
.
- Link to the live site (if applicable): https://www.bryanbraun.com
- Link to the generated CSS file: https://www.bryanbraun.com/assets/css/style.css
- Link to the source repo (if applicable): https://github.com/bryanbraun/bryanbraun.github.io
Just ran into this rogue CSS file as well.
Seems like it's OK to disable the them using null
since it's explicitly mentioned in the code, see https://github.com/github/pages-gem/blob/e0063bacf2e0fb4739ec80f6846796c1dc10f35c/lib/github-pages/configuration.rb#L104
https://github.com/vito/atom-autocomplete-gocode.git