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

推荐订阅源

D
DataBreaches.Net
Engineering at Meta
Engineering at Meta
AI
AI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
F
Fortinet All Blogs
T
Threat Research - Cisco Blogs
B
Blog
K
Kaspersky official blog
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
U
Unit 42
NISL@THU
NISL@THU
D
Docker
Vercel News
Vercel News
C
Check Point Blog
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
C
CERT Recently Published Vulnerability Notes
J
Java Code Geeks
Hugging Face - Blog
Hugging Face - Blog
Latest news
Latest news
Martin Fowler
Martin Fowler
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
Know Your Adversary
Know Your Adversary
A
Arctic Wolf
L
LINUX DO - 热门话题
IT之家
IT之家
SecWiki News
SecWiki News
博客园 - 【当耐特】
Schneier on Security
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
P
Proofpoint News Feed
N
News and Events Feed by Topic
S
Security @ Cisco Blogs
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
爱范儿
爱范儿
罗磊的独立博客
C
Cyber Attacks, Cyber Crime and Cyber Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Cloudbric
Cloudbric
O
OpenAI News
V
V2EX
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

Icarus

Getting Started with Icarus Icarus User Guide - Configuring the Theme Cyberpunk Theme Variant Upgrade Guide Custom Hexo Tag Helpers 自定义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用户指南 - 主题配置 常见问题 升级指南
FAQ
PPOffice · 2020-02-02 · via Icarus

The article answers some frequently asked questions about Icarus. If your question is not answered here, you can also refer to Icarus User Guide, Hexo documentation, and GitHub Issues. Additionally, you may find help from other Icarus users on GitHub Discussions.

Site

I can't generate my site. / I met some errors when I generate my site.

Icarus 5 runs on Node.js 12.4.0 or a newer version. It also requires Hexo 6.0.0 or a newer version. Apart from that, make sure you have all the Node.js dependencies installed. You can find them in the dependencies section of the <icarus_directory>/package.json file. Also, remove all unused Node.js dependencies from your site, or they may cause strange problems to Icarus.

How do I change the language of my site?

Open the site configuration file _config.yml under the root directory. Change the following setting:

_config.yml
1
2
- language: en
+ language: <language_name>

You can find all available translations under the <icarus_directory>/languages directory. The <language_name> is the translation file name without the .yml extension.

Layout

How do I change the page width? How do I use the one/two/three-column layout?

To change the page width, edit the style file <icarus_directory>/include/style/responsive.styl. It defines the container width under different screen sizes.

To change the width of the widgets or main content, edit <icarus_directory>/layout/common/widgets.jsx and <icarus_directory>/layout/layout.jsx. Find the CSS class names like is-12, is-8-tablet, and is-4-widescreen in these files. The number in the class names marks the number of columns a widget or main content takes. The screen size after the number, such as tablet and widescreen, refers to the condition when the column sizes take effect. Change the number in the class names such that the column count of main column and widget column(s) add up to 12 under the same screen size.

For example, to have the main content column wider on widescreen, you can make the following changes:

<icarus_directory>/layout/layout.jsx >folded
1
2
3
4
5
6
7
8
 <div class={classname({
column: true,
'order-2': true,
'column-main': true,
'is-12': columnCount
- 'is-8-tablet is-8-desktop is-8-widescreen': columnCount === 2,
+ 'is-8-tablet is-8-desktop is-9-widescreen': columnCount === 2,
'is-8-tablet is-8-desktop is-6-widescreen': columnCount
<icarus_directory>/layout/common/widgets.jsx >folded
1
2
3
4
5
6
7
 function getColumnSizeClass(columnCount) {
switch (columnCount) {
case 2:
- return 'is-4-tablet is-4-desktop is-4-widescreen';
+ return 'is-4-tablet is-4-desktop is-3-widescreen';
case 3:
return 'is-4-tablet is-4-desktop is-3-widescreen';

You can refer to Bulma documentation for more details on the column system.

Here are some tips for creating a one/two/three-column layout:

  • You can remove all widgets from your theme configurations to create a one-column layout.
  • You can move all your widgets to the same side of the page to create a two-column layout.
  • You can place widgets on both sides of the page to create a three-column layout.

To change the layout for a single or all posts/pages, refer to Configuration Files and Priority.

Where are the layout files for widgets/comments/share...? How do I customize built-in widgets/comments/share...?

The layout files for plugins and widgets have been moved to a separate Node.js package called hexo-component-inferno. This help theme developers better reuse common components across different themes and make overriding these components easy for average users.

To customize these components, copy the layout files from the hexo-component-inferno repository and place them in the corresponding directories under <icarus_directory>/layout. For example, if you want to customize the Valine comment plugin, you can copy src/view/comment/valine.jsx from the hexo-component-inferno repository to <icarus_directory>/layout/comment/valine.jsx. Also, remember to fix Node.js imports like the following:

<icarus_directory>/layout/comment/valine.jsx
1
2
- const { cacheComponent } = require('../../util/cache');
+ const { cacheComponent } = require('hexo-component-inferno/lib/util/cache');

Finally, hexo clean your site before regenerating the HTML.

Similarly, you can override static files like asset/js/insight.js in the same way.

Why don't my layout changes take effect when I refresh the page (assuming I am running the hexo server?

Icarus caches the layout files when you start the local Hexo server with the hexo server command. To make the layout changes take effect, restart the local server.

Other times some intermediate data may be cached by Hexo in the memory or db.json database. Execute hexo clean before running hexo server or hexo generate should resolve this issue.

Content

My images are not showing up. / My images only show in index pages but not in posts.

Make sure you use the absolute paths to your images. For example, your site is in a subdirectory of your domain name like https://ppoffice.github.io/hexo-theme-icarus and your image image.jpg under source/gallery/. You should include your image like this: /hexo-theme-icarus/gallery/image.jpg.

You can also use Hexo’s {% img %} tag like the following to include an image automatically:

1
{% img /gallery/image.jpg "Image title" %}

In this case, you may omit the subdirectory from your image path. You can refer to Hexo documentation for more details.

How to add an excerpt for a post? How to display the "Read more" button?

Put a <!-- more --> tag in your post. Post content before this tag will be marked as an excerpt. Content after this tag will not show up on index pages.

You can also specify a custom excerpt in the post’s front-matter.

some-post.md
1
2
3
4
5
title: Some Post
date: 2020-01-01
excerpt: This is an article about ...
---

How do I encrypt my posts?

Use third-party Hexo plugins such as hexo-blog-encrypt.

How do I use those fancy elements in this article for my posts?

Refer to Bulma documentation for all available elements and styles. Copy the HTML snippets and put them in your Markdown files directly.

How can I get rid of those red alerts that are showing on the page and warning me of configuration value not set?

Those alerts usually show up when you miss out on some plugin or widget configurations. If you don’t want to enable a certain plugin or widget, delete it or comment it out from your theme configurations.

For example, you can disable the comment plugins by commenting out the following lines:

_config.icarus.yml
1
2
3
4
5
6
- comment:
- type: disqus
- shortname:
+ # comment:
+ # type: disqus
+ # shortname:

Something wrong with this article? Click here to submit your revision.

Vector Landscape Vectors by Vecteezy