Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Gem overrides stylesheet after regenerating site

Aperta
#657 6 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Inizia dalla voce di Gemfile per github-pages e dalla riproduzione di assets/css/style.css, quindi esegui bundle exec jekyll serve e attiva la rigenerazione modificando index.html. Il lavoro è completato quando appare il nuovo contenuto della landing page, mentre il foglio di stile del sito continua a essere utilizzato invece di essere sovrascritto da un foglio di stile del tema incluso nel bundle.

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

Descrizione

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..
  • Building sites locally

Steps to reproduce

  • Set up a Jekyll site with at least the following:
    • Gemfile
      source 'https://rubygems.org'
      gem 'github-pages', group: :jekyll_plugins
      
    • assets/css/style.css with the following:
      h1 { color: red }
      
    • An index.html that uses the above stylesheet. (either via a layout or directly)
      <!DOCTYPE html>
      <html>
        <head>
          <meta charset="UTF-8"/>
          <title>Test Site</title>
          <link rel="stylesheet" href="/assets/css/style.css" />
        </head>
        <body>
          <h1>Hello World</h1>
        </body>
      </html>
      
  • 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.
      <h1>Hello World</h1>
    + <p>Lorem ipsum dolor sit amet</p>
    

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

After regeneration:

after-regen

Lingua principale
Ruby
Stelle
1.9k
Fork
361
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/pages-gem

Tutte le issue di github/pages-gem

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.