Butterfly 安装文档(四) 主题配置-2
搜索本地搜索AlgoliaDocSearch
记得运行 hexo clean
你需要安装 hexo-generator-searchdb 或者 hexo-generator-search,根据它的文档去做相应配置
修改 主题配置文件
12345678910# Local searchlocal_search: enable: false # Preload the search data when the page loads. preload: false # Show top n results per article, show all results by setting to -1 top_n_per_article: 1 # Unescape html strings to the readable one. unescape: false CDN:
参数
解释
enable
是否开启本地搜索
preload
预加载,开启后,进入网页后会自动加载搜索文件。关闭时,只有点击搜索按钮后,才会加载搜索文件
top_n_per_artic ...
Butterfly 安装文档(三) 主题配置-1
语言修改站点配置文件 _config.yml
默认语言是 en
主题支持三种语言
default(en)
zh-CN (简体中文)
zh-TW (繁体中文)
网站资料修改网站各种资料,例如标题、副标题和邮箱等个人资料,请修改博客根目录的_config.yml
导航栏设置 (Navigation bar settings)参数设置主题配置文件中
1234nav: logo: #image display_title: true fixed: false # fixed navigation bar
参数
解释
logo
网站的 logo,支持图片,直接填入图片链接
display_title
是否显示网站标题,填写 true 或者 false
fixed
是否固定状态栏,填写 true 或者 false
菜单/目录修改 主题配置文件
123456789Home: / || fas fa-homeArchives: /archives/ || fas fa-archiveTags: /tags/ || fas fa-tagsCategories ...
Butterfly 安装文档(二) 主题页面
Front-matterFront-matter 是 markdown 文件最上方以 --- 分隔的区域,用于指定个别档案的变数。
Page Front-matter 用于页面配置
Post Front-matter 用于文章页配置
如果标注可选的参数,可根据自己需要添加,不用全部都写在 markdown 里
Page Front-matter123456789101112131415---title:date:updated:type:comments:description:keywords:top_img:mathjax:katex:aside:aplayer:highlight_shrink:---
写法
解释
title
【必需】页面标题
date
【必需】页面创建日期
type
【必需】标签、分类和友情链接三个页面需要配置
updated
【可选】页面更新日期
description
【可选】页面描述
keywords
【可选】页面关键字
comments
【可选】显示页面评论模块 (默认 true)
top_img
【可选 ...
Butterfly 安装文档(一) 快速开始
hexo-theme-butterfly 是基于 hexo-theme-melody 的基础上进行开发的。
安装git安装(Github)git安装(Gitee)npm安装稳定版【建议】在你的 Hexo 根目录里
1git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
升级方法:在主题目录下,运行 git pull
稳定版【建议】在你的 Hexo 根目录里
1git clone -b master https://gitee.com/immyw/hexo-theme-butterfly.git themes/butterfly
升级方法:在主题目录下,运行 git pull
此方法只支持 Hexo 5.0.0 以上版本
通过 npm 安装并不会在 themes 里生成主题文件夹,而是在 node_modules 里生成在你的 Hexo 根目录里
1npm install hexo-theme-butterfly
升级方法:在 Hexo 根目录下, ...
博客创建
第一次尝试Hexo搭建的博客,其中学习到很多其他知识,不太清楚发什么好,于是就发几张图供各位欣赏 同时记录写常用指令。
快速入门创建新博客文章1$ hexo new "My New Post"
更多信息: Writing
创建自定义页1$ hexo new page "My New Post"
运行命令1$ hexo server
更多信息: Server
生成静态文件1$ hexo generate
更多信息: Generating
部署到远程站点1$ hexo deploy
更多信息: Deployment
相关插件安装123456789npm install hexo-generator-searchdb #本地搜索npm install activate-power-mode #打字效果npm install hexo-wordcount --save #字数统计npm install hexo-tag-aplayer --save #音乐播放插件
美女图片
搭建到起始原因在睡觉的时候无聊刷了下网站,别人推荐 ...










