git clone -b main https://github.com/everfu/hexo-theme-solitude.git themes/solitude
永久链接简短格式
安装插件
1
npm install hexo-abbrlink --save
_config.yml更改与添加
1 2 3 4 5 6 7 8
# 更改permalink: permalink:posts/:abbrlink.html
# 添加以下内容 # 文章链接转数字或字母:https://github.com/rozbo/hexo-abbrlink abbrlink: alg:crc16#算法: crc16(default) and crc32 rep:hex#进制: dec(default) and hex: dec #输出进制:十进制和十六进制,默认为10进制。丨dec为十进制,hex为十六进制
# URL ## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project' url:https://baiyi.ink permalink:posts/:abbrlink.html #permalink: :year/:month/:day/:title/ permalink_defaults: pretty_urls: trailing_index:true# Set to false to remove trailing 'index.html' from permalinks trailing_html:true# Set to false to remove trailing '.html' from permalinks
# Writing new_post_name::title.md# File name of new posts default_layout:post titlecase:false# Transform title into titlecase external_link: enable:true# Open external links in new tab field:site# Apply to the whole site exclude:'' filename_case:0 render_drafts:true post_asset_folder:true relative_link:true future:true syntax_highlighter:highlight.js highlight: line_number:true auto_detect:false tab_replace:'' wrap:true#false hljs:false prismjs: preprocess:true#false line_number:true#false tab_replace:''
# Home page setting # path: Root path for your blogs index page. (default = '') # per_page: Posts displayed per page. (0 = disable pagination) # order_by: Posts order. (Order by date descending by default) index_generator: path:'' per_page:10 order_by:-date
# Category & Tag default_category:uncategorized category_map: tag_map:
# Metadata elements ## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta meta_generator:true
# Date / Time format ## Hexo uses Moment.js to parse and display date ## You can customize the date format as defined in ## http://momentjs.com/docs/#/displaying/format/ date_format:YYYY-MM-DD time_format:HH:mm:ss ## updated_option supports 'mtime', 'date', 'empty' updated_option:'mtime'
# Pagination ## Set per_page to 0 to disable pagination per_page:10 pagination_dir:page
# Include / Exclude file(s) ## include:/exclude: options only apply to the 'source/' folder include: exclude: ignore:
# 文章链接转数字或字母:https://github.com/rozbo/hexo-abbrlink abbrlink: alg:crc16#算法: crc16(default) and crc32 rep:hex#进制: dec(default) and hex: dec #输出进制:十进制和十六进制,默认为10进制。丨dec为十进制,hex为十六进制
# Sticky: Fixed position / noSticky: Not fixed position # Sticky: 固定位置 / noSticky: 不固定位置 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" # 菜单栏位置(0: 左 1: 右) position:1# Sidebar positioning(0: left 1: right)
# --------------------------- start --------------------------- # article table of contents # 文章目录 toc: post:true page:false vague:true # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Tags # 标签 tags: enable:true 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:true # PV pv:true # UV # uv: true # Last update date # 最后更新日期 updatetime:true # Website creation time # 网站创建时间 runtimeenable:true # Format: yyyy-MM-dd hh-mm-ss # 格式: yyyy-MM-dd hh-mm-ss runtime:"2025-01-15 00:00:00" # --------------------------- end --------------------------- # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Post default settings # 文章默认设置 post: default: # Default image when no cover is set # 未设置封面时的默认图片 cover: -/img/default.jpg # - # 默认图片 / default cover # Location # 位置 locate:山东·泰安 # Copyright # 版权 copyright: enable:true author:https://thirdqq.qlogo.cn/g?b=qq&nk=2766521276&s=640# url # License # 许可证 license:CCBY-NC-SA4.0 # License link # 许可证链接 licenurl:https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh-hans # Article Local AI # 文章本地AI ai: enable:true modelName:白衣GPT # Article meta information # 其他可能的配置项
# 文章元信息 meta: # Release date # 发布日期 date:true # Update date # 更新日期 updated:true # Location # 位置 locate:true # Number of words # 字数 wordcount:true # uv readtime:true # pv pv:true # Comment count # 评论数 comment:true # 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 reading progress # 文章封面取色 covercolor: enable:true # local: local color / api: api color / ave: oss average color mode:api # api address / api 地址 api:https://api.qjqq.cn/api/Imgcolor?img= # Storage / 缓存时间 time:43200000 footer: enable:true desc:来自白衣INK最新设计与技术的文章# Articles from Ever Fu. / 文章来自 Ever Fu # description button:# Button enable:true name:了解更多# Learn more / 了解更多 url:/about/ # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Custom Theme Color theme_color: dark:"#ffc848"# dark light:"#425AEF"# light # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # display mode # 显示模式 display_mode: # auto: automatic switching(Recognize the current theme mode of the device) / dark: dark mode / light: light mode # auto: 自动切换(识别设备当前主题模式) / dark: 深色模式 / light: 浅色模式 type:auto # After opening, the dark mode will display the starry sky background # 开启后深色模式会显示星空背景 universe:true # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Font # 字体 font: font-size:16px code-font-size:15px # Global font # 全局字体 font-family:"PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif" # Code font # 代码字体 code-font-family:'"monospace", monospace' # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Lure # When the user exits the page, modify the title # 当用户退出页面时,修改标题 lure: enable:false jump:404NotFound back:ヾ(≧∇≦*)ゝHey,hey,youfellforit. # --------------------------- end ---------------------------
# --------------------------- 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 ---------------------------
# --------------------------- 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:true limit:2 # created: release date / updated: update date # created: 发布日期 / updated: 更新日期 date_type:created # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Custom right menu # 自定义右键菜单 right_menu: enable:true # Whether to display the hot comment switch. # 是否显示热门评论开关 commentBarrage:false # Whether to display the browser's context menu when hold Ctrl key. # 是否在按住 Ctrl 键时显示浏览器右键菜单 ctrlOriginalMenu:false # Simplified and Traditional Chinese translation. # 简繁体转换 translate:true # Custom list # 自定义列表 custom_list: -name:随机文章 click:toRandomPost() id:menu-randomPost class: icon:fasfa-tower-broadcast -name:全部分类 click:pjax.loadUrl('/categories/')# External links with window.open, pjax can not request cross-domain content. id: class: icon:fasfa-clone -name:全部标签 click:pjax.loadUrl('/tags/') id: class: icon:fasfa-tags # --------------------------- end -----------------------
# --------------------------- start --------------------------- # Copy # information # 复制信息 copy: enable:true # Turn on Link copyright information after copying. # 复制后链接版权信息 copyright: enable:false # Display when the number of words copied exceeds # 复制文字时超过多少字数显示 limit:50 # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # 404 page # 404 页面 errorpage: img:/img/404.avif text:=awa=PageNotFound# Text recommendList:true # --------------------------- end ---------------------------
# --------------------------- 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 # 歌单 ID / 单曲 ID id:5144842535 # 服务商:netease / qq / xiami / kugou / baidu server:netease # 类型:playlist / song type:playlist volume:0.8 # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Quick Menu # Open with shift + ? # 快捷菜单 # 使用 shift + ? 打开 keyboard: enable:false list: # - name: 关闭快捷菜单 # key: K # func: keyboard # - name: 打开控制台 # key: A # sco: showConsole # - name: 播放/暂停音乐 # key: M # sco: musicToggle # - name: 打开友链 # key: L # url: /links/ # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Lazyload # 图片懒加载 lazyload: enable:false # post, site field:site # 加载时替换图 placeholder:"" # 加载失败替换图 errorimg:/img/error_load.avif # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Loading # 加载 loading: # Full screen loading # 全屏加载 fullpage:false # Loading icon, default is siteicon # 加载图标,不写默认siteicon favicon:/img/favicon.png # Pace loading # Pace 加载 pace:true # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Highlight # 代码块高亮 highlight: enable:true # Display the fold button when the number of words exceeds # 当超过多少字时显示折叠按钮 limit:350 # Whether to enable the copy button # 是否启用复制按钮 copy:true # Whether to expand by default # 是否默认展开 expand:true # default: default / mac : apple terminal # default: 默认 / mac : 苹果终端 theme:mac # default / solidity / dracula color:dracula # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Lightbox # 图片灯箱 lightbox:true # warning: Please select any one, but cannot be turned on at the same time. # 警告: 请任选其一,但不能同时开启。 fancybox:true# fancybox mediumZoom:false# mediumZoom # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Memorial # Turn the entire site gray on memorable days. # 在纪念日整个网站变灰 memorial: enable:false date: # - 7-7 # - 9-18 # - 12-13 # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Word count # 字数统计 # warning: Please install the hexo-wordcount plugin first. # 警告: 请先安装 hexo-wordcount 插件。 wordcount:true # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Katex # Latex formula support # Latex 公式支持 katex: enable:false # Whether to load on each page # 是否在每个页面加载 per_page:false # Whether to enable copy formula # 是否启用复制公式 copytex:false # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # CSS Prefix # CSS 前缀 # When turned on, it will automatically prefix the CSS (to get better browser support), but this will increase the size of the CSS file. # 开启后会自动给 CSS 加前缀(以获得更好的浏览器支持),但这会增加 CSS 文件的大小。 css_prefix:false # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Extend # 扩展 extends: # Insert in head # 插入到 head head: # 自定义css -<linkrel="stylesheet"href="/css/baiyi.css">
# Insert in body # 插入到 body body: # - <script src="https://cdn.bootcdn.net/ajax/libs/pace/1.2.4/pace.min.js"></script> # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # PWA # Progressive Web App pwa: enable:false manifest:/manifest.json# manifest.json theme_color:"#006a73"# Theme color mask_icon:/img/pwa/favicon.png# Mask icon apple_touch_icon:/img/pwa/favicon.png# Apple touch icon bookmark_icon:/img/pwa/favicon.png# Bookmark icon favicon_32_32:/img/pwa/favicon_32.png# 32x32 icon favicon_16_16:/img/pwa/favicon_16.png# 16x16 icon # --------------------------- end ---------------------------
# --------------------------- start --------------------------- # Comment # 评论 comment: # Which commenting system to use(e.g. waline or waline,twikoo) # 使用哪个评论系统(例如: waline or waline,twikoo) use:# waline, twikoo, valine, artalk, giscus # Up to two comment systems can be turned on at the same time # Whether to display the hot comment switch. # 是否显示热门评论开关 commentBarrage:false # Lazy load # 懒加载评论区 lazyload:false # Whether to display the comment count # 显示评论数 count:false # Sidebar displays the total number of comments # Sidebar 显示总评论数 sidebar:false # PV pv:false # Avatar avatar:https://gravatar.com/avatar # Hot comment tips # 热评提示 hot_tip: enable:false # Number of hot comments count:3 # recent comments(⚠️ Comments need to be configured first.) # 最新评论(⚠️ 需要先配置评论) newest_comment: enable:true storage:.5# 缓存时间 1: 1天 / .5 : 半天 / Cache time 1: 1 day .5 : half a day limit:5# 评论数 / Number of comments # Twikoo: https://solitude.js.org/comment/twikoo twikoo:# https://twikoo.js.org/ envId:# url: https://twikoo.sondy.top/ region:# Environment locale, default is ap-shanghai, Tencent cloud environment fill ap-shanghai or ap-guangzhou; Vercel environment do not fill the. style:true# Use custom styles when turned on accessToken:# AccessToken option:# twikoo option # Waline: https://solitude.js.org/comment/waline waline:# https://waline.js.org/ envId:# url: https://waline.wzsco.top pageview:false# Whether to enable page access statistics option:# waline configuration item # Valine: https://solitude.js.org/comment/valine valine: appId:# leancloud application app id appKey:# leancloud application app key serverURLs:# This configuration is suitable for domestic custom domain name users, overseas version will be automatically detected (no need to manually fill in) avatar:# https://valine.js.org/avatar.html visitor:false style:true# Use custom styles when turned on option:# options list # Artalk: https://solitude.js.org/comment/artalk # Artalk: https://solitude.js.org/zh/comment/artalk artalk: server:# server url site:# site name option:# options # Giscus: https://solitude.js.org/comment/giscus giscus: repo:# GitHub repository name repo_id:# GitHub repository ID category_id:# GitHub repository category ID theme: light:light dark:dark option: # --------------------------- end ---------------------------