Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/budparr/gohugo-theme-ananke.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Mooring <joe@mooring.com>2021-12-02 22:51:01 +0300
committerGitHub <noreply@github.com>2021-12-02 22:51:01 +0300
commit24dcf32ffd2de43b20c27cc00084b9a49453cb52 (patch)
treeeee721c415ee72a6b1c16044e0ec9c1e86e79b94
parent3710f7e92a02438ae8508554c0d7a9ea763cc6ba (diff)
Base content title on ContentBaseName (#440)
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"
-rwxr-xr-xarchetypes/default.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/archetypes/default.md b/archetypes/default.md
index 01392c0..6398a82 100755
--- a/archetypes/default.md
+++ b/archetypes/default.md
@@ -1,5 +1,5 @@
---
-title: "{{ replace .TranslationBaseName "-" " " | title }}"
+title: "{{ replace .File.ContentBaseName "-" " " | title }}"
date: {{ .Date }}
tags: []
featured_image: ""