forked from jakub/jakubb-hugo
add title filter to dirs and include underscores for documents layout
This commit is contained in:
parent
293ced3505
commit
55122f137d
@ -12,11 +12,11 @@
|
|||||||
{{- range $files -}}
|
{{- range $files -}}
|
||||||
<li>
|
<li>
|
||||||
{{- if .IsDir -}}
|
{{- if .IsDir -}}
|
||||||
{{ title .Name }}
|
{{ title (replaceRE `[_-]` " " (path.BaseName .Name)) }}
|
||||||
{{- template "listDir" (dict "dir" (printf "%s/%s" $dir .Name)) -}}
|
{{- template "listDir" (dict "dir" (printf "%s/%s" $dir .Name)) -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- with resources.Get (printf "%s/%s" $dir .Name) -}}
|
{{- with resources.Get (printf "%s/%s" $dir .Name) -}}
|
||||||
<a href="{{ .RelPermalink }}">{{ title (replace (path.BaseName .Name) "-" " ") }}</a>
|
<a href="{{ .RelPermalink }}">{{ title (replaceRE `[_-]` " " (path.BaseName .Name)) }}</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user