{{ $hasToc := and (in .TableOfContents "
  • " ) (.Params.toc) }} {{ $hasSidebar := or ($hasToc) (.Params.series) }}
    {{ template "doc-sidebar" (dict "context" . "permalink" .Permalink) }}
    {{ partial "components/post-article" . }} {{ with .GetTerms "tags" }} {{ partial "components/post-tags" . }} {{ end }} {{ with .GetTerms "authors" }} {{ partial "components/post-author" . }} {{ end }} {{ partial "components/post-edit" . }} {{ partial "components/post-footer" . }} {{ partial "comment" . }}
    {{ if $hasSidebar}} {{ end }}
    {{ define "doc-sidebar" }} {{/* Deprecation warning(v1.0.0) starts */}} {{ $parentLayout := partial "utils/hyphenate" (.context.Parent.Layout | default .context.Parent.Type) }} {{/* Deprecation warning(v1.0.0) ends */}} {{ if eq $parentLayout "doc-list" }} {{ template "list-pages" (dict "context" .context "permalink" .permalink) }} {{ else if (findRE "v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?/$" .context.Permalink) }} {{ template "list-pages" (dict "context" .context "permalink" .permalink) }} {{ else }} {{ template "doc-sidebar" (dict "context" .context.Parent "permalink" .permalink) }} {{ end }} {{ end }} {{ define "list-pages" }} {{ end }} {{ define "list-items"}} {{ end }} {{ define "partials/get-versions" }} {{/* Deprecation warning(v1.0.0) starts */}} {{ $parentLayout := partial "utils/hyphenate" (.context.Parent.Layout | default .context.Parent.Type) }} {{/* Deprecation warning(v1.0.0) ends */}} {{ if eq $parentLayout "doc-list" }} {{ range .context.Pages.Reverse }} {{ $hasVersion := findRE "v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?/$" .Permalink }} {{ if $hasVersion}} {{ $version := slice .Permalink }} {{ $.context.Scratch.Add "versions" $version }} {{ end }} {{ end }} {{ else }} {{ range .context.Parent.Pages.Reverse }} {{ $hasVersion := findRE "v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?/$" .Permalink }} {{ if $hasVersion }} {{ $version := slice .Permalink }} {{ $.context.Scratch.Add "versions" $version }} {{ end }} {{ end }} {{ end }} {{ $versions := .context.Scratch.Get "versions" }} {{ .context.Scratch.Delete "versions" }} {{ return $versions }} {{ end }}