mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-15 04:18:46 +00:00
content: Consolidate configuration documentation
This commit is contained in:
1 parent
727ef6f665
commit
b6cae5cbc6
911 files changed
+10902
-11171
No files matched your search
@@ -1,13 +1,14 @@
|
||||
---
|
||||
title: InnerDeindent
|
||||
description: Returns the content between opening and closing shortcode tags, with indentation removed, applicable when the shortcode call includes a closing tag.
|
||||
description: Returns the content between opening and closing shortcode tags, with indentation removed, applicable when the shortcode call includes a closing tag.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/shortcode/Inner
|
||||
returnType: template.HTML
|
||||
signatures: [SHORTCODE.InnerDeindent]
|
||||
params:
|
||||
functions_and_methods:
|
||||
related:
|
||||
- methods/shortcode/Inner
|
||||
returnType: template.HTML
|
||||
signatures: [SHORTCODE.InnerDeindent]
|
||||
---
|
||||
|
||||
Similar to the [`Inner`] method, `InnerDeindent` returns the content between opening and closing shortcode tags. However, with `InnerDeindent`, indentation before the content is removed.
|
||||
@@ -16,7 +17,7 @@ This allows us to effectively bypass the rules governing [indentation] as provid
|
||||
|
||||
Consider this Markdown, an unordered list with a small gallery of thumbnail images within each list item:
|
||||
|
||||
{{< code file=content/about.md lang=md >}}
|
||||
{{< code file=content/about.md lang=text >}}
|
||||
- Gallery one
|
||||
|
||||
{{</* gallery */>}}
|
||||
@@ -36,7 +37,7 @@ In the example above, notice that the content between the opening and closing sh
|
||||
|
||||
With this shortcode, calling `Inner` instead of `InnerDeindent`:
|
||||
|
||||
{{< code file=layouts/shortcodes/gallery.html >}}
|
||||
{{< code file=layouts/shortcodes/gallery.html >}}
|
||||
<div class="gallery">
|
||||
{{ .Inner | strings.TrimSpace | .Page.RenderString }}
|
||||
</div>
|
||||
@@ -67,7 +68,7 @@ Hugo renders the Markdown to:
|
||||
|
||||
Although technically correct per the CommonMark specification, this is not what we want. If we remove the indentation using the `InnerDeindent` method:
|
||||
|
||||
{{< code file=layouts/shortcodes/gallery.html >}}
|
||||
{{< code file=layouts/shortcodes/gallery.html >}}
|
||||
<div class="gallery">
|
||||
{{ .InnerDeindent | strings.TrimSpace | .Page.RenderString }}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user