Butterfly官方网站,请 这里 Hexo官司网查看 这里

前面通过10节的课程梳理了hexo和butterfly用到的所有知识,虽经过了梳理但内容还是比较多,所以本章给出一个前10章的一个小结(因涉及一些个人信息,所有部分配置项换成了假数据XXXXXX代码)。

一、hexo配置(_config.yml)

以上全是必要配置,其它配置可查看此系列课程第2和第3章内容部分的描述。

# Site
title: KorgClub
subtitle: 全栈式程序开发技术博客
description: Korg8是全栈式程序开发课程网站,包括java、python、js、objective-c、spring、cglib等基础, 涉及领域包括但不限于DDD、软件工程、架构设计、Devops、AI、深度学习、插件开发.
keywords: blog.korg8, 基础,java,python,js,objective-c,spring,DDD,软件工程,架构设计,Devops,深度学习,IDEA插件开发,字节码编程
author: Korgs
language: zh-CN
timezone: Asia/Shanghai
theme: butterfly

## Home page setting
index_generator:
  path: ''
  per_page: 10
  order_by: -date


# URL
url: http://blog.korg8.com
root: /

permalink: posts/:abbrlink/
permalink_defaults:
pretty_urls:
  trailing_index: true
  trailing_html: true
abbrlink:
  alg: crc32
  rep: hex
  drafts: false
  auto_category:
    enable: true
    depth: #3(default)
    over_write: false
  auto_title: false
  auto_date: false
  force: false
relative_link: false

# Directory
source_dir: source
public_dir: html
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang

## Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Writing
new_post_name: :title.md
default_layout: post
auto_spacing: true
titlecase: false
external_link:
  enable: true
  field: site
filename_case: 0

render_drafts: false
future: true

post_asset_folder: true
marked:
  prependRoot: true
  postAsset: true

highlight:
  enable: true
  line_number: true
  line_threshold: 15
  auto_detect: false
  tab_replace: ''
  wrap: true
  hljs: false
prismjs:
  enable: false
  preprocess: true
  line_number: true
  tab_replace: ''

## Metadata elements
meta_generator: true

## Date / Time format
date_format: YYYY-MM-DD
time_format: HH:mm:ss
updated_option: 'mtime'

## Pagination
per_page: 10
pagination_dir: page

# Include / Exclude file(s)
include:
exclude:
ignore:

# local search
search:
  path: search.xml
  field: post
  content: true
  format: html

二、butterfly配置(_config.butterfly.xml)

# 网站总体设置
# --------------------------------------
favicon: img/favicon.png  #收藏图标
background: #设置网站背影,可设置图片或颜色
display_mode: light #网站默认的显示模式
css_prefix: true  #有些 CSS 并不是所有浏览器都支持,需要增加对应的前缀才会生效
instantpage: false # 当鼠标悬停到链接上超过 65 毫秒时,Instantpage 会对该链接进行预加载,可以提升访问速度

pangu: # 在网页中所有的中文字和半形的英文、数字、符号之间插入空白
  enable: true
  field: site # site/post

error_img: # 如果全站有图片失效,则会用以下图片替换
  flink: /img/friend_404.gif
  post_page: /img/404_cover.png

preloader: # 过场动画
  enable: false
  source: 1 #可选值1=fullpage或2=progress bar
  pace_css_url:

inject: # 插入代码到头部 </head> 之前 和 底部 </body> 之前
  head:
    - <link rel="stylesheet" href="/css/custom.css">
  bottom:
  # - <script src="xxxx"></script>

mask: # 为 header 或 footer 添加黑色半透遮罩
  header: true
  footer: true


# 欢迎页设置
# --------------------------------------
enter_transitions: true # 是否开启欢迎页
index_img: img/bg.jpg # 欢迎页背景图
index_site_info_top: # 标题距离顶部距离 eg: 300px/300em/300rem/10%
index_top_img_height: # 欢迎页顶图高度, eg: 300px/300em/300rem (主頁top_img高度)

subtitle: #欢迎页的欢迎语
  enable: true
  effect: true  # 打字效果
  startDelay: 300 # time before typing starts in milliseconds
  typeSpeed: 200 # type speed in milliseconds
  backSpeed: 100 # backspacing speed in milliseconds
  loop: false #循环打字
  source: false #可以直接配置第三方网站,需查询相应网站配置说明,false表示关闭调用第三方服务提供的文案,可选的网站有:https://hitokoto.cn/、 http://yijuzhan.com/、https://www.jinrishici.com/
  sub: #如果关闭打字效果,subtitle 只会显示 sub 的第一行文字
    - It's difficult to get up early!


# 404 页面图标配置
# --------------------------------------
error_404:
  enable: false
  subtitle: 'Page Not Found'
  background: https://i.loli.net/2020/05/19/aKOcLiyPl2JQdFD.png


# 页脚设置
# --------------------------------------
footer:
  owner:
    enable: true
    since: 2022
  custom_text:
    <a href = "https://hexo.io/zh-cn/"> <img src="https://img.shields.io/badge/Frame-Hexo-blue?logo=hexo"> </a>
  copyright: false
footer_bg: false


# 导航栏设置
# --------------------------------------
nav:
  logo: # image
  display_title: true
  fixed: true  # fixed navigation bar

blog_title_font: # 左上角网站名字 主页居中网站名字
  font_link:
  font-family:

menu: # 菜单设置, /posts/21cfbf15/
  Home: / || fas fa-home
  文库 || fas fa-folder-open:
    归档: /archives/   || fas fa-archive
    标签: /tags/       || fas fa-tags
    分类: /categories/ || fas fa-folder

  编程开发 || fas fa-code:
    Java:   /programer/java.html      || fas fa-coffee
    Python: /programer/python.html    || fas fa-leaf
    MacOS:  /programer/macos.html     || fas fa-desktop

  架构设计 || fas fa-sitemap:
    架构设计: /design/arch.html      || fas fa-cube
    插件开发: /design/plugin.html    || fas fa-leaf


# 文章设置
# --------------------------------------
# 列表页
cover: # 文章封面图
  index_enable: true
  aside_enable: true
  archives_enable: true
  position: both
  default_cover:
    - https://material-2.png
    - https://material-1.png

post_meta: # 页面meta显示
  page: # Home Page
    date_type: created # created or updated or both 主頁文章日期是創建日或者更新日或都顯示
    date_format: relative # date/relative 顯示日期還是相對日期
    categories: true # true or false 主頁是否顯示分類
    tags: false # true or false 主頁是否顯示標籤
    label: true # true or false 顯示描述性文字
  post:
    date_type: created # created or updated or both 文章頁日期是創建日或者更新日或都顯示
    date_format: relative # date/relative 顯示日期還是相對日期
    categories: true # true or false 文章頁是否顯示分類
    tags: true # true or false 文章頁是否顯示標籤
    label: true # true or false 顯示描述性文字

index_post_content: # 文章摘要信息,1:显示描述;2、自动;3、截取一部分正文
  method: 2
  length: 350

# 详情页
# 页面顶图配置
# category_per_img和tag_per_img,可配置多张,每次会随机取一张
# format:
#  - category name: xxxxx
disable_top_img: false

default_top_img: 
archive_img: 
tag_img: 
tag_per_img:
category_img: 
category_per_img:

wordcount: #文章字数统计
  enable: false
  post_wordcount: true
  min2read: true
  total_wordcount: true

noticeOutdate: # 文章过期提醒
  enable: false
  style: flat # style: simple/flat
  limit_day: 365 # When will it be shown
  position: top # position: top/bottom
  message_prev: 距离上次更新已经过了
  message_next: 天,文章所描述的内容可能已经发生yowc,请留意。

post_edit: # 文章是否可编辑
  enable: false
  url: 如果可以需要配置相应的在线源码目录,比如github

toc: # 文章目录显示位置
  post: true
  page: false
  number: true
  expand: false
  style_simple: false # for post
  scroll_percent: true

# 文章底部
copy: # 复制配置,开启后复制内容后会加入版权信息
  enable: true
  copyright:
    enable: true
    limit_count: 50

post_copyright: # 版权配置
  enable: true
  decode: false #true来显示中文网址
  author_href:
  license: CC BY-NC-SA 4.0
  license_url: https://creativecommons.org/licenses/by-nc-sa/4.0/

reward: # 文章底部的打赏功能
  enable: false
  QR_code:
  #    - img: https://file.crazywong.com/gh/jerryc127/CDN/Photo/wechat.jpg
  #      link:
  #      text: 微信


sharejs: # Share System (分享)
  enable: true
  sites: facebook,twitter,wechat,weibo,qq

post_pagination: 1 # 推送文章分页,1表示左侧推送上一篇,2表示左侧推送上一篇

related_post: # 文章底部的推送文章
  enable: true
  limit: 6
  date_type: created

# 其它
anchor: # 开启页面锚点后,当你在进行滚动时,页面链接会根据标题ID进行替换
  button:
    enable: false
    always_show: false
    icon:
  auto_update: false


photofigcaption: false # 图片是否显示描述文字
# Lightbox (圖片大圖查看模式,只能選擇一個 或者 兩個都不選)
medium_zoom: false
fancybox: true
#代码片段配置
highlight_theme: light
highlight_copy: true
highlight_lang: true
highlight_shrink: false
highlight_height_limit: false
code_word_wrap: false

hr_icon: # 水平分隔线图标设置,带个小剪刀图标
  enable: true
  icon: # the unicode value of Font Awesome icon, such as '\3423'
  icon-top:

Open_Graph_meta: # 在 head 里增加一些 meta 资料,例如缩略图、标题、时间等等。当你分享网页到一些平台时,平台会读取 Open Graph 的内容,展示缩略图,标题等等信息。
  enable: true
  option:

beautify: # 列表项前是否加图标
  enable: false
  field: post # site/post
  title-prefix-icon: # '\f0c1'
  title-prefix-icon-color: # '#F47466'

# 侧边栏
# --------------------------------------
aside:
  enable: true
  hide: false
  button: true #是否显示侧边栏功能按钮
  mobile: true # display on mobile
  position: right # left or right
  display:
    archive: true
    tag: true
    category: true
  card_author:
    enable: true
    description: 生而为人,我很遗憾
    button:
      enable: true
      icon: fas fa-arrow-circle-right
      text: Follow Me
      link: https://blog.csdn.net/liudonglovehemin
  card_announcement: #公告
    enable: true
    content: 建设中...... #可以存html
  card_recent_post: #最新发布
    enable: true
    limit: 5 # if set 0 will show all
    sort: date # date or updated
    sort_order: # Don't modify the setting unless you know how it works
  card_categories: #分类
    enable: true
    limit: 8 # if set 0 will show all
    expand: none # none/true/false
    sort_order: # Don't modify the setting unless you know how it works
  card_tags: #标签
    enable: true
    limit: 40 # if set 0 will show all
    color: false
    orderby: random # Order of tags, random/name/length
    order: 1 # Sort of order. 1, asc for ascending; -1, desc for descending
    sort_order: # Don't modify the setting unless you know how it works
  card_archives: #归档
    enable: true
    type: monthly # yearly or monthly
    format: MMMM YYYY # eg: YYYY年MM月
    order: -1 # Sort of order. 1, asc for ascending; -1, desc for descending
    limit: 8 # if set 0 will show all
    sort_order: # Don't modify the setting unless you know how it works
  card_webinfo: #网站信息
    enable: true
    post_count: true
    last_push_date: true
    sort_order: # Don't modify the setting unless you know how it works

avatar: # Avatar (头像)
  img: img/avatar.png
  effect: false
social: # 社交图标
  fas fa-envelope: mailto:liudong@me.com || Email
  fab fa-github: https://github.com/2012liudong || Github

busuanzi: # 訪問人數
  site_uv: true
  site_pv: true
  page_pv: true
runtimeshow: # 网站运行时间
  enable: false
  publish_date: #开通时间

# 显示评论
newest_comments:
  enable: false
  sort_order: # Don't modify the setting unless you know how it works
  limit: 6
  storage: 10 # unit: mins, save data to localStorage
  avatar: true

# 右下角按钮
# --------------------------------------
rightside_item_order: # 按钮排序
  enable: false
  hide: # readmode,translate,darkmode,hideAside
  show: # toc,chat,comment

translate:
  enable: false
  default: 繁
  defaultEncoding: 2 #1 - Traditional Chinese/ 2 - Simplified Chinese
  translateDelay: 0 # Time delay
  msgToTraditionalChinese: '繁' # The text of the button when the language is Simplified Chinese
  msgToSimplifiedChinese: '简' # The text of the button when the language is Traditional Chinese

rightside-bottom: # 右下角按鈕距離底部的距離/默認單位為px

readmode: true # 閲讀模式

darkmode: # dark mode
  enable: true
  button: true
  autoChangeMode: true
  start:  8
  end:  22

rightside_scroll_percent: true # 滚动状态百分比


# 其它功能
# --------------------------------------
local_search: # 本地搜索
  enable: true
  preload: false
  top_n_per_article: 1
  unescape: false
  CDN:

chat_btn: true # 工具栏的聊天按钮
chat_hide_show: true #向上滚动时才显示,向下滚动时隐藏
tidio:
  enable: true
  public_key: XXXXXXX

snackbar: # Snackbar (Toast Notification 彈窗)
  enable: false
  position: bottom-left #top-left / top-center / top-right / bottom-left / bottom-center / bottom-right
  bg_light: '#49b1f5' # The background color of Toast Notification in light mode
  bg_dark: '#1f1f1f' # The background color of Toast Notification in dark mode

lazyload: # Lazyload (圖片懶加載)
  enable: false
  field: site # site/post
  placeholder:
  blur: false

note: #  增强的block图标
  style: flat # simple、modern、flat、disabled
  icons: true
  border_radius: 3
  light_bg_offset: 0

canvas_ribbon: # canvas_ribbon (背景特效,靜止彩帶背景)
  enable: true
  size: 150
  alpha: 0.6
  zIndex: -1
  click_to_change: true
  mobile: false


# 以下全为可选的插件
# --------------------------------------
katex: # KaTeX (數學)
  enable: false
  per_page: false
  hide_scrollbar: true


# 网站解析
baidu_analytics:
google_analytics:
cloudflare_analytics:
microsoft_clarity:

# 广告
# --------------------------------------
google_adsense: # Google Adsense (谷歌廣告)
  enable: false
  auto_ads: true
  js: https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js
  client:
  enable_page_level_ads: true

# ad: Insert ads manually (手動插入廣告)
#   index:
#   aside:
#   post:

# Verification (网站验证):如果需要搜索引擎收录网站,可能需要登录对应搜索引擎的管理平台进行提交
site_verification:
# - name: google-site-verification
#   content: xxxxxx
# - name: baidu-site-verification
#   content: xxxxxxx

pjax: # Pjax(加速)
  enable: false
  exclude:

CDN: # CDN
  internal_provider: local
  third_party_provider: jsdelivr
  version: false
  custom_format:
  option:

三、Scaffolds模板配置

draft

# draft
---
title: {{ title }}
tags:
---

page

# page
---
title: {{ title }}
date: {{ date }}
reward:
description:
top_img: 
comments: false
---

post

# post
---
title: {{ title }}
date: {{ date }}
tags:
categories:
keywords:
description:
top_img:
cover:
comments: false
---

四、源码目录

基于Hexo和Butterfly创建个人技术博客,(13) 第一阶段总结,Hexo和Butterfl详细配置_ide