Welcome to mirror list, hosted at ThFree Co, Russian Federation.

excerpt-include.html « shortcodes « layouts - github.com/vjeantet/hugo-theme-docport.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d11ad97c540eb14ef77b22c7eba94074db6ce816 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{{ $_hugo_config := `{ "version": 1 }` }}
{{ $excerpt := findRE "(?ms){{%\\s*excerpt[^%]*%}}(.|\n)*?{{%\\s*/excerpt\\s*%}}" ( readFile (printf "./content/%s" (.Get "filename")) ) }}
{{ range $excerpt }}
	{{if ($.Get "panel")}}
		<div class="panel panel-default">
			<div class="panel-heading">{{$.Get "panel"}}</div>
			<div class="panel-body">
				{{ (replaceRE "(?ms){{%\\s*excerpt[^%]*%}}(.*){{%\\s*/excerpt\\s*%}}" "$1" .) | safeHTML | markdownify }}
			</div>
		</div>
	{{else}}
		{{ (replaceRE "(?ms){{%\\s*excerpt[^%]*%}}(.*){{%\\s*/excerpt\\s*%}}" "$1" .) | safeHTML | markdownify }}
	{{ end }}
{{ end }}
{{.Inner}}