hackmdio / hackmdio/hackmd-io-issues

[Feature Request] Allow access to frontmatter variables within the body of a note

Offen
#238 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
feature
Vorherrschende Sprache
Keine Sprachdaten
Sterne
40
Forks
9
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Is your feature request related to a problem? Please describe.**
Whenever including tags or other metadata in a note, one must include them in two places:

1. the front matter
2. again in the body of the note

This completely goes against the DRY principle. If you're putting the same data in two places, something needs to be optimized.

**Describe the solution you'd like**
There should be some way to include variables from the frontmatter in the body of a note, e.g.:

```md
---
title: a simple note
tags: hackmd, github
---

{% title %}
===

###### tags: {% tags %}

hello world
```

Further, it would be awesome if this feature supported *custom* variables. I like to include the `created` variable in my notes for personal reference and compatibility with other platforms. Even though such a tag provides no extra functionality on hackmd, it would be splendid to be able to include the date a note was written in the body of the note without repeating myself.

This would further allow you to create better templates and better embeds. e.g.:

*header.md*
```md

###### tags: {% tags %}

{% created %}

{% title %}
===
```

*footer.md*
```md
{% authors %}
```

*meeting-notes-template.md*
```md
---
title: meeting notes
created: 2021-02-22
tags: meeting, notes
authors: jack, dianne
---

{%hackmd @team/header %}

{%hackmd @team/footer %}
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Überprüfe die Beispiele in header.md, footer.md und meeting-notes-template.md, um die angeforderten Frontmatter- und die Verwendung eingebetteter Notizen zu verstehen. Definiere, was „done“ für integrierte und benutzerdefinierte Variablen in Notizkörpern und Einbettungen bedeutet, einschließlich der gezeigten Fälle für title, tags, created und authors.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
markdown
Bereich
content
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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