зеркало из https://github.com/docker/get-involved.git
Create excerpt-include.html
This commit is contained in:
Родитель
c9df4d69a1
Коммит
96b5f472df
|
@ -0,0 +1,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}}
|
Загрузка…
Ссылка в новой задаче