Inhalte
Reichhaltige Inhalte
Nutzen Sie Hinweise, Schritte, Tabs, Akkordeons, Badges und weitere interaktive Komponenten.
Eingebaute Komponenten für interaktive und hervorgehobene Inhalte.
Hinweise
Heben Sie wichtige Informationen mit Hinweisen hervor:
callout { type = info, This is an informational callout. } Vier Typen sind verfügbar:
Preview
Info
Info — allgemeine Informationen und Tipps.
Warning
Warnung — worauf man achten sollte.
Error
Fehler — kritische Probleme oder Breaking Changes.
Success
Erfolg — Bestätigungen und positive Ergebnisse.
Schritte
Nummerierte Anleitungen:
steps {
Install the package:
codeblock { language = bash, npm i -S the-package },
Configure your project:
codeblock { language = bash, npx the-package --configure },
Start the dev server:
codeblock { language = bash, npm run dev}
} Preview
- Installieren Sie das Paket:
bash npm i -S the-package - Konfigurieren Sie Ihr Projekt:
bash npx the-package --configure - Starten Sie den Entwicklungsserver:
bash npm run dev
Tabs
Tab-basierte Inhaltsbereiche mit optionaler gruppenbasierter Persistenz:
tabs { group = platforms,
tab { label = macOS, icon = uim:apple, Instructions for macOS. },
tab { label = Linux, icon = uim:linux, Instructions for Linux. },
tab { label = Windows, icon = uim:windows, Instructions for Windows. }
} Preview
Anleitung für macOS.
Wenn mehrere tabs-Blöcke denselben group-Wert teilen, wird durch die Auswahl eines Tabs in einem Block automatisch die Auswahl in allen anderen synchronisiert. Die Auswahl wird in localStorage gespeichert.
Akkordeon
Einklappbarer Inhalt:
accordion { title = Click to expand, Hidden content goes here. } Preview
Blockzitate
quote { The best documentation is the documentation that exists., author = Unknown } Preview
Die beste Dokumentation ist die Dokumentation, die existiert.
Badges
Inline-Statusanzeigen:
badge { Stable }
badge { variant = secondary, Beta }
badge { variant = destructive, Deprecated }
badge { variant = outline, v2.0 } Preview
Stabil Beta Veraltet v2.0
Aufgabenlisten
tasklist {
"[x] Write documentation",
"[x] Add examples",
"[ ] Review and publish"
} Preview
- Dokumentation schreiben
- Beispiele hinzufügen
- Überprüfen und veröffentlichen