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

Offen
#8,012 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
markdown
Bereich
frontend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Rust
Sterne
2.5k
Forks
663
Ø Merge
2 T. 11 Std.
Gemergte PRs (30 T.)
122

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus modrinth/code

Alle Issues in modrinth/code

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.