Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base content title on ContentBaseName #440

Merged
merged 1 commit into from
Dec 2, 2021
Merged

Base content title on ContentBaseName #440

merged 1 commit into from
Dec 2, 2021

Conversation

jmooring
Copy link
Contributor

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 gohugoio/hugo#9045.

With this PR:

hugo new post/my-first-post/index.md

will produce:

title: "My First Post"

instead of:

title: "Index"

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 gohugoio/hugo#9045.

With this PR:

  hugo new post/my-first-post/index.md

will produce:

  title: "My First Post"

instead of:

  title: "Index"
@regisphilibert
Copy link
Member

Hi @jmooring and thank you for this.

@regisphilibert regisphilibert merged commit 24dcf32 into theNewDynamic:master Dec 2, 2021
Remicck pushed a commit to Remicck/gohugo-theme-ananke that referenced this pull request Mar 7, 2022
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 gohugoio/hugo#9045.

With this PR:

  hugo new post/my-first-post/index.md

will produce:

  title: "My First Post"

instead of:

  title: "Index"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants