github / github/pages-gem

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

Abierto
#613 2 comentarios 4 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Ruby
Estrellas
1.9k
Forks
360
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### 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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Reproduce el problema con el repositorio indicado ejecutando `bundle install` y `jekyll build`; después, inspecciona `_config.yml` y el `_site/assets/style.css` generado. Traza cómo pages-gem gestiona la ausencia de un tema frente a `theme: null`; se considera terminado cuando no se genera ninguna hoja de estilos de tema externa si no se declara ningún tema, con cobertura para ambos casos.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
jekyll, ruby
Área
build-system
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.