mirror of https://github.com/docker/docs.git
18 lines
457 B
HTML
18 lines
457 B
HTML
{{ $title := "" }}
|
|
{{ if .LinkTitle }}
|
|
{{ $title = .LinkTitle }}
|
|
{{ else }}
|
|
{{ $title = index (findRE `# .*` .RawContent) 0 | strings.TrimLeft "# " }}
|
|
{{ with .File }}
|
|
{{ with (index (site.Data.frontmatter) .Path) }}
|
|
{{ with .title }}
|
|
{{ $title = . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ if not $title }}
|
|
{{ $title = strings.ReplaceRE "[-_]" " " .TranslationBaseName }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ return $title }}
|