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

Aperta
#8,012 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
markdown
Ambito
frontend

Direzione di ricerca

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.

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

Descrizione

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.

Lingua principale
Rust
Stelle
2.5k
Fork
663
Merge medio
2g 11h
PR unite (30g)
122

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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

Tutte le issue di modrinth/code

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.