Custom Hexo Tag Helpers
Apart from the tag helpers supported by Hexo natively, as described in Hexo Built-in Tag Helpers, Icarus also offers several other useful tag helpers to customize the display of your content.
Message
Message blocks are a colorful way to emphasize part of text in your post. Its syntax is defined as follows:
1 | {% message color:<color> size:<size> icon:<icon> title:<title> %} |
color
The color of message block. It is optional. Available values and their examples are:
size
The size of message block. It is optional. Available values and their examples are:
icon
The icon shown in the message block header. It is optional. The value should be valid FontAwesome icon class name. If the icon class name contains space(s), this option and its value should be wrapped with quotes.
title
Title of the message block. It is optional. If the title contains space(s), this option and its value should be wrapped with quotes.
Tabs
The tabs tag helper is a powerful tool to display parallel content. Only content in the active tab can be displayed to the user at a time. Its syntax is defined as follows:
1 | {% tabs size:<size> align:<align> style:<style> %} |
Tab Container
A tab container has the following options:
size
Size of the tabs. It is optional. Available values and their examples are:
This is tab 1 of a tab container when size
is not specified.
This is tab 2 of a tab container when size
is not specified.
align
Alignment of the tab buttons. It is optional. Available values and their examples are:
This is tab 1 of a tab container when align
is not specified.
This is tab 2 of a tab container when align
is not specified.
style
Style of the tab buttons.
It is optional.
Additionally, you can combine the style with fullwidth
alignment.
Available values and their examples are:
This is tab 1 of a toggle-rounded
tab container.
This is tab 2 of a toggle-rounded
tab container.
This is tab 1 of a fullwidth
boxed
tab container.
This is tab 2 of a fullwidth
boxed
tab container.
This is tab 1 of a fullwidth
toggle
tab container.
This is tab 2 of a fullwidth
toggle
tab container.
This is tab 1 of a fullwidth
toggle-rounded
tab container.
This is tab 2 of a fullwidth
toggle-rounded
tab container.
Tab
A tab has the following options:
id
The unique identifier of the tab element. It is required. An ID of a tab should be unique across the entire page so that Icarus can location the right tab content to show or hide.
active
Whether the current tab element is shown. It is optional. Only one tab can be active at a time for a tab group.
icon
The icon shown in the tab button. It is optional. The value should be valid FontAwesome icon class name. If the icon class name contains space(s), this option and its value should be wrapped with quotes.
This tab has an icon of "icon:fa-brands fa-github"
.
This tab has an icon of "icon:fa-brands fa-node-js"
.
This tab has an icon of "icon:fa-brands fa-github"
.
This tab has an icon of "icon:fa-brands fa-node-js"
.
title
Title of the tab button. It is required. If the title contains space(s), this option and its value should be wrapped with quotes.
This tab has a title ("title:Tab with title"
).
This tab also has a title ("title:Tab also with title"
).
Custom Hexo Tag Helpers
http://ppoffice.github.io/hexo-theme-icarus/uncategorized/custom-hexo-tag-helpers/