diff --git a/layouts/shortcodes/blocks/lead.html b/layouts/shortcodes/blocks/lead.html index bae22630d6..5f30b516d0 100644 --- a/layouts/shortcodes/blocks/lead.html +++ b/layouts/shortcodes/blocks/lead.html @@ -1,16 +1,17 @@ -{{ $_hugo_config := `{ "version": 1 }` -}} {{ $col_id := .Get "color" | default .Ordinal -}} {{ $height := .Get "height" | default "auto" -}} -{{/* Height can be one of: auto, min, med, max, full. */ -}} +{{ with .Get "height" -}} + {{ if not ( or ( eq . "auto" ) ( eq . "min" ) ( eq . "med" ) ( eq . "max" ) ( eq . "full" ) ) -}} + {{ errorf "shortcode 'lead': parameter height is '%s', must be one of 'auto', 'min', 'med', 'max' or 'full'." . -}} + {{ end -}} +{{ end -}}
-
-
- {{ if eq .Page.File.Ext "md" -}} - {{ .Inner | markdownify -}} - {{ else -}} - {{ .Inner | htmlUnescape | safeHTML -}} - {{ end -}} -
-
+
+
+{{/* Do NOT remove this comment! It ends above HTML block. See https://spec.commonmark.org/0.30/#html-blocks, 7. */}} +{{ .Inner -}} +
+
+{{/**/ -}} diff --git a/userguide/content/en/_index.html b/userguide/content/en/_index.html index 163ac94af6..6d0826b38d 100644 --- a/userguide/content/en/_index.html +++ b/userguide/content/en/_index.html @@ -15,7 +15,7 @@ {{< /blocks/cover >}} -{{% blocks/lead color="primary" %}} +{{< blocks/lead color="primary" >}} Docsy is a theme for the Hugo static site generator that's specifically designed for technical documentation sets. Our aim is to help you get a working documentation site up and running as easily as possible, so you can concentrate @@ -24,7 +24,7 @@ Deploys by Netlify -{{% /blocks/lead %}} +{{< /blocks/lead >}} {{< blocks/section color="dark" type="features">}} {{% blocks/feature icon="fa-lightbulb" title="See Docsy in action!" url="/docs/examples/" %}} diff --git a/userguide/content/en/docs/adding-content/shortcodes/index.md b/userguide/content/en/docs/adding-content/shortcodes/index.md index 6459fda71d..c95037d490 100644 --- a/userguide/content/en/docs/adding-content/shortcodes/index.md +++ b/userguide/content/en/docs/adding-content/shortcodes/index.md @@ -82,10 +82,12 @@ Runs on **bare metal** in the **cloud**! {{%/* /blocks/lead */%}} ``` -| Parameter | Default | Description | -| ---------------- |------------| ------------| -| height | | See above. -| color | | See above. +Use the syntax printed above if the inner content of your `/blocks/lead` shortcode is authored in markdown. In case of HTML content, use square brackets `<>` as innermost delimiters: `{{}}HTML content{{< /blocks/lead */>}}`. + +| Parameter | Default | Description | +| --------- |--------- | ------------------------------- | +| height | `auto` | [See above.](#shortcode-blocks) | +| color | .Ordinal | [See above.](#shortcode-blocks) | ### blocks/section