Upload New File

parent 247985cb
{{ if and (ne (.Get "number") "") (ne (.Get "number") nil) }}
{{ $filename := add (add "shortcodes/paragraph-" (.Get "number")) ".json" }}
{{ with .Site.GetPage .Page.File.Path}}
{{ $resource := (.Resources.GetMatch $filename).RelPermalink }}
{{ $fields := getJSON "content" $resource }}
<div>
{{ if and (ne $fields.title "") (ne $fields.title nil) }}
<h4>{{ $fields.title }}</h4>
{{ end }}
{{ range $fields.paragraphs }}
<p>{{ . }}</p>
{{ end }}
</div>
{{ end }}
{{ else }}
<div>
{{ if and (ne (.Get "title") "") (ne (.Get "title") nil) }}
<h4>{{ .Get "title" }}</h4>
{{ end }}
<p>{{ .Get "text" }}</p>
</div>
{{ end }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment