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

theme: adjust breadcrumb and title for empty home page titles #202

Closed
McShelby opened this issue Feb 24, 2022 · 4 comments
Closed

theme: adjust breadcrumb and title for empty home page titles #202

McShelby opened this issue Feb 24, 2022 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@McShelby
Copy link
Owner

Good morrow!

I've changed the authoring in the showcase. Because it is centered on the theme's usage, I omit links to the authors (also the heading would get to crouded with links).

Yup I get the reasoning. In that case, would you be so kind and adapt it to NEONsys.org? It is what I am using in case hyperlinking is not possible, eg in the license file.

Looks spiffy

Thank you! Would you mind helping me out with some last, still unresolved issues?

  1. Redundant artifact in breadcrumb bar:
    relearn_breadcrumb

Since the beginning I always having that starting > in my breadcrumb bar. I find it unnecessary and would like to get rid of it :) I saw that your example page does not exhibit this behaviour, so I wonder what causes it.

  1. Selector in front of title, even on main page:
    relearn_selector
    Huh now that I think of it, maybe those two issues are related? Your exampleSite also does not show this behaviour.

Originally posted by @Nuc1eoN in #175 (comment)

@McShelby
Copy link
Owner Author

@Nuc1eoN: I'll take a look into this. Most likely something special with your site configuration that is not correctly handled by the theme.

@McShelby
Copy link
Owner Author

@Nuc1eoN: The reason for this is, that your home page (your content/_index.md does not have a title. I am not sure if this is a good idea in general as a lot of other functionality in the theme uses the title for various stuff.

Please note that therefore all non home pages are treated as hidden if they don't provide a title! This is a specific feature of the Relearn theme.

@McShelby
Copy link
Owner Author

I've made a fix to breadcrumbs and titles to fix this special case. This will only work for the home page as all other pages without a title are treated as hidden.

So the fix is this: If no title is set, the site`s title is used.

If the page title is equal to the site's title, only the site title will be printed without the titleSeparator.

Nevertheless I advise you to give a title to all pages. In case of the home page, just give it the same title as the title parameter from your config.toml.

In a multilang installation also the [Languages.en] title should have the same value.

I have fixed this for the exampleSite, so you can look at the patch to see in which locations you may need to fix this.

@McShelby McShelby changed the title theme: adjust breadcrumb and title separator theme: adjust breadcrumb and title for empty home page titles Feb 24, 2022
@McShelby McShelby self-assigned this Feb 24, 2022
@McShelby McShelby added the bug Something isn't working label Feb 24, 2022
@McShelby McShelby added this to the 3.0.4 milestone Feb 24, 2022
@Nuc1eoN
Copy link

Nuc1eoN commented Feb 25, 2022

Ahh I never would have guessed. I have added a title now.

But you've also came up with a great fallback behaviour - kudos!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants