Basic Usage

Learn how to configure the basic settings of the Solitude theme.

Site Configuration

Modify various site information, such as title, subtitle, email, and other personal details.

It is recommended to first configure site-related information in the Hexo and theme configurations.

_config.yml
_config.solitude.yml
# Site
title: Fifty-seven # Blog title
subtitle: "" # Subtitle
description: Careful efforts and possession. # Blog description
keywords: Fifty-seven # Blog keywords
author: Fifty-seven # Author name
language: zh-CN # Language
timezone: Asia/Shanghai # Timezone (please check yourself)
All
Box
Menu
Right Button
# Navigation bar
nav:
  # Left Box
  group:
  #  project: # name
  #    Solitude: https://github.com/everfu/hexo-theme-solitude || /img/pwa/favicon.ico # name: url || icon

  # Menu
  menu:
      # Home: / # name: link
      # Library: # name
      #   All Posts: /archives/ || fas fa-folder-closed # item name: link || icon
      #   All Categories: /categories/ || fas fa-clone
      #   All Tags: /tags/ || fas fa-tags
      # Friends:
      #   Moments: /moments/ || fas fa-wifi
      #   Links: /links/ || fas fa-user-group
      #   Treasure Bloggers: javascript:travelling() || fas fa-gift
      # About:
      #   My Equipment: /equipment/ || fas fa-laptop
      #   Online Tools: /tlink/ || fas fa-toolbox
      #   Music Hall: /music/ || fas fa-music

  # Right button
  right:
      random: false # Random article button
      custom:
      #  - name: Travelling
      #    url: https://www.travellings.cn/go.html
      #    icon: fas fa-train
      #    onclick:
      #    id: travellings_button

Homepage Top

All
Recommended List
Top Banner
Group
hometop:
enable: false
banner:
    title: Share Technology<br >and Tech Life # Large text
    desc:
    A person who loves life # Small text
    # - I'm just an ordinary programmer
    # - But I have an extraordinary dream
    # - I hope to change the world
    icon:
    # HTML:
    #   img: https://i.postimg.cc/vBWVnY8q/html.png
    #   color: "#e9572b"
    # JS:
    #   img: https://i.postimg.cc/3N10Ltv2/js.png
    #   color: "#f7cb4f"
    # Docker:
    #   img: https://i.postimg.cc/8Pk6Fg24/docker.png
    #   color: "#57b6e6"
    # Flutter:
    #   img: https://i.postimg.cc/hPC7T3gB/flutter.png
    #   color: "#ffffff"
    # WebPack:
    #   img: https://i.postimg.cc/dVLZBmtT/webpack.png
    #   color: "#2e3a41"
    # Git:
    #   img: https://i.postimg.cc/nhgjwjCS/git.png
    #   color: "#df5b40"
group:
    # Hot: /tags/Fire/ || fas fa-fire || linear-gradient(to right,#f65,#ffbf37)
recommendList:
    enable: true
    sup: Top
    title: Solitude Official Docs
    url: https://solitude.js.org/
    img: /img/default.avif
    color: "none"
All
Settings
Info Card
Table of Contents
Tags
Site Info
# --------------------------- start ---------------------------
# Aside
# Sidebar
aside:
# Values: about (info card), newestPost (latest article), allInfo (website information), newest_comment (latest comment)

# Sticky: Fixed position / noSticky: Not fixed position
home: # on the homepage
    noSticky: "about"
    Sticky: "allInfo"
post: # on the article page
    noSticky: "about"
    Sticky: "newestPost"
page: # on the page
    noSticky: "about"
    Sticky: "newestPost,allInfo"
# Sidebar position (0: left 1: right)
position: 1 # Sidebar positioning (0: left 1: right)

# --------------------------- start ---------------------------
# Information card
my_card:
    author:
    img: /img/logo.png # url
    sticker: # url, 24x24 size
    # Introduction
    description: Only by facing the wind can a kite fly higher.
    # Content
    content: # This is my Blog
    state:
    morning: ✨ Good morning, a new day has begun
    noon: 🍲 Lunch time
    afternoon: 🌞 Good afternoon
    night: Rest early
    goodnight: Good night 😴
    witty_words:
    # - You can do it
    # - You will definitely make it
    # - Good luck, stranger
    # social
    information:
    #  Github: https://github.com/everfu || fab fa-github
    #  Bilibili: https://space.bilibili.com/1329819902 || fab fa-bilibili
# --------------------------- end ---------------------------

# --------------------------- start ---------------------------
# article table of contents
toc:
    post: true
    page: false
    vague: true
# --------------------------- end ---------------------------

# --------------------------- start ---------------------------
# Tags
tags:
    enable: false
    limit: 20 # Number of tags displayed
    # Highlighted tags
    highlight_list:
    # - Hexo
# --------------------------- end ---------------------------

# --------------------------- start ---------------------------
# Site Info
siteinfo:
    # Number of articles
    postcount: true
    # Total number of words
    wordcount: false
    # PV
    pv: true
    # UV
    uv: true
    # Last update date
    updatetime: true
    # Website creation time
    runtimeenable: true
    # Format: yyyy-MM-dd hh-mm-ss
    runtime: "2023-04-20 00:00:00"
# --------------------------- end ---------------------------
# --------------------------- end ---------------------------

Page Configuration

# --------------------------- start ---------------------------
# Page default settings
page:
  # 404 page
  error: true
  # Tags page
  tags: true
  # Categories page
  categories: true
  # list: Sort List / 1: Follow HomeList
  archives: 0
  # Default value
  default:
    # Default image when no cover is set
    cover:
      # - /img/default.png # default cover
# --------------------------- end ---------------------------

Post Configuration

# --------------------------- start ---------------------------
# Post default settings
post:
  default:
    # Default image when no cover is set
    cover:
      # - # default cover
    # Location
    locate: China
    # Copyright
    copyright:
      enable: true
      author: /img/logo.png # url
      # License
      license: CC BY-NC-SA 4.0
      # License link
      licenurl: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh-hans
  # Article Local AI
  ai:
    enable: false
    modelName: 小七 GPT
  # Article meta information
  meta:
    # Release date
    date: false
    # Update date
    updated: false
    # Location
    locate: false
    # Number of words
    wordcount: false
    # uv
    readtime: false
    # pv
    pv: false
    # Comment count
    comment: false
  # Reward
  award:
    enable: false
    appreciators: /about/ # Reward page
    # Reward Title
    title: # Thanks for your appreciation.
    desc: # Because of your support, I realize the value of writing articles.
    # Reward list
    list:
      # - name: Github Sponsor
      #   qcode: https://s3.qjqq.cn/47/661ba900c4bc1.webp!color
      #   url: https://github.com/sponsors/everfu
      #   color: var(--efu-black)

  # Share icon
  share:
    enable: false
    list:
      # - qq
      # - weibo
      # - twitter
      # - facebook
      # - telegram
      # - whatsapp
      # - linkedin
      # - link
      # - qrcode
  rss: # /atom.xml
  # Article cover color extraction
  covercolor:
    enable: false
    # local: local color / api: api color / ave: oss average color
    mode: local
    # api address
    api: https://api.qjqq.cn/api/Imgcolor?img=
    # Storage time
    time: 43200000
  footer:
    enable: false
    desc: # Articles from Ever Fu
    button: # Button
      enable: true
      name: # Learn more
      url: /about/
# --------------------------- end ---------------------------

Theme Color

# --------------------------- start ---------------------------
# Custom Theme Color
theme_color:
  dark: "#ffc848" # dark
  light: "#425AEF" # light
# --------------------------- end ---------------------------

Display Mode

# --------------------------- start ---------------------------
# display mode
display_mode:
  # auto: automatic switching(Recognize the current theme mode of the device) / dark: dark mode / light: light mode
  type: auto
  # After opening, the dark mode will display the starry sky background
  universe: false
# --------------------------- end ---------------------------

Font Configuration

# --------------------------- start ---------------------------
# Font
font:
  font-size: 16px
  code-font-size: 16px
  # Global font
  font-family: "PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif"
  # Code font
  code-font-family: '"monospace", monospace'
# --------------------------- end ---------------------------

Background Image

# --------------------------- start ---------------------------
# Background
background:
  enable: false
  opacity: .2
  dark: https://i.pinimg.com/originals/d8/b3/9d/d8b39d12b653810db452c437211aeb2e.png
  light: https://i.pinimg.com/originals/93/57/38/935738ed9657b296c2ef0ebd2151eb66.jpg
# --------------------------- end ---------------------------

Lure Click

# --------------------------- start ---------------------------
# Lure
# When the user exits the page, modify the title
lure:
  enable: false
  jump: 404 Not Found
  back: ヾ(≧∇≦*)ゝHey, hey, you fell for it.
# --------------------------- end ---------------------------

Article Expiration Reminder

# --------------------------- start ---------------------------
# Article expiration
expire:
  enable: false
  time: 30 # days
  position: top # top / bottom
  text_prev: "This article expired "
  text_next: " day ago, if the content does not match, please contact the webmaster to update it."
# --------------------------- end ---------------------------

Homepage Article List

# --------------------------- start ---------------------------
# Home page article configuration information
index_post_list:
  direction: column # row / column
  column: 2 # 2: 2 columns 3: 3 columns
  cover: both
# --------------------------- end ---------------------------
# --------------------------- start ---------------------------
# Related articles
related_post:
  enable: false
  limit: 2
  # created: release date / updated: update date
  date_type: created
# --------------------------- end ---------------------------

Right Click Menu

# --------------------------- start ---------------------------
# Custom right menu
right_menu:
  enable: false
  # Whether to display the hot comment switch.
  commentBarrage: false
  # Whether to display the browser's context menu when hold Ctrl key.
  ctrlOriginalMenu: false
  # Simplified and Traditional Chinese translation.
  translate: false
  # Custom list
  custom_list:
    # - name: Random Post
    #   click: toRandomPost()
    #   id: menu-randomPost
    #   class:
    #   icon: fas fa-tower-broadcast
    # - name: All Categories
    #   click: pjax.loadUrl('/categories/') # External links with window.open, pjax can not request cross-domain content.
    #   id:
    #   class:
    #   icon: fas fa-clone
    # - name: All Tags
    #   click: pjax.loadUrl('/tags/')
    #   id:
    #   class:
    #   icon: fas fa-tags
# --------------------------- end ---------------------------

Translation

# --------------------------- start ---------------------------
translate:
  enable: true
  defaultEncoding: 2 # 1: default traditional 2: default simplified
  translateDelay: 0 # First load translation delay time
# --------------------------- end ---------------------------

Copy

# --------------------------- start ---------------------------
# Copy information
copy:
  enable: false
  # Turn on Link copyright information after copying.
  copyright:
    enable: false
    # Display when the number of words copied exceeds
    limit: 50
# --------------------------- end ---------------------------

Console

# --------------------------- start ---------------------------
# Console
console:
  enable: false
  # Recent comments
  recentComment:
    enable: false
    # Cache time 1: 1 day / .5 : half a day
    storage: .2
  card:
    # Tags
    tags: true
    # Archives
    archive: "month" # month: by month / year: by year
# --------------------------- end ---------------------------

404 Page

# --------------------------- start ---------------------------
# 404 page
errorpage:
  img: /img/404.avif
  text: =awa= Page Not Found # Text
  recommendList: true
# --------------------------- end ---------------------------

Music

# --------------------------- start ---------------------------
# Meting API
# This part of the content uses metingjs,
# can only use NetEase Cloud Music, QQ Music and other music platforms supported by the mainland China region,
# the subsequent consideration of the use of JSON files to store music information and customize the implementation of the third-party API does not depend on the page.
# Music Page
meting_api: "https://meting.qjqq.cn/?server=:server&type=:type&id=:id&auth=:auth&r=:r" # Custom API
# --------------------------- end ---------------------------

# --------------------------- start ---------------------------
# Capsule music
capsule:
  enable: false
  # Playlist ID / Single song ID
  id: 5144842535
  # Service provider: netease / qq / xiami / kugou / baidu
  server: netease
  # Type: playlist / song
  type: playlist
  volume: 0.8
# --------------------------- end ---------------------------

Accessibility

# --------------------------- start ---------------------------
# Quick Menu
# Open with shift + ?
keyboard:
  enable: false
  list:
    # - name: Close Quick Menu
    #   key: K
    #   func: keyboard
    # - name: Open Console
    #   key: A
    #   sco: showConsole
    # - name: Play/Pause Music
    #   key: M
    #   sco: musicToggle
    # - name: Open Friend Links
    #   key: L
    #   url: /links/
# --------------------------- end ---------------------------

Image Lazy Loading

# --------------------------- start ---------------------------
# Lazyload
lazyload:
  enable: false
  # post, site
  field: site
  # Loading replacement image
  placeholder: ""
  # Loading failure replacement image
  errorimg: /img/error_load.avif
# --------------------------- end ---------------------------

Loading Animation

# --------------------------- start ---------------------------
# Loading
loading:
  # Full screen loading
  fullpage: false
  # Loading icon, default is siteicon
  favicon: /img/favicon.png
  # Pace loading
  pace: true
# --------------------------- end ---------------------------

Code Highlighting

# --------------------------- start ---------------------------
# Highlight
highlight:
  enable: true
  # Display the fold button when the number of words exceeds
  limit: 200
  # Whether to enable the copy button
  copy: true
  # Whether to expand by default
  expand: true
  # default: default / mac : apple terminal
  theme: mac
  # default / solidity / dracula
  color: default
# --------------------------- end ---------------------------

Image Lightbox

# --------------------------- start ---------------------------
# Lightbox
lightbox: false
# warning: Please select any one, but cannot be turned on at the same time.
fancybox: false # fancybox
mediumZoom: false # mediumZoom
# --------------------------- end ---------------------------

Open Graph

# --------------------------- start ---------------------------
# OpenGraph
OpenGraph:
  enable: false
  options:
    # twitter_card:
    # twitter_image:
    # twitter_id:
    # twitter_site:
    # google_plus:
    # fb_admins:
    # fb_app_id:
# --------------------------- end ---------------------------

Website Grayscale

# --------------------------- start ---------------------------
# Memorial
# Turn the entire site gray on memorable days.
memorial:
  enable: false
  date:
  #  - 7-7
  #  - 9-18
  #  - 12-13
# --------------------------- end ---------------------------