Menu
The menus in Aurora theme can be highly customized in the theme _config.aurora.yml file.
Default Menus
Aurora is packed with three styled pages, about page, tags page and archives page.
Home page and About page are enabled by default, where tags page and archives page can be configured in the menu section of the theme config file.
menu:
About: false
Tags: true
Archives: truemenu:
About: false
Tags: true
Archives: trueYou can also set any of the above to false to disable certain page you don't want.
Custom Menus
Other than the default pages packed with Aurora, we can also add in any pages or external links to our main menus.
External Link
For example, if we want to add a external link to your github project, you can do that by configuring your menu like this:
menu:
Tags: true
Archives: true
# External link for a github repo
Aurora:
name: 'Aurora'
path: 'https://github.com/Aurora/hexo-theme-Aurora'menu:
Tags: true
Archives: true
# External link for a github repo
Aurora:
name: 'Aurora'
path: 'https://github.com/Aurora/hexo-theme-Aurora'Since v1.4.3, external link also supports mailto links. Which will bring your user to their email page for sending out an email.
menu:
Tags: true
Archives: true
# External link for a github repo
Email:
name: 'Mail Me'
path: 'mailto:[email protected]'menu:
Tags: true
Archives: true
# External link for a github repo
Email:
name: 'Mail Me'
path: 'mailto:[email protected]'Nested Links
Sometime you would want to group a set of links into a sub-menu. The good news is Aurora also support nested links. To create a nested link, all we have to do is add in a children property to the menu.
For example we want to have a projects menu, which include all the projects links as sub-menu links. This is how you would configure it:
menu:
Tags: true
Archives: true
# Nested projects menu
projects:
name: 'Projects'
children:
obsidian:
name: 'Obsidian Theme'
path: 'https://github.com/tridiamond/hexo-theme-obsidian'
Aurora:
name: 'Aurora Theme'
path: 'https://github.com/Aurora/hexo-theme-Aurora'menu:
Tags: true
Archives: true
# Nested projects menu
projects:
name: 'Projects'
children:
obsidian:
name: 'Obsidian Theme'
path: 'https://github.com/tridiamond/hexo-theme-obsidian'
Aurora:
name: 'Aurora Theme'
path: 'https://github.com/Aurora/hexo-theme-Aurora'NOTE
The parent link of a nested link won't need a path property, because if it's clicked it will not activate a page jump.
Even if you set a path for the parent link, the path link will be ignored.
Internal Link
TIP
Internal links can be added with a custom page. Please refer to the Page section of the document for usage details.
Multi-language Menu
Since the theme has I18n multi-language support, therefore the menu name also support multi-language setup. So far the theme support English and Chinese translations for the menu. (Will support more in the near future.)
To setup multi-language for the menu, all we have to do is configure the i18n property.
This property has 2 options:
zh-CN- for Simplify Chinesezh-TW- for Traditional Chineseen- for English
Setup Custom Multi-language name for default menus
Default menus like Tags, Archives, About and Links pages, we can also config them so they support custom multi-languages.
Here is an example for setting up an i18n config for the Tags page.
menu:
Tags:
i18n:
en: My Tags
zh-CN: 我的标签
Archives: truemenu:
Tags:
i18n:
en: My Tags
zh-CN: 我的标签
Archives: trueMulti-language for custom pages
For example you want to add a menu call contact, this is how to want to configure it.
menu:
Tags: true
Archives: true
# Multi-language Contact menu
contact:
name: 'Contact'
i18n:
zh-CN: '联系我'
en: 'Contact'
path: 'http://domain.com/contact'menu:
Tags: true
Archives: true
# Multi-language Contact menu
contact:
name: 'Contact'
i18n:
zh-CN: '联系我'
en: 'Contact'
path: 'http://domain.com/contact'
Hexo Aurora Docs