Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Configuration

Alexandre ZANNI edited this page May 24, 2020 · 13 revisions

Let's take a look at an example configuration file:

# Use 4 spaces instead of tab, if you got error.
# Menus
menu:
    Home: /
    # Delete this row if you don't want categories in your header nav bar
    Categories:
    About: /about/index.html

# Customize
customize:
    logo:
        width: 165
        height: 60
        url: images/logo-header.png
    theme_color: '#006bde'
    highlight: androidstudio
    sidebar: left # sidebar position, options: left, right
    thumbnail: true # enable posts thumbnail, options: true, false
    favicon: # path to favicon
    social_links: # for more icons, please see http://fontawesome.io/icons/#brand
        twitter: /
        facebook: /
        stack-overflow: /
        github: https://github.com/ppoffice/hexo-theme-hueman
        weibo: /
        rss: /

# Widgets
widgets:
    - catalog
    - recent_posts
    - category
    - archive
    - tag
    - tagcloud
    - links
#    - google_adsense

# Search
search:
    insight: true # you need to install `hexo-generator-json-content` before using Insight Search
    swiftype: # enter swiftype install key here
    baidu: false # you need to disable other search engines to use Baidu search, options: true, false

# Comment
comment:
    disqus: hexo-theme-hueman # enter disqus shortname here
    duoshuo: # enter duoshuo shortname here
    youyan: # enter youyan uid here
    facebook: # enter true to enable
    isso: # options for isso. All fields below are OPTIONAL (except for site). See https://posativ.org/isso/docs/configuration/client/ for more information.
        on: # enter true to enable isso
        site: # enter the domain name of your own comment isso server, eg. comments.example.com
        lang: # two letter language code, eg. en
        reply-to-self: # true when your server spam guard has this value set
        require-author: # true when your server spam guard has this value set
        require-email: # true when your server spam guard has this value set
        max-comments-top: # number of top level comments to show, specify "inf" for all
        max-comments-nested: # number of nested comments to show.
        reveal-on-click: # number of comments to reveal when clicking "hidden" link
        avatar: # true|false, setting to enable avatar generation
        avatar-bg: # background color of avatar, i.e. "#f0f0f0"
        avatar-fg: # set pallet of foreground colors (up to 8) i.e. "#9abf88 #5698c4 #e279a3 #9163b6"
        vote: # true|false, setting to enable voting feature on client side.
        vote-levels: # levels to customize appearance of comments, eg. "[-5, 5, 15]" or "0,5,10"
    changyan:
        appId: # enter the changyan appId here
        appKey: # enter the changyan appKey here
        on: # enter true to enable
    valine: # Valine Comment System https://github.com/xCss/Valine
        on:  # enter true to enable valine
        appId:  # enter the leancloud application appId here
        appKey:  # enter the leancloud application appKey here
        notify: # enter true to enable <Mail notifier>, default: false; https://github.com/xCss/Valine/wiki/Valine-%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9F%E4%B8%AD%E7%9A%84%E9%82%AE%E4%BB%B6%E6%8F%90%E9%86%92%E8%AE%BE%E7%BD%AE
        verify: # enter true to enable <Validation code>, default: false
        placeholder: Just Do It # enter the comment box placeholder
        avatar: identicon # (''/mm/identicon/monsterid/wavatar/retro/hide), more to see https://valine.js.org/avatar.html
        avatar_cdn: https://gravatar.loli.net/avatar/ # avatar CDN address, default gravatar.cat.net
        pageSize: 10 # comments of one page
        visitor: true # count reading numbers; If true, the numbers will also show below the title of every post
        recordip: #false # If true, record commenter's ip, which is shown in LeanCloud pannel
    gitalk:
        on: # enter true to enable gitalk
        owner: # GitHub user name
        repo: # GitHub repository name
        client_id: # OAuth application client id
        client_secret: # OAuth application client secret
        admin: # GitHub repo owner and collaborators who can initialize github issues
               # Can either be a string or an array.

# Share
share: default # options: jiathis, bdshare, addtoany, default

# Plugins
plugins:
    lightgallery: true # options: true, false
    justifiedgallery: true # options: true, false
    google_analytics: # enter the tracking ID for your Google Analytics
    google_adsense:
      publisher_id: # enter the adsense publisher ID (pub-XXXXXXXXXXXXXXX) for your google adsense
      ad_slot: # the id of your add unit
    baidu_analytics: # enter Baidu Analytics hash key
    bing_site_verification: # enter Bing verification key here
    statcounter:
      sc_project: # enter statcounter project id
      sc_invisible: # enter 1 to make statcounter invisible
      sc_security: # enter security code
      public: # enter true if you want a link to your public stats. Must be configured on statcouter as well.
      on: # enter true to enable statcounter
    mathjax: false # options: true, false
    counter: false # for post words count and time of reading, need hexo-wordcount: https://github.com/willin/hexo-wordcount
    cookie_consent: false
    twitter_conversion_tracking:
      enabled: false
      pixel_id: ''

# Miscellaneous
miscellaneous:
    open_graph: # see http://ogp.me
        fb_app_id:
        fb_admins:
        twitter_id:
    links:
        Hexo: http://hexo.io

poweredby: true

These configurations will be explained in the following chapters:

Clone this wiki locally