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

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

Open
bryanbraun opened this issue Jan 15, 2019 · 2 comments
Open

Comments

@bryanbraun
Copy link

@bryanbraun bryanbraun commented Jan 15, 2019

Before submitting an issue, please be sure to

This issue affects

  • The site generated by GitHub Pages
  • 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 git@github.com: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.

@simonvanderveldt
Copy link

@simonvanderveldt simonvanderveldt commented Apr 1, 2019

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

# Allow theme to be explicitly disabled via "theme: null"

colatkinson added a commit to colatkinson/colatkinson.github.io that referenced this issue May 13, 2019
See github/pages-gem#613 for more info.
colatkinson added a commit to colatkinson/colatkinson.github.io that referenced this issue May 14, 2019
See github/pages-gem#613 for more info.
aimuke added a commit to aimuke/aimuke.github.io that referenced this issue Jun 13, 2019
该项目使用的是 gem github-pages . 其在有文件修改后自动刷新时会错误的拉取一个文件 到 _site/asset/css/style.css 如果原本的文件叫这个名字,则会被错误的文件所覆盖,出现样式错误问题
github/pages-gem#613
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.