pages-gem icon indicating copy to clipboard operation
pages-gem copied to clipboard

External styles are being added when no theme is declared in _config.yml

Open bryanbraun opened this issue 5 years ago • 2 comments

Before submitting an issue, please be sure to

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)

  1. Clone my repo: git clone [email protected]:bryanbraun/bryanbraun.github.io.git
  2. Install dependencies: bundle install
  3. Delete every file ending in .scss (for good measure)
  4. Run jekyll build.
  5. 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

bryanbraun avatar Jan 15 '19 15:01 bryanbraun

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

simonvanderveldt avatar Apr 01 '19 19:04 simonvanderveldt

https://github.com/vito/atom-autocomplete-gocode.git

liligot avatar Dec 24 '19 11:12 liligot