15 lines
471 B
HTML
15 lines
471 B
HTML
|
{{- $s := site.Params }}
|
||
|
{{- $p := .Params }}
|
||
|
{{- $maxCodeLines := default 100 $s.codeMaxLines }}
|
||
|
{{- with $p.codeMaxLines }}
|
||
|
{{- $maxCodeLines = . }}
|
||
|
{{- end }}
|
||
|
{{- $showLineNumbers := default false $s.showLineNumbers }}
|
||
|
{{ with $p.showLineNumbers }}
|
||
|
{{- $showLineNumbers = . }}
|
||
|
{{ else }}
|
||
|
{{ if eq $p.showLineNumbers false }}
|
||
|
{{- $showLineNumbers = false }}
|
||
|
{{ end }}
|
||
|
{{- end }}
|
||
|
{{- return (jsonify (dict "show" $showLineNumbers "maximum" $maxCodeLines)) }}
|