github / github/pages-gem

Gem overrides stylesheet after regenerating site

Offen
#657 6 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Ruby
Sterne
1.9k
Forks
360
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## Summary

When `github-pages` is listed under the `group :jekyll_plugins` in the Gemfile, then **on regeneration**, a site has *its **`assets/css/style.css`*** overridden by one bundled with one of the themes in the gem.

This issue came to my notice while investigating `jekyll/jekyll#7854`.

## This issue affects

- [ ] The site generated by GitHub Pages ***`maybe.. maybe not..`***
- [x] Building sites locally

## Steps to reproduce
- Set up a Jekyll site with at least the following:
- Gemfile
```ruby
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
```
- **`assets/css/style.css`** with the following:
```css
h1 { color: red }
```
- An `index.html` that uses the above stylesheet. (either via a layout or directly)
```html




Test Site



Hello World




```
- Serve the site locally and preview at `http://localhost:4000/`
```
bundle exec jekyll serve
```
- Trigger a regeneration by **just adding content to the landing page**.
```diff

Hello World


+

Lorem ipsum dolor sit amet


```
---

## What did you expect to happen?

Expected the landing page to be rendered with the new content.

## What happened instead?
The following would illustrate better:

### Before regeneration:

![before-regen](https://user-images.githubusercontent.com/12479464/66631078-20cfa380-ec23-11e9-9260-df33d2990496.png)

### After regeneration:

![after-regen](https://user-images.githubusercontent.com/12479464/66630997-e8c86080-ec22-11e9-8dd9-6a89f6723405.png)

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit dem Gemfile-Eintrag für github-pages und der Reproduktion von assets/css/style.css; führe dann bundle exec jekyll serve aus und löse eine Neugenerierung aus, indem du index.html bearbeitest. Erledigt ist es, wenn der neue Inhalt der Landingpage erscheint, während das Stylesheet der Website weiterhin verwendet wird, anstatt von einem gebündelten Theme-Stylesheet überschrieben zu werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
ruby
Bereich
build-system
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.