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

Markdown parser and settings appear to be outdated locally

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

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu bằng việc tái tạo index.md và so sánh đầu ra cục bộ với đầu ra GitHub Pages dự kiến. Xem xét cách gem cấu hình trình phân tích Markdown và các thiết lập của Jekyll, sử dụng workaround CommonMarkGhPages làm mục tiêu. Hoàn tất nghĩa là việc kết xuất cục bộ khớp với HTML được hiển thị, bao gồm Markdown bên trong HTML và dấu ba chấm thông minh.

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

Mô tả

Before submitting an issue, please be sure to
This issue affects
  • The site generated by GitHub Pages
  • 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.

What did you do (e.g., steps to reproduce)

index.md

<section>

# Heading

More...

</section>
What did you expect to happen?

Jekyll should use the same markdown parser and settings locally as GitHub Pages.

<section>
  <h1 id="heading">Heading</h1>
  <p>More…</p>
</section>
What happened instead?

Jekyll seems to incorrectly use its own default Kramdown parser instead of GFM CommonMark, and as a result cannot handle Markdown in HTML or smart ellipses.

<section>

# Heading

More...

</section>
Additional information

As a workaround, I guessed at what GitHub's Jekyll config was and ended up using this, which works the same with this example both locally and on GitHub Pages:

markdown: CommonMarkGhPages
commonmark:
  options: ["SMART"]

However, I think the gem should replicate this functionality automatically to keep local testing consistent with GitHub. I'm also not sure if I'm missing other options that may differ in both environments.

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.