github / github/pages-gem

Gem overrides stylesheet after regenerating site

Open
#657 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
Ruby
Stars
1.9k
Forks
360
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.