github / github/pages-gem

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

Aperta
#613 2 commenti 4 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Ruby
Stelle
1.9k
Fork
360
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Before submitting an issue, please be sure to

- [x] Read [the contributing instructions](https://github.com/github/pages-gem/blob/master/docs/CONTRIBUTING.md#contributing-to-the-github-pages-gem)
- [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](https://github.com/github/pages-gem/blob/master/docs/SUPPORT.md).*

### 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](https://github.com/jekyll/jekyll/issues/7478) 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Reproduce the issue with the reported repository by running `bundle install` and `jekyll build`, then inspect `_config.yml` and the generated `_site/assets/style.css`. Trace how pages-gem handles an absent theme versus `theme: null`; done means no external theme stylesheet is generated when no theme is declared, with coverage for both cases.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
jekyll, ruby
Ambito
build-system
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.