mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 17:22:46 +00:00
Base content title on ContentBaseName
With Hugo v0.88.1 and earlier, ContentBaseName and TranslationBaseName both returned "index" when creating a leaf bundle with hugo new. This is a known bug, addressed with https://github.com/gohugoio/hugo/pull/9045. With this PR: hugo new post/my-first-post/index.md will produce: title: "My First Post" instead of: title: "Index"
This commit is contained in:
parent
869b03ea78
commit
df5e8c0cb0
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "{{ replace .TranslationBaseName "-" " " | title }}"
|
||||
title: "{{ replace .File.ContentBaseName "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
tags: []
|
||||
featured_image: ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user