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

Unicode foldernames for navigation #32

Closed
rhardih opened this issue Nov 8, 2012 · 1 comment
Closed

Unicode foldernames for navigation #32

rhardih opened this issue Nov 8, 2012 · 1 comment

Comments

@rhardih
Copy link

rhardih commented Nov 8, 2012

If a folder in content contains unicode characters, it fails to match in Page.find on this line of code:

disk_path = Dir["#{path}/*#{search_path}/*.yml"]

I'm not sure how to fix it, but it seems Dir is a bit allergic to this sort of thing.

Example (using bonsai's support content with added folder):

1.9.2-p318 :127 > pp Dir["spec/support/content/*"]
["spec/support/content/1.about-us",
 "spec/support/content/10.many-pages",
 "spec/support/content/2.products",
 "spec/support/content/3.unicode-æøå",
 "spec/support/content/index",
 "spec/support/content/legals",
 "spec/support/content/render"]
1.9.2-p318 :128 > Dir["spec/support/content/*unicode-æøå"]
 => [] 
1.9.2-p318 :129 > Dir["spec/support/content/*about-us"]
 => ["spec/support/content/1.about-us"] 

Since Navigation relies on the the converted foldernames, it means there is no way to have a page with a unicode title.

It seems Ruby has these notorious unicode issues, so perhaps a solution would be, to add a manual override of the default behaviour for extracting navigation items. E.g. in the case of the presence of a specially named .yml file, read the name and title from from that file, instead of inferring it from the parent foldername?

@rhardih
Copy link
Author

rhardih commented Nov 23, 2016

No reply from maintainer.

@rhardih rhardih closed this as completed Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant