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

Allow default title to have initial caps #2743

Closed
mdhender opened this issue Nov 28, 2016 · 4 comments
Closed

Allow default title to have initial caps #2743

mdhender opened this issue Nov 28, 2016 · 4 comments

Comments

@mdhender
Copy link
Contributor

Would like to specify the name of new content in all lower case and have the default title created in the front matter converted to initial caps.

$ hugo new post/init-caps.md

Current output:

+++
date = "2016-11-27T18:58:19-06:00"
title = "init caps"

+++

Would like to see

+++
date = "2016-11-27T18:58:42-06:00"
title = "Init Caps"

+++
@bep bep added the Wish label Nov 28, 2016
@bep
Copy link
Member

bep commented Nov 28, 2016

Note that title casing is a style not used in all languages, also title casing isn't probably what you really want in this case, see #989.

So, to get this right would be a challenging task.

But it should have the first character upper.

@mdhender
Copy link
Contributor Author

mdhender commented Nov 29, 2016

If no one objects, I'll name the config option "coerceTitleFormat" with this fix looking for "initCaps". That way I can avoid title case completely.

@bep
Copy link
Member

bep commented Dec 1, 2016

This will be handled in round-about way in #2746

@bep bep closed this as completed Dec 1, 2016
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants