nushell / nushell/nushell.github.io

Determine how to handle Vuepress code snippets in docs

Offen
#1,487 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
TypeScript
Sterne
258
Forks
561
Ø Merge
3 Std. 20 Min.
Gemergte PRs (30 T.)
15

Beschreibung

I just noticed that the Book uses some Vuepress code snippets in places (but not everywhere). There are some advantages and disadvantages to these:

Advantages:

  • (Minor) Can be reused if needed
  • (Nice) Indention is much easier if the code-block is nested under a list item

Disadvantages:

  • (Major) All of the existing snippets are .sh files. These need to be updated to .nu files in order to obtain proper syntax highlighting, of course.
  • (Major) Renaming or moving a snippet requires updates to all language translations, otherwise we are left with broken links.
  • When a code snippet is updated, it is propagated across all language translations. This sounds nice, but that may not be desirable if the text around it needs to be updated as well, which will likely be the case.
  • Probably won't be portable if we change backends in the future

When I first saw these, I liked the concept, but after dealing with the ramifications, it seems like they might be more problematic than helpful.

At the least, all of them have to be reworked to get syntax highlighting. Should this just be a single "eliminate Vuepress snippets" enhancement?

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Überprüfe die bestehenden Vuepress-Code-Snippets von Book, deren .sh-Dateien und die entsprechenden Sprachübersetzungen. Vergleiche die hier beschriebenen Auswirkungen auf Wartung und Syntaxhervorhebung; abgeschlossen ist die Aufgabe, wenn eine klare Entscheidung darüber getroffen und dokumentiert wurde, ob die Snippets beibehalten oder entfernt werden sollen und was aktualisiert werden muss.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
shell
Bereich
documentation, localization
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

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