Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Gem overrides stylesheet after regenerating site

Đang mở
#657 6 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ruby
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu với mục nhập Gemfile cho github-pages và phần tái tạo assets/css/style.css, sau đó chạy bundle exec jekyll serve và kích hoạt việc tái tạo bằng cách chỉnh sửa index.html. Hoàn tất khi nội dung landing page mới xuất hiện trong khi stylesheet của site vẫn được sử dụng thay vì bị một stylesheet của theme được đóng gói ghi đè.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Ruby
Star
1.9k
Fork
361
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/pages-gem

Tất cả issue của github/pages-gem

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.