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 -}}
|
||||
<li>
|
||||
{{- if .IsDir -}}
|
||||
{{ title .Name }}
|
||||
{{ title (replaceRE `[_-]` " " (path.BaseName .Name)) }}
|
||||
{{- template "listDir" (dict "dir" (printf "%s/%s" $dir .Name)) -}}
|
||||
{{- else -}}
|
||||
{{- 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 -}}
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user