-
Notifications
You must be signed in to change notification settings - Fork 50
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
Tags not hyphenated consistently #65
Comments
Did you define the title of the binary-search page in content/tags/binary-search/_index.md to be "Binary Search"? |
No I did not. The
Where the first
and
|
By menu section, do you mean the home page or a section list page, or something else? |
Have you configured categories, tags, and authors as taxonomies in hugo.toml? |
On the Paige website, "Content" would be a menu section, "Layouts" would be another menu sections, etc.
Yes I have - at the bottom of
|
I don't understand what you mean by a page having a sliding-window tag displaying that tag as Sliding-Window in the menu. Page tags aren't displayed in the menu. |
The content menu section is configured in a way that displays the title and description of every page in content. So there's a title like "Markdown Syntax Guide" and its description "Sample article showcasing basic Markdown syntax and formatting for HTML elements." If this configuration is changed from:
to
the authors and keywords (tags and categories) will also be displayed for "Markdown Syntax Guide" and other pages below their description. So tags on single pages would be displayed in the content menu section. |
OK, so you're talking about the tags displayed below the title and description in the home and section pages. In Hugo parlance, content/_index.md is the home page, and content/sections/_index.md (any content/**/_index.md file excluding content/_index.md) is a section page. See https://gohugo.io/getting-started/glossary/#section-page. In Hugo parlance, in some contexts, "section page" and "list page" can be interchangeable. See https://gohugo.io/getting-started/glossary/#list-page. In Paige parlance, the menu is the optional horizontal list of links at the top of the page like Home, Content, Layouts, Search, etc. Paige doesn't control the capitalization of taxonomy terms like tag values. It looks like Hugo capitalizes words in taxonomy terms automatically. If you want to customize what's displayed, you can set the title in content/$taxonomy/$term/_index.md. Give "sliding-window" and get "Sliding-Window", "binary search" and "Binary Search", "foo_bar" and "Foo_bar" (apparently it considers x_y one word). Note that if you give "binary search" or "Binary Search", it will still map to binary-search. I suspect you have "binary search" or "Binary Search" in your front matter. |
Gotcha.
Thanks! I created
and got around it.
Nope, I hyphenate text in tags, categories, and authors. I still don't understand why tag |
"Sliding-Window" is consistent with the rules I described:
I don't understand why you're seeing "Binary Search" either. Can you point me to your code? |
Closing this as complete. Thanks for the suggestion Will ! |
Did you find the cause of "Binary Search"? |
Nope, but I got around it thanks to your suggestion. I'm also unable to reproduce this on a fresh site, i.e., everything is hyphenated. |
Glad you were able to get unblocked. |
Answer: https://discourse.gohugo.io/t/are-term-capitalization-rules-documented-somewhere/50139/2?u=will See: https://gohugo.io/getting-started/configuration/#capitalizelisttitles And: https://gohugo.io/getting-started/configuration/#configure-title-case
|
Thanks a lot ! |
I noticed that when a front matter has:
it is displayed as
Sliding-Window
in the menu section.But front matter containing
is displayed as
Binary Search
in the menu section.Clicking on both these pills goes to their expected URL of
localhost:1313/tags/sliding-window
andlocalhost:1313/tags/binary-search
.Edit
I can see that every tag except
Binary Search
has a hyphen between words.Additionally, hyphenation between words is present in
tags
andcategories
but notauthors
. I think there shouldn't be hyphens between words in tags and categories (as is the case with authors), i.e.,Binary Search
is being displayed correctly butSliding-Window
is not.The text was updated successfully, but these errors were encountered: