From bbd322bbf8d188e55061969fb4b65352d96f932e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Mon, 20 Feb 2023 00:20:37 +0100 Subject: [PATCH] frontmatter: support VSCode Front Matter extension #481 --- .frontmatter/content/mediaDb.json | 1 + README.md | 1 + exampleSite/content/_index.en.md | 1 + .../content/basics/migration/_index.en.md | 16 +- frontmatter.json | 85 +++ hugo-theme-relearn.code-workspace | 23 + static/css/theme.css | 1 + theme.toml | 2 +- vscode-frontmatter/snippets.de.json | 499 ++++++++++++++++++ vscode-frontmatter/snippets.en.json | 499 ++++++++++++++++++ 10 files changed, 1126 insertions(+), 2 deletions(-) create mode 100644 .frontmatter/content/mediaDb.json create mode 100644 frontmatter.json create mode 100644 hugo-theme-relearn.code-workspace create mode 100644 vscode-frontmatter/snippets.de.json create mode 100644 vscode-frontmatter/snippets.en.json diff --git a/.frontmatter/content/mediaDb.json b/.frontmatter/content/mediaDb.json new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/.frontmatter/content/mediaDb.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/README.md b/README.md index e11cec43da..a3e50502bb 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ The Relearn theme is a fork of the great [Learn theme](https://github.com/matcor - Looks nice on paper (if you have to) - Usable offline, no external dependencies - [Usable from your local file system via `file://` protocol](https://mcshelby.github.io/hugo-theme-relearn/basics/configuration#serving-your-page-from-the-filesystem) + - Support for the [VSCode Front Matter extension](https://github.com/estruyf/vscode-front-matter) for on-premise CMS capabilities - Support for Internet Explorer 11 - **Configurable theming and visuals** - [Configurable brand images](https://mcshelby.github.io/hugo-theme-relearn/basics/customization#change-the-logo) diff --git a/exampleSite/content/_index.en.md b/exampleSite/content/_index.en.md index 9b3580d94e..9be6ff045d 100644 --- a/exampleSite/content/_index.en.md +++ b/exampleSite/content/_index.en.md @@ -20,6 +20,7 @@ The theme is a fork of the great [Learn theme](https://github.com/matcornic/hugo - Looks nice on paper (if you have to) - Usable offline, no external dependencies - [Usable from your local file system via `file://` protocol]({{%relref "basics/configuration#serving-your-page-from-the-filesystem" %}}) + - Support for the [VSCode Front Matter extension](https://github.com/estruyf/vscode-front-matter) for on-premise CMS capabilities - Support for Internet Explorer 11 - **Configurable theming and visuals** - [Configurable brand images]({{%relref "basics/customization#change-the-logo" %}}) diff --git a/exampleSite/content/basics/migration/_index.en.md b/exampleSite/content/basics/migration/_index.en.md index 117dfcef14..9b439dae5b 100644 --- a/exampleSite/content/basics/migration/_index.en.md +++ b/exampleSite/content/basics/migration/_index.en.md @@ -20,6 +20,20 @@ This document shows you what's new in the latest release. For a detailed list of ## 5.12.0 (not yet released) +- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Support for the great [VSCode Front Matter extension](https://github.com/estruyf/vscode-front-matter) which provides on-premise CMS capabilties to Hugo. + + The theme provides Front Matter snippets for its shortcodes. Currently only English and German is supported. Put a reference into your `frontmatter.json` like this + + ````json + { + ... + "frontMatter.extends": [ + "./vscode-frontmatter/snippets.en.json" + ] + ... + } + ```` + - {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Support for languages that are written right to left (like Arabic) is now complete and extended to the menu, the top navigation bar and print. You can experience this in the [pirate translation]({{%relref path="basics/migration" lang="pir" %}}). This feature is not available in Internet Explorer 11. - {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The scrollbars are now colored according to their variant color scheme to better fit into the visuals. @@ -33,7 +47,7 @@ This document shows you what's new in the latest release. For a detailed list of In case you made changes to the theme that are dependend on this library you can place a copy of jQuery into your `static/js` directory and load it from your own `layouts/partials/custom-header.html` like this: ````html - + ```` - {{% badge style="note" title=" " %}}Change{{% /badge %}} [Mermaid]({{% relref "shortcodes/mermaid#parameter" %}}) diagrams can now be configured for pan and zoom on site-, page-level or individually for each graph. diff --git a/frontmatter.json b/frontmatter.json new file mode 100644 index 0000000000..94422769ac --- /dev/null +++ b/frontmatter.json @@ -0,0 +1,85 @@ +{ + "$schema": "https://frontmatter.codes/frontmatter.schema.json", + "frontMatter.content.defaultSorting": "LastModifiedAsc", + "frontMatter.content.hideFm": false, + "frontMatter.content.pageFolders": [ + { + "contentTypes": [ + "default" + ], + "path": "[[workspace]]/exampleSite/content", + "title": "Docs" + } + ], + "frontMatter.content.publicFolder": "static", + "frontMatter.experimental": true, + "frontMatter.extends": [ + "./vscode-frontmatter/snippets.en.json" + ], + "frontMatter.framework.id": "hugo", + "frontMatter.framework.startCommand": ".\\exampleSite\\hugo.exe server -p 1313 --bind 0.0.0.0 --navigateToChanged -s .\\exampleSite", + "frontMatter.git.commitMesage": "docs: changes via Front Matter editor", + "frontMatter.git.enabled": true, + "frontMatter.global.activeMode": "Editor", + "frontMatter.global.modes": [ + { + "id": "Power", + "features": [ + "dashboard.data.view", + "dashboard.snippets.manage", + "dashboard.snippets.view", + "dashboard.taxonomy.view", + "panel.actions", + "panel.contentType", + "panel.globalSettings", + "panel.metadata", + "panel.otherActions", + "panel.recentlyModified", + "panel.seo" + ] + }, + { + "id": "Editor", + "features": [ + "dashboard.snippets.view", + "dashboard.taxonomy.view", + "panel.actions", + "panel.metadata" + ] + } + ], + "frontMatter.preview.host": "http://localhost:1313", + "frontMatter.preview.pathName": "{{pathToken.relPath}}/", + "frontMatter.taxonomy.categories": [], + "frontMatter.taxonomy.contentTypes": [ + { + "fields": [ + { + "name": "title", + "title": "Titel", + "type": "string" + }, + { + "default": " ", + "name": "description", + "title": "Description", + "type": "string" + }, + { + "name": "weight", + "title": "Weight", + "type": "number" + }, + { + "name": "toc", + "title": "Create TOC", + "type": "boolean" + } + ], + "name": "default", + "pageBundle": true, + "previewPath": null + } + ], + "frontMatter.taxonomy.frontMatterType": "TOML" +} diff --git a/hugo-theme-relearn.code-workspace b/hugo-theme-relearn.code-workspace new file mode 100644 index 0000000000..0e68face3a --- /dev/null +++ b/hugo-theme-relearn.code-workspace @@ -0,0 +1,23 @@ +{ + "extensions": { + // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. + // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp + + // List of extensions which should be recommended for users of this workspace. + "recommendations": [ + "eliostruyf.vscode-front-matter" + ], + // List of extensions recommended by VS Code that should not be recommended for users of this workspace. + "unwantedRecommendations": [ + ] + }, + "folders": [ + { + "path": "." + } + ], + "settings": { + "explorer.excludeGitIgnore": true, + "terminal.integrated.defaultProfile.windows": "Command Prompt" + } +} \ No newline at end of file diff --git a/static/css/theme.css b/static/css/theme.css index a7cc1cb208..e4fd855ecd 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -1709,6 +1709,7 @@ html[dir] #sidebar .collapsible-menu input.toggle:checked:before { /* avoid breakage if no content is given */ content: "\200b"; } + /* task list and its checkboxes */ article ul li:has(input[type="checkbox"]) { list-style: none; diff --git a/theme.toml b/theme.toml index ca124f81eb..eb57ba6c08 100644 --- a/theme.toml +++ b/theme.toml @@ -9,7 +9,7 @@ features = ["badges", "breadcrumbs", "boxes", "buttons", "chemical formulae", "customizable", "color variants", "dark", "dark mode", "docs", "documentation", "expand", - "favicon", "file inclusion", "file system support", "font awesome", + "favicon", "file inclusion", "file system support", "font awesome", "front matter cms", "gfm", "hidden pages", "i18n", "icons", "ie11", "image resizing", "include", "internet explorer", diff --git a/vscode-frontmatter/snippets.de.json b/vscode-frontmatter/snippets.de.json new file mode 100644 index 0000000000..28d2501bac --- /dev/null +++ b/vscode-frontmatter/snippets.de.json @@ -0,0 +1,499 @@ +{ + "frontMatter.content.snippets": { + "Attachments": { + "body": [ + "{{< attachments title=\"[[&title]]\" pattern=\"[[&pattern]]\" sort=\"[[&sort]]\" style=\"[[&style]]\" color=\"[[&color]]\" icon=\"[[&icon]]\" />}}" + ], + "description": "Zeigt eine Liste der Dateianhänge der Seite an", + "fields": [ + { + "default": "", + "name": "title", + "title": "Titel", + "type": "string" + }, + { + "default": "", + "name": "pattern", + "title": "Regex zum Filtern der Dateinamen", + "type": "string" + }, + { + "choices": [ + "", + "asc", + "desc" + ], + "default": "", + "name": "sort", + "title": "Ausgabereihenfolge", + "type": "choice" + }, + { + "choices": [ + "", + "info", + "note", + "tip", + "warning", + "primary", + "secondary", + "accent", + "blue", + "green", + "gray", + "orange", + "red", + "default", + "transparent" + ], + "default": "", + "name": "style", + "title": "Stil-Schema", + "type": "choice" + }, + { + "default": "", + "name": "color", + "title": "CSS-Farbwert", + "type": "string" + }, + { + "default": "", + "name": "icon", + "title": "Font Awesome Icon", + "type": "string" + } + ] + }, + "Badge": { + "body": [ + "{{< badge title=\"[[&title]]\" style=\"[[&style]]\" color=\"[[&color]]\" icon=\"[[&icon]]\" >}}[[&content]]{{< /badge >}}" + ], + "description": "Zeigt einen kleinen Marker im Text an", + "fields": [ + { + "default": "FM_SELECTED_TEXT", + "name": "content", + "title": "Text", + "type": "string" + }, + { + "default": "", + "name": "title", + "title": "Titel", + "type": "string" + }, + { + "choices": [ + "", + "info", + "note", + "tip", + "warning", + "primary", + "secondary", + "accent", + "blue", + "green", + "gray", + "orange", + "red", + "default", + "transparent" + ], + "default": "", + "name": "style", + "title": "Stil-Schema", + "type": "choice" + }, + { + "default": "", + "name": "color", + "title": "CSS-Farbwert", + "type": "string" + }, + { + "default": "", + "name": "icon", + "title": "Font Awesome Icon", + "type": "string" + } + ] + }, + "Button": { + "body": [ + "{{< button href=\"[[&href]]\" target=\"[[&target]]\" type=\"[[&type]]\" style=\"[[&style]]\" color=\"[[&color]]\" icon=\"[[&icon]]\" iconposition=\"[[&iconposition]]\" >}}[[&content]]{{< /button >}}" + ], + "description": "Zeigt eine anklickbare Schaltfläche an", + "fields": [ + { + "default": "FM_SELECTED_TEXT", + "name": "content", + "title": "Text", + "type": "string" + }, + { + "default": "", + "name": "href", + "title": "Ziel-URL", + "type": "string" + }, + { + "default": "", + "name": "target", + "title": "HTML a[target] wie z.B. `_self` oder `_blank`", + "type": "string" + }, + { + "default": "", + "name": "type", + "title": "HTML button[type] wie z.B. `button` oder `submit`", + "type": "string" + }, + { + "choices": [ + "", + "info", + "note", + "tip", + "warning", + "primary", + "secondary", + "accent", + "blue", + "green", + "gray", + "orange", + "red", + "default", + "transparent" + ], + "default": "", + "name": "style", + "title": "Stil-Schema", + "type": "choice" + }, + { + "default": "", + "name": "color", + "title": "CSS-Farbwert", + "type": "string" + }, + { + "default": "", + "name": "icon", + "title": "Font Awesome Icon", + "type": "string" + }, + { + "choices": [ + "", + "left", + "right" + ], + "default": "", + "name": "iconposition", + "title": "Position des Icons", + "type": "choice" + } + ] + }, + "Children": { + "body": [ + "{{< children description=\"[[&description]]\" depth=\"[[&depth]]\" sort=\"[[&sort]]\" showhidden=\"[[&showhidden]]\" containerstyle=\"[[&containerstyle]]\" style=\"[[&style]]\" >}}" + ], + "description": "Zeigt eine Liste der Unterseiten dieser Seite an", + "fields": [ + { + "choices": [ + "", + "false", + "true" + ], + "default": "", + "name": "description", + "title": "Unterseiten-Beschreibung anzeigen", + "type": "choice" + }, + { + "default": "", + "name": "depth", + "title": "Tiefe der anzuzeigenden Unterseiten-Ebenen", + "type": "string" + }, + { + "default": "", + "name": "sort", + "title": "Sortierfeld", + "type": "string" + }, + { + "choices": [ + "", + "false", + "true" + ], + "default": "", + "name": "showhidden", + "title": "Versteckte Unterseiten anzeigen", + "type": "choice" + }, + { + "default": "", + "name": "containerstyle", + "title": "Container-HTML-Element", + "type": "string" + }, + { + "default": "", + "name": "style", + "title": "Container-Kind-HTML-Element", + "type": "string" + } + ] + }, + "Expand": { + "body": [ + "{{% expand title=\"[[&title]]\" open=\"[[&open]]\" %}}[[&content]]{{% /expand %}}" + ], + "description": "Zeigt einen ein-/ausklappbaren Textblock an", + "fields": [ + { + "default": "FM_SELECTED_TEXT", + "name": "content", + "title": "Text", + "type": "string" + } + ] + }, + "Icon": { + "body": [ + "{{< icon [[&icon]] >}}" + ], + "description": "Zeigt ein Font Awesome Icon an", + "fields": [ + { + "name": "icon", + "title": "Font Awesome Icon", + "type": "string" + } + ] + }, + "Include": { + "body": [ + "{{< include file=\"[[&file]]\" hidefirstheading=\"[[&hidefirstheading]]\" >}}" + ], + "description": "Zeigt den Inhalt einer Datei an", + "fields": [ + { + "name": "file", + "title": "Pfad zur Datei", + "type": "string" + }, + { + "choices": [ + "", + "false", + "true" + ], + "default": "", + "name": "hidefirstheading", + "title": "Erste Überschrift verstecken", + "type": "choice" + } + ] + }, + "Math": { + "body": [ + "````math align=\"[[&align]]\"", + "[[&content]]", + "````" + ], + "description": "Zeigt eine mathematische oder chemische Formel mittels MathJax an", + "fields": [ + { + "default": "FM_SELECTED_TEXT", + "name": "content", + "title": "Formel", + "type": "string" + }, + { + "choices": [ + "", + "left", + "center", + "right" + ], + "default": "", + "name": "align", + "title": "Horizontale Ausrichtung", + "type": "choice" + } + ] + }, + "Mermaid": { + "body": [ + "````mermaid align=\"[[&align]]\" zoom=\"[[&zoom]]\"", + "[[&content]]", + "````" + ], + "description": "Zeigt ein Mermaid Diagramm an", + "fields": [ + { + "default": "FM_SELECTED_TEXT", + "name": "content", + "title": "Diagramm", + "type": "string" + }, + { + "choices": [ + "", + "left", + "center", + "right" + ], + "default": "", + "name": "align", + "title": "Horizontale Ausrichtung", + "type": "choice" + }, + { + "choices": [ + "", + "false", + "true" + ], + "default": "", + "name": "zoom", + "title": "Diagramm schieb- und zoombar", + "type": "choice" + } + ] + }, + "Notice": { + "body": [ + "{{% notice title=\"[[&title]]\" style=\"[[&style]]\" color=\"[[&color]]\" icon=\"[[&icon]]\" %}}[[&content]]{{% /notice %}}" + ], + "description": "Zeigt eine konfigurierbare Text-Box an", + "fields": [ + { + "default": "FM_SELECTED_TEXT", + "name": "content", + "title": "Text", + "type": "string" + }, + { + "default": "", + "name": "title", + "title": "Titel", + "type": "string" + }, + { + "choices": [ + "", + "info", + "note", + "tip", + "warning", + "primary", + "secondary", + "accent", + "blue", + "green", + "gray", + "orange", + "red", + "default", + "transparent" + ], + "default": "", + "name": "style", + "title": "Stil-Schema", + "type": "choice" + }, + { + "default": "", + "name": "color", + "title": "CSS-Farbwert", + "type": "string" + }, + { + "default": "", + "name": "icon", + "title": "Font Awesome Icon", + "type": "string" + } + ] + }, + "Siteparam": { + "body": [ + "{{< siteparam [[&name]] >}}" + ], + "description": "Zeigt einen \"site parameter\" an", + "fields": [ + { + "name": "name", + "title": "Name des \"site parameter\"", + "type": "string" + } + ] + }, + "Swagger": { + "body": [ + "{{< swagger src=\"[[&src]]\" >}}" + ], + "description": "Zeigt eine Swagger / Open API Specification an", + "fields": [ + { + "name": "src", + "title": "URL zur Open API Specification", + "type": "string" + } + ] + }, + "Tabs": { + "body": [ + "{{< tabs groupid=\"[[&groupid]]\" >}}", + "{{% tab name=\"[[&name1]]\" %}}", + "[[&content1]]", + "{{% /tab %}}", + "{{% tab name=\"[[&name2]]\" %}}", + "[[&content2]]", + "{{% /tab %}}", + "{{< /tabs >}}" + ], + "description": "Zeigt eine Tabgruppe an", + "fields": [ + { + "default": "", + "name": "groupid", + "title": "ID, die zum synchronisieren der Tabauswahl über mehrere Tabs Snippets benutzt werden soll", + "type": "string" + }, + { + "name": "name1", + "title": "Titel des ersten Tabs", + "type": "string" + }, + { + "default": "FM_SELECTED_TEXT", + "name": "content1", + "title": "Text des ersten Tabs", + "type": "string" + }, + { + "name": "name2", + "title": "Titel des zweiten Tabs", + "type": "string" + }, + { + "default": "", + "name": "content2", + "title": "Text des zweiten Tabs", + "type": "string" + } + ] + } + } +} diff --git a/vscode-frontmatter/snippets.en.json b/vscode-frontmatter/snippets.en.json new file mode 100644 index 0000000000..07884a26b1 --- /dev/null +++ b/vscode-frontmatter/snippets.en.json @@ -0,0 +1,499 @@ +{ + "frontMatter.content.snippets": { + "Attachments": { + "body": [ + "{{< attachments title=\"[[&title]]\" pattern=\"[[&pattern]]\" sort=\"[[&sort]]\" style=\"[[&style]]\" color=\"[[&color]]\" icon=\"[[&icon]]\" />}}" + ], + "description": "Displays a list of files attached to the page", + "fields": [ + { + "default": "", + "name": "title", + "title": "Title", + "type": "string" + }, + { + "default": "", + "name": "pattern", + "title": "Regex for filtering file names", + "type": "string" + }, + { + "choices": [ + "", + "asc", + "desc" + ], + "default": "", + "name": "sort", + "title": "Sorting order", + "type": "choice" + }, + { + "choices": [ + "", + "info", + "note", + "tip", + "warning", + "primary", + "secondary", + "accent", + "blue", + "green", + "gray", + "orange", + "red", + "default", + "transparent" + ], + "default": "", + "name": "style", + "title": "Style scheme", + "type": "choice" + }, + { + "default": "", + "name": "color", + "title": "CSS color value", + "type": "string" + }, + { + "default": "", + "name": "icon", + "title": "Font Awesome icon", + "type": "string" + } + ] + }, + "Badge": { + "body": [ + "{{< badge title=\"[[&title]]\" style=\"[[&style]]\" color=\"[[&color]]\" icon=\"[[&icon]]\" >}}[[&content]]{{< /badge >}}" + ], + "description": "Displays a little marker in the text", + "fields": [ + { + "default": "FM_SELECTED_TEXT", + "name": "content", + "title": "Text", + "type": "string" + }, + { + "default": "", + "name": "title", + "title": "Title", + "type": "string" + }, + { + "choices": [ + "", + "info", + "note", + "tip", + "warning", + "primary", + "secondary", + "accent", + "blue", + "green", + "gray", + "orange", + "red", + "default", + "transparent" + ], + "default": "", + "name": "style", + "title": "Style scheme", + "type": "choice" + }, + { + "default": "", + "name": "color", + "title": "CSS color value", + "type": "string" + }, + { + "default": "", + "name": "icon", + "title": "Font Awesome icon", + "type": "string" + } + ] + }, + "Button": { + "body": [ + "{{< button href=\"[[&href]]\" target=\"[[&target]]\" type=\"[[&type]]\" style=\"[[&style]]\" color=\"[[&color]]\" icon=\"[[&icon]]\" iconposition=\"[[&iconposition]]\" >}}[[&content]]{{< /button >}}" + ], + "description": "Displays a clickable button", + "fields": [ + { + "default": "FM_SELECTED_TEXT", + "name": "content", + "title": "Text", + "type": "string" + }, + { + "default": "", + "name": "href", + "title": "Destination URL", + "type": "string" + }, + { + "default": "", + "name": "target", + "title": "HTML a[target] like eg. `_self` or `_blank`", + "type": "string" + }, + { + "default": "", + "name": "type", + "title": "HTML button[type] like eg. `button` or `submit`", + "type": "string" + }, + { + "choices": [ + "", + "info", + "note", + "tip", + "warning", + "primary", + "secondary", + "accent", + "blue", + "green", + "gray", + "orange", + "red", + "default", + "transparent" + ], + "default": "", + "name": "style", + "title": "Style scheme", + "type": "choice" + }, + { + "default": "", + "name": "color", + "title": "CSS color value", + "type": "string" + }, + { + "default": "", + "name": "icon", + "title": "Font Awesome icon", + "type": "string" + }, + { + "choices": [ + "", + "left", + "right" + ], + "default": "", + "name": "iconposition", + "title": "Position of the icon", + "type": "choice" + } + ] + }, + "Children": { + "body": [ + "{{< children description=\"[[&description]]\" depth=\"[[&depth]]\" sort=\"[[&sort]]\" showhidden=\"[[&showhidden]]\" containerstyle=\"[[&containerstyle]]\" style=\"[[&style]]\" >}}" + ], + "description": "Displays a list of child pages for the page", + "fields": [ + { + "choices": [ + "", + "false", + "true" + ], + "default": "", + "name": "description", + "title": "Show child page description", + "type": "choice" + }, + { + "default": "", + "name": "depth", + "title": "Depth of child page level to display", + "type": "string" + }, + { + "default": "", + "name": "sort", + "title": "Sort predicate", + "type": "string" + }, + { + "choices": [ + "", + "false", + "true" + ], + "default": "", + "name": "showhidden", + "title": "Show hidden child pages", + "type": "choice" + }, + { + "default": "", + "name": "containerstyle", + "title": "Container HTML element", + "type": "string" + }, + { + "default": "", + "name": "style", + "title": "Container child HTML element", + "type": "string" + } + ] + }, + "Expand": { + "body": [ + "{{% expand title=\"[[&title]]\" open=\"[[&open]]\" %}}[[&content]]{{% /expand %}}" + ], + "description": "Displays an expandable/collapsable section of text", + "fields": [ + { + "default": "FM_SELECTED_TEXT", + "name": "content", + "title": "Text", + "type": "string" + } + ] + }, + "Icon": { + "body": [ + "{{< icon [[&icon]] >}}" + ], + "description": "Displays a Font Awesome icon", + "fields": [ + { + "name": "icon", + "title": "Font Awesome icon", + "type": "string" + } + ] + }, + "Include": { + "body": [ + "{{< include file=\"[[&file]]\" hidefirstheading=\"[[&hidefirstheading]]\" >}}" + ], + "description": "Displays the content of another file", + "fields": [ + { + "name": "file", + "title": "File path", + "type": "string" + }, + { + "choices": [ + "", + "false", + "true" + ], + "default": "", + "name": "hidefirstheading", + "title": "Hide first heading", + "type": "choice" + } + ] + }, + "Math": { + "body": [ + "````math align=\"[[&align]]\"", + "[[&content]]", + "````" + ], + "description": "Displays a math or chemical formulae using MathJax", + "fields": [ + { + "default": "FM_SELECTED_TEXT", + "name": "content", + "title": "Formulae", + "type": "string" + }, + { + "choices": [ + "", + "left", + "center", + "right" + ], + "default": "", + "name": "align", + "title": "Horizontal alignment", + "type": "choice" + } + ] + }, + "Mermaid": { + "body": [ + "````mermaid align=\"[[&align]]\" zoom=\"[[&zoom]]\"", + "[[&content]]", + "````" + ], + "description": "Displays a Mermaid diagram or flowchart", + "fields": [ + { + "default": "FM_SELECTED_TEXT", + "name": "content", + "title": "Diagram", + "type": "string" + }, + { + "choices": [ + "", + "left", + "center", + "right" + ], + "default": "", + "name": "align", + "title": "Horizontal alignment", + "type": "choice" + }, + { + "choices": [ + "", + "false", + "true" + ], + "default": "", + "name": "zoom", + "title": "Diagram is pan- and zoomable", + "type": "choice" + } + ] + }, + "Notice": { + "body": [ + "{{% notice title=\"[[&title]]\" style=\"[[&style]]\" color=\"[[&color]]\" icon=\"[[&icon]]\" %}}[[&content]]{{% /notice %}}" + ], + "description": "Displays a configurable box of text", + "fields": [ + { + "default": "FM_SELECTED_TEXT", + "name": "content", + "title": "Text", + "type": "string" + }, + { + "default": "", + "name": "title", + "title": "Title", + "type": "string" + }, + { + "choices": [ + "", + "info", + "note", + "tip", + "warning", + "primary", + "secondary", + "accent", + "blue", + "green", + "gray", + "orange", + "red", + "default", + "transparent" + ], + "default": "", + "name": "style", + "title": "Style scheme", + "type": "choice" + }, + { + "default": "", + "name": "color", + "title": "CSS color value", + "type": "string" + }, + { + "default": "", + "name": "icon", + "title": "Font Awesome icon", + "type": "string" + } + ] + }, + "Siteparam": { + "body": [ + "{{< siteparam [[&name]] >}}" + ], + "description": "Displays the value of a site parameter", + "fields": [ + { + "name": "name", + "title": "The name of the site parameter", + "type": "string" + } + ] + }, + "Swagger": { + "body": [ + "{{< swagger src=\"[[&src]]\" >}}" + ], + "description": "Displays a Swagger / Open API Specification", + "fields": [ + { + "name": "src", + "title": "URL to the Open API Specification", + "type": "string" + } + ] + }, + "Tabs": { + "body": [ + "{{< tabs groupid=\"[[&groupid]]\" >}}", + "{{% tab name=\"[[&name1]]\" %}}", + "[[&content1]]", + "{{% /tab %}}", + "{{% tab name=\"[[&name2]]\" %}}", + "[[&content2]]", + "{{% /tab %}}", + "{{< /tabs >}}" + ], + "description": "Display a set of tabs", + "fields": [ + { + "default": "", + "name": "groupid", + "title": "ID to synchronize the tab selection of multiple Tabs snippets", + "type": "string" + }, + { + "name": "name1", + "title": "The title of the first tab", + "type": "string" + }, + { + "default": "FM_SELECTED_TEXT", + "name": "content1", + "title": "The text for the first tab", + "type": "string" + }, + { + "name": "name2", + "title": "The title of the second tab", + "type": "string" + }, + { + "default": "", + "name": "content2", + "title": "The text for the second tab", + "type": "string" + } + ] + } + } +}