[Website] Parse markdown headings with id for use with anchors

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

Maintainer thường phản hồi trong vòng 1 ngày

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
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
markdown
Lĩnh vực
frontend

Hướng nghiên cứu

The request concerns Markdown project descriptions on Modrinth.com, but names no implementation files or tests. Start by locating where project descriptions are parsed and rendered, then check how heading anchors and user supplied HTML IDs are handled. Done means Markdown headings produce usable anchors, links to them scroll to the heading, and existing IDs remain safe.

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

Mô tả

Please confirm the following.
What parts of Modrinth is your feature request related too?

Modrinth.com website

Is your suggested feature related to a problem? Please describe.

I would like to use anchors in my markdown project description.

## Features

[Go to features](#features)

This is how it works on GitHub

Describe the solution you'd like

No response

Describe alternatives you've considered

Today this is already possible by doing something like

<h2 id="features">Features</h2>

[Go to features](#features)
Additional context

GitHub's system works by turning

# Heading

into

<element id="user-content-heading"></element>

and scrolling there with javascript from a https://url#heading in the url


If I see correctly you could also try to break the modrinth site by taking over existing id's like __NUXT_DATA__
But maybe that is a non-issue because we expect users to take care when they use html id.

Ngôn ngữ chính
Rust
Star
2.5k
Fork
663
Merge trung bình
2 ngày 11 giờ
Pull request đã merge (30 ngày)
122

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 modrinth/code

Tất cả issue của modrinth/code

Issue tương tự

Thêm issue về Rust

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.