Naming sections and folders #1176

Closed
oskarrough opened this Issue May 28, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@oskarrough

Hi, was asked to open an issue here. I'll copy/paste from http://discuss.gohugo.io/t/naming-sections-and-folders/1246.


I have a book structure of content. Some articles are in a section folder named 'Fish and Chips'. When you run Hugo 0.14 it generates a:

fish-and-chips/index.html file which is what I expect.

But all articles inside are generated as:

Fish and Chips/some-article/index.html

And on _default/section.html the var {{.Title}} gives you a third convention: Fish-And-Chips.

How do you approach this? How do I keep section folder names, their titles and url structure intact?

Thank you!

@bep bep added the Bug label May 28, 2015

@bep bep added this to the v0.15 milestone May 28, 2015

@bep bep self-assigned this May 28, 2015

bep added a commit to bep/hugo that referenced this issue May 28, 2015

Support `Fish and Chips` section
Section names are also used as the title of the list pages, but naming section folders as `Fish and Chips` and similar didn't work very well.

This commit Fixes that.

This commit also changes the title casing of the section titles. Some may argue that this is a breaking change, but the old behaviour was also pretty broken,
even for languages that use title capitalizations, as it didn't follow any particular style guide, `fish and chips` became `Fish And Chips` etc.

Now it just turns the first letter into upper case, so `Fish and Chips` will be left as `Fish and Chips`.

People wanting the good old behaviour can use the `title` template func.

Fixes #1176

bep added a commit to bep/hugo that referenced this issue May 28, 2015

Support `Fish and Chips` section
Section names are also used as the title of the list pages, but naming section folders as `Fish and Chips` and similar didn't work very well.

This commit Fixes that.

This commit also changes the title casing of the section titles. Some may argue that this is a breaking change, but the old behaviour was also pretty broken,
even for languages that use title capitalizations, as it didn't follow any particular style guide, `fish and chips` became `Fish And Chips` etc.

Now it just turns the first letter into upper case, so `Fish and Chips` will be left as `Fish and Chips`.

People wanting the good old behaviour can use the `title` template func.

Fixes #1176

bep added a commit to bep/hugo that referenced this issue May 28, 2015

Support `Fish and Chips` section
Section names are also used as the title of the list pages, but naming section folders as `Fish and Chips` and similar didn't work very well.

This commit Fixes that.

This commit also changes the title casing of the section titles. Some may argue that this is a breaking change, but the old behaviour was also pretty broken,
even for languages that use title capitalizations, as it didn't follow any particular style guide, `fish and chips` became `Fish And Chips` etc.

Now it just turns the first letter into upper case, so `Fish and Chips` will be left as `Fish and Chips`.

People wanting the good old behaviour can use the `title` template func.

Fixes #1176

bep added a commit to bep/hugo that referenced this issue May 28, 2015

Support `Fish and Chips` section
Section names are also used as the title of the list pages, but naming section folders as `Fish and Chips` and similar didn't work very well.

This commit Fixes that.

This commit also changes the title casing of the section titles. Some may argue that this is a breaking change, but the old behaviour was also pretty broken,
even for languages that use title capitalizations, as it didn't follow any particular style guide, `fish and chips` became `Fish And Chips` etc.

Now it just turns the first letter into upper case, so `Fish and Chips` will be left as `Fish and Chips`.

People wanting the good old behaviour can use the `title` template func.

Fixes #1176

bep added a commit to bep/hugo that referenced this issue May 28, 2015

Support `Fish and Chips` section
Section names are also used as the title of the list pages, but naming section folders as `Fish and Chips` and similar didn't work very well.

This commit Fixes that.

This commit also changes the title casing of the section titles. Some may argue that this is a breaking change, but the old behaviour was also pretty broken,
even for languages that use title capitalizations, as it didn't follow any particular style guide, `fish and chips` became `Fish And Chips` etc.

Now it just turns the first letter into upper case, so `Fish and Chips` will be left as `Fish and Chips`.

People wanting the good old behaviour can use the `title` template func.

Fixes #1176

@bep bep closed this in be7404e May 28, 2015

@dylancarlson dylancarlson referenced this issue in Homebrew/legacy-homebrew Jun 2, 2015

Closed

hugo 0.14 #39815

tychoish added a commit to tychoish/hugo that referenced this issue Aug 13, 2017

Support `Fish and Chips` section
Section names are also used as the title of the list pages, but naming section folders as `Fish and Chips` and similar didn't work very well.

This commit Fixes that.

This commit also changes the title casing of the section titles. Some may argue that this is a breaking change, but the old behaviour was also pretty broken,
even for languages that use title capitalizations, as it didn't follow any particular style guide, `fish and chips` became `Fish And Chips` etc.

Now it just turns the first letter into upper case, so `Fish and Chips` will be left as `Fish and Chips`.

People wanting the good old behaviour can use the `title` template func.

Fixes #1176
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment