Skip to content

Menu & Sidebar icons in 1 line with Keys and Values of this icons. - #1830

Merged
ivan-nginx merged 3 commits into
iissnan:masterfrom
ivan-nginx:master
Aug 28, 2017
Merged

ivan-nginx merged 3 commits into
iissnan:masterfrom
ivan-nginx:master

Conversation

@ivan-nginx

@ivan-nginx ivan-nginx commented Aug 28, 2017 •

Copy link
Copy Markdown
Collaborator

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.
  • Tests for the changes have been added (for bug fixes / features).
  • Docs have been added / updated (for bug fixes / features).

PR Type

What kind of change does this PR introduce?

  • Bugfix.
  • Feature.
  • Code style update (formatting, local variables).
  • Refactoring (no functional changes, no api changes).
  • Build related changes.
  • CI related changes.
  • Documentation content changes.
  • Other... Please describe:

What is the current behavior?

  1. Need to translate each custom menu item.
  2. To menu and sidebar icons u must define icons in case-senstive at separated section.

Issue Number(s): #153, #360, #450, #737, #772, #810, #922, #1015, #1111, #1318, #1492, #1715, #1786, #1806.

What is the new behavior?

  1. No need to translate each custom menu item. If translate not found, Key (name) value will be shown as is (don't forget about UTF-8). Actually commit: 91eb2d2
  2. Menu and sidebar icons now defined in same section where they keys specified.

How to use?

In Next _config.yml:

# When running the site in a subdirectory (e.g. domain.tld/blog), remove the leading slash from link value (/archives -> archives).
# Usage: `Key: /link/ || icon`
# Key is the name of menu item. If translate for this menu will find in languages - this translate will be loaded; if not - Key name will be used. Key is case-senstive.
# Value before `||` delimeter is the target link.
# Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, question icon will be loaded.
menu:
-  home: /
-  #categories: /categories/
-  #about: /about/
-  #archives: /archives/
-  #tags: /tags/
-  #sitemap: /sitemap.xml
-  #commonweal: /404/
+  home: / || home
+  #about: /about/ || user
+  #tags: /tags/ || tags
+  #categories: /categories/ || th
+  #archives: /archives/ || archive
+  #schedule: /schedule/ || calendar
+  #sitemap: /sitemap.xml || sitemap
+  #commonweal: /404/ || heartbeat

# Enable/Disable menu icons.
menu_icons:
  enable: true
- #KeyMapsToMenuItemKey: NameOfTheIconFromFontAwesome		
-  home: home		
-  about: user		
-  categories: th		
-  schedule: calendar		
-  tags: tags		
-  archives: archive		
-  sitemap: sitemap		
-  commonweal: heartbeat

# Social Links.
# Usage: `Key: permalink || icon`
# Key is the link label showing to end users.
# Value before `||` delimeter is the target permalink.
# Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, globe icon will be loaded.
#social:
-  #LinkLabel: Link
+  #GitHub: https://github.com/yourname || github
+  #E-Mail: mailto:yourname@gmail.com || envelope
+  #Google: https://plus.google.com/yourname || google
+  #Twitter: https://twitter.com/yourname || twitter
+  #FB Page: https://www.facebook.com/yourname || facebook
+  #VK Group: https://vk.com/yourname || vk
+  #StackOverflow: https://stackoverflow.com/yourname || stack-overflow
+  #YouTube: https://youtube.com/yourname || youtube
+  #Instagram: https://instagram.com/yourname || instagram
+  #Skype: skype:yourname?call|chat || skype

social_icons:
  enable: true
  icons_only: false
  transition: false
-  # Icon Mappings.
-  # KeyMapsToSocialItemKey: NameOfTheIconFromFontAwesome
-  GitHub: github
-  E-Mail: envelope
-  Google: google
-  Twitter: twitter
-  FB Page: facebook
-  VK Group: vk
-  Skype: skype
-  YouTube: youtube
-  Instagram: instagram
-  StackOverflow: stack-overflow
-  Weibo: weibo

Does this PR introduce a breaking change?

  • Yes.
  • No.

@ivan-nginx ivan-nginx added this to the v5.1.3 milestone Aug 28, 2017
@ivan-nginx
ivan-nginx merged commit a9c21b4 into iissnan:master Aug 28, 2017
hk-mp5a3 pushed a commit to hk-mp5a3/hexo-theme-next that referenced this pull request Oct 11, 2025
Menu & Sidebar icons in 1 line with Keys and Values of this icons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant