惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
B
Blog
IT之家
IT之家
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
量子位
博客园 - 叶小钗
T
Tailwind CSS Blog
小众软件
小众软件
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
雷峰网
雷峰网
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Blog — PlanetScale
Blog — PlanetScale
V
V2EX
博客园_首页
I
InfoQ
B
Blog RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog

Icarus

Getting Started with Icarus Icarus User Guide - Configuring the Theme FAQ Cyberpunk Theme Variant Upgrade Guide 自定义Hexo标签插件 Hexo Built-in Tag Helpers Icarus User Guide - CDN Providers Icarus User Guide - Comment Plugins Icarus User Guide - Donation Buttons Icarus User Guide - Other Plugins Icarus User Guide - Share Buttons Icarus User Guide - Search Plugin Icarus User Guide - Web Analytics Plugins Icarus User Guide - Widgets Icarus快速上手 Icarus用户指南 - 主题配置 常见问题 升级指南
Custom Hexo Tag Helpers
PPOffice · 2018-01-02 · via Icarus

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.

The following tag helpers are provided by ppoffice/hexo-component-inferno. Please refer to it for a complete list of supported helpers and their configuration details.

Message

Message blocks are a colorful way to emphasize part of text in your post. Its syntax is defined as follows:

1
2
3
{% message color:<color> size:<size> icon:<icon> title:<title> %}
<content>
{% endmessage %}

color

The color of message block. It is optional. Available values and their examples are:

A message block when color is not specified.

A dark message block.

A primary message block.

A info message block.

A success message block.

A warning message block.

A danger message block.

size

The size of message block. It is optional. Available values and their examples are:

A small message block.

A message block when size is not specified.

A medium message block.

A large message block.

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.

A message with "icon:fa-brands fa-github" as icon.

A message with "icon:fa-brands fa-node-js" as icon.

A message with "icon:fa-brands fa-npm" as icon.

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.

A message block with a title ("title:Message block with title").

A message block without a title.

A message block without a title.

A message block without a title.

A message block without a title.

A message block without a title.

A message block without a title.

A message block without a title.

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
2
3
4
5
6
7
8
9
{% tabs size:<size> align:<align> style:<style> %}
<!-- tab id:<tab_id> icon:<icon> title:<tab_title> active -->
<content>
<!-- endtab -->
<!-- tab id:<tab_id> icon:<icon> title:<tab_title> -->
<content>
<!-- endtab -->
...
{% endtabs %}

Tab Container

A tab container has the following options:

size

Size of the tabs. It is optional. Available values and their examples are:

  • Tab 1

  • Tab 2

This is tab 1 of a small tab container.

This is tab 2 of a small tab container.

  • Tab 1

  • Tab 2

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.

  • Tab 1

  • Tab 2

This is tab 1 of a medium tab container.

This is tab 2 of a medium tab container.

  • Tab 1

  • Tab 2

This is tab 1 of a large tab container.

This is tab 2 of a large tab container.

align

Alignment of the tab buttons. It is optional. Available values and their examples are:

  • Tab 1

  • Tab 2

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.

  • Tab 1

  • Tab 2

This is tab 1 of a centered tab container.

This is tab 2 of a centered tab container.

  • Tab 1

  • Tab 2

This is tab 1 of a right tab container.

This is tab 2 of a right tab container.

  • Tab 1

  • Tab 2

This is tab 1 of a fullwidth tab container.

This is tab 2 of a fullwidth tab container.

style

Style of the tab buttons. It is optional. Additionally, you can combine the style with fullwidth alignment. Available values and their examples are:

  • Tab 1

  • Tab 2

This is tab 1 of a boxed tab container.

This is tab 2 of a boxed tab container.

  • Tab 1

  • Tab 2

This is tab 1 of a toggle tab container.

This is tab 2 of a toggle tab container.

  • Tab 1

  • Tab 2

This is tab 1 of a toggle-rounded tab container.

This is tab 2 of a toggle-rounded tab container.

  • Tab 1

  • Tab 2

This is tab 1 of a fullwidth boxed tab container.

This is tab 2 of a fullwidth boxed tab container.

  • Tab 1

  • Tab 2

This is tab 1 of a fullwidth toggle tab container.

This is tab 2 of a fullwidth toggle tab container.

  • Tab 1

  • Tab 2

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.

  • GitHub
  • 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".

  • GitHub
  • 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.

  • Tab with title

  • Tab also with title

This tab has a title ("title:Tab with title").

This tab also has a title ("title:Tab also with title").