hexo-theme-hiker
hexo-theme-hiker copied to clipboard
New item in Menu shows first character lower case
If I add an item to the menu in _config.yaml, visually the item shows up all in lowercase. Archive, Tags, Categories, etc. all show up with the first letter Uppercase but anything else shows up lowercase. No idea why and I've been trying to find out where in the code it's causing this issue but I cannot find it.
Hi, @MayankTahil
Thanks for your interesting, Custom menu item showing up lowercase caused by this code, in file layout/_partial/header.ejs
:
222 <div class="intro-navigate">
223 <p class="navigater-list">
224 <% for (var i in theme.menu){ %>
225 <a id="beautifont" class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= __(i.toLowerCase()) %></a>
226 <% } %>
227 </p>
228 </div>
In the line 225, in order to support multiple languages, we have to use every menu item's lowercase to match various languages' relevant string in those .yml
files in the languages/
directory.
So you could change these line of code according to your needs. :smile: And I will be grateful if you create a Pull Request after your optimization.