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

Header items dissapear if they do not start with capital letter in site.yaml #358

Open
goblinfactory opened this issue Sep 12, 2024 · 3 comments
Labels
bug nuekit Related to nuekit package

Comments

@goblinfactory
Copy link
Contributor

Header items dissapear if they do not start with capital letter in site.yaml

  1. From starter simple-blog edit site.yaml, and alternatively set navigation item, "Emma Bennet" to "emma" or "Emma" and observe that the header item dissapears when it's not capitilised.
header:
  navigation:
    - emma Bennet: /
    - Contact: /contact/

footer:
  copyright:
    - © Emma Bennet: /

Environment

  • OS: OSX
  • Nuekit Version: ✓ Nue 1.0.0-beta.2 • Bun 1.1.27

Minimal Reproduction

Logs & Additional Context

@nobkd nobkd added the nuekit Related to nuekit package label Sep 12, 2024
@nobkd
Copy link
Collaborator

nobkd commented Sep 12, 2024

Thanks for the bug report.

I'd suspect this line, but I haven't read through this code, so feel free to propose a fix yourself.

if (char == char.toUpperCase() && keys.length == 1) {

@goblinfactory
Copy link
Contributor Author

@nobkd that looks suspiciously like a convention over configuration where lowercase is reserved for Hidden items, perhaps javascript usage? before removing that line I'd chase down the original commit / author / blame etc and-or see if anyone can remember why it's like that? ;D

It's ok for now; however personally I'm a huge fan of lowercase text wherever possible and can expect that to come back and bite me later; regardless of whether we always use capital letters in link text or not, having that forced on us looks like a bad bug waiting to happen.

@nobkd
Copy link
Collaborator

nobkd commented Sep 13, 2024

@tipiirai did you do this, to have keys that are lowercase to stay keys and Uppercase items get transformed?

{faq: '/faq/'} -> {faq: '/faq'}
{Faq: '/faq/'} -> {text: 'Faq', url: '/faq/'}

(It's always possible to use text-transform: lowercase css, to have lowercase items in the nav...)

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

No branches or pull requests

2 participants