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

推荐订阅源

N
Netflix TechBlog - Medium
G
Google Developers Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
L
LangChain Blog
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
小众软件
小众软件
WordPress大学
WordPress大学
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
美团技术团队
Jina AI
Jina AI
T
Tailwind CSS Blog
Google DeepMind News
Google DeepMind News
D
Docker

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").