hexo-theme-icarus/source/_posts/theme/Configuring-Icarus.md

3.2 KiB

title: Configuring Icarus date: 2018-10-22 19:23:58 thumbnail: /gallery/plant.jpg categories:

  • Configuration
  • Theme tags:
  • Getting Started

The configuration of Icarus consists of two parts: theme configuration and post configuration.

Theme Configuration

Icarus uses the _config.yml file under your theme directory for global page layout, plugins and widgets settings that are effective across the whole blog. On startup, Icarus will check the existence of this configuration file and creates it for you automatically if file is not found. It will also validate this file against the specifications if it is already there. You can check the specifications at anytime from the *.spec.js files inside the themes/icarus/includes/specs folder.

A default theme configuration consists of the following parts:

  • Site preference and page meta data
  • Top navigation bar links
  • Page footer links
  • Article display settings
  • Comment, share, and search plugin settings
  • Sidebar widget settings
  • Other display and analytics plugins
  • CDN settings

Most of the settings are documented in the _config.yml file. And for more details, you can refer to the online documentation.

Post Configuration

Apart from the global theme configuration, you can also customize any settings in a specific post. That is, you can override the theme settings from a post. Let's say you want to show different navigation bar menus in a post, we can simply put the navbar settings in the post's front-matter:

navbar:
    menu:
        Home: /
        Special!: /special

This will replace your default navbar menu settings only in this post. This feature can be useful if you want to tune your page for a specific type of audience, such as enabling faster CDN and comment service based on the country and language of the viewer.

Alex Holt