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

titleCaseStyle #203

Closed
1414C opened this issue Dec 9, 2018 · 4 comments
Closed

titleCaseStyle #203

1414C opened this issue Dec 9, 2018 · 4 comments
Labels

Comments

@1414C
Copy link

1414C commented Dec 9, 2018

I created a new entry in my config.toml file to specify titleCaseStyle = "Chicago" in an effort to prevent the capitalization of every character in the single page titles. This didn't appear to have any effect.

For example, I have a single page setup as follows:


title: "This is a Sample Title"
date: 2018-12-07T16:48:02-07:00
weight: 11
draft: true

I added the following to my config.toml file:

titleCaseStyle = "Chicago"

The title renders as: 'THIS IS A SAMPLE TITLE', rather than 'This is a Sample Title'.

My understanding looking at the chapter.md and default.md archetypes is that the Hugo title function is being applied to the .Name provided in my templates? I don't really know much about this sort of thing however, so my question is: How can I control the capitalization settings for the single page 'title:' variable?

thanks!

@matalo33
Copy link
Contributor

The only reference I can see to titleCaseStyle is this gohugo commit from 2017.

Is it actually a documented feature? Does it work correctly in other themes?

@1414C
Copy link
Author

1414C commented Dec 10, 2018

Hi Matt. You are correct - titleCaseStyle does not appear in the latest revision of the official Hugo docs. I was looking at this tutorial which must not be current.

so..... I hate to ask, but is there a way to change the page titles to mixed case? I am using your template to document an API and it would be very nice if the page titles rendered using the exact case used in the page's title.

i.e.
title: "PublicDB.DropIndex"

Thanks for looking at this - I understand and appreciate that you are doing this on your own time.

@matalo33
Copy link
Contributor

matalo33 commented Dec 21, 2018

This uppercase transformation is actually performed by style.css

h1 {
    text-transform: uppercase;

You should override this value on your website to be none.

@feichaoyu
Copy link

feichaoyu commented May 18, 2019

theme.css

h1 {
    font-family: "", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
    text-align: center;
    text-transform: none;
    color: #222;
    font-weight: 200;
}

like this!

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

No branches or pull requests

3 participants