Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment
Butterfly 进阶教程
Butterfly 进阶教程重要建议不要把个人需要的文件/图片放在主题 source 文件夹里,因为升级主题时可能会被覆盖删除。 正确做法:在 Hexo 根目录的 source 文件夹里创建一个文件夹来放置个人文件/图片,引用文件直接为 /文件夹名称/文件名 音乐功能基础配置音乐界面使用了插件 hexo-tag-aplayer,使用方法请参考插件文档 音乐页面是普通的 page 页,按普通页面操作生成即可。 优化配置为了避免在每个文件都插入 js 和 css,可以进行以下配置: 在 Hexo 根目录 _config.yml 中配置: 12aplayer: asset_inject: false 在需要使用 aplayer 的页面 front-matter 中添加: 1aplayer: true 这样只会在需要 aplayer 的页面插入 js 和 css。 电影功能电影界面使用了插件 hexo-douban 注意事项: hexo-douban 会主动生成页面,不需要自己创建 如遇到无法抓取问题,显示 INFO 0 movies have bee...
Butterfly 常见问题解答
Butterfly 常见问题解答网页显示代码问题:页面只显示 extends includes/layout.pug block content #recent-posts.recent-posts include includes/recent-posts.pug 等代码 解决方案:安装必要的渲染器 1npm install hexo-renderer-pug hexo-renderer-stylus --save 配置友情链接报错问题:配置友情链接页面时出现 Cannot read property 'length' of undefined 错误 解决方案:检查 link.yml 文件中代码的空格缩进,确保 YAML 格式正确 升级最新版后运行报错问题:升级后执行 hexo g 报错 TypeError: Cannot read property 'enable' of undefined 解决方案:参照最新版的 _config.yml,对比后将缺失的配置复制到主题配置文件中 wordcount 函数错误问题:报错 wordcount is...
Butterfly 标签插件详解
Butterfly 标签插件详解标签插件是 Hexo 独有的功能,不是标准的 Markdown 格式。以下内容仅适用于 Butterfly 主题。 提示框(Note)配置12345note: style: simple # simple/modern/flat/disabled icons: false border_radius: 3 light_bg_offset: 0 用法一:基础用法123{% note [class] [no-icon] [style] %}内容{% endnote %} 参数说明: class:标识,不同标识有不同配色(default/primary/success/info/warning/danger) no-icon:不显示图标 style:样式(simple/modern/flat/disabled) 用法二:自定义图标123{% note [color] [icon] [style] %}...
Butterfly 主题配置详解(下)
Butterfly 主题配置详解(下)本文继续介绍 Butterfly 主题的高级配置选项。 侧边栏设置123456789101112131415161718aside: # 是否启用侧边栏 enable: true # 是否默认隐藏侧边栏 hide: false # 是否在右下角显示隐藏侧边栏的按钮 button: true # 移动设备上是否启用侧边栏 mobile: true # 侧边栏位置:left / right position: right display: # 归档页面是否显示侧边栏 archive: true # 标签页面是否显示侧边栏 tag: true # 分类页面是否显示侧边栏 category: true 侧边栏卡片配置作者信息卡片1234567891011121314card_author: # 是否显示作者信息卡片 enable: true # 作者描述 description: button: # 是否显示按钮 enable: true # 按钮图标 ic...
Butterfly 主题配置详解(上)
Butterfly 主题配置详解(上)本文详细说明 Butterfly 主题的各项配置选项。所有配置都在 _config.butterfly.yml 文件中进行。 导航栏设置123456789101112131415nav: # 导航栏 Logo 图片 logo: # 是否显示网站标题 display_title: true # 滚动时是否显示文章标题 display_post_title: true # 是否固定导航栏 fixed: falsemenu: # 首页: / || fas fa-home # 列表||fas fa-list: # 音乐: /music/ || fas fa-music # 电影: /movies/ || fas fa-video 代码块设置12345678910111213141516171819code_blocks: # 代码块主题: darker / pale night / light / ocean / false theme: light # 是否使用 Mac 风格 macStyle: false...
Butterfly 主题页面配置
Butterfly 主题页面配置Front-matter 简介Front-matter 是 Markdown 文件最上方以 --- 分隔的区域,用于指定个别文件的变量。 Page Front-matter:用于页面配置 Post Front-matter:用于文章页配置 页面 Front-matter 配置基本结构12345678910111213141516171819---title:date:updated:type:comments:description:keywords:top_img:mathjax:katex:aside:aplayer:highlight_shrink:random:limit: type: value:--- 参数说明 参数 说明 title 【必需】页面标题 date 【必需】页面创建日期 type 【必需】标签、分类和友情链接三个页面需要配置 updated 【可选】页面更新日期 description 【可选】页面描述 keywords 【可选】页面关键字 comments 【可选】显示页面评论...
Butterfly 快速开始指南
Butterfly 快速开始指南Butterfly 是一个基于 hexo-theme-melody 开发的 Hexo 主题,提供了现代化的博客体验。 主题简介hexo-theme-butterfly 是在 hexo-theme-melody 的基础上进行开发的主题。它提供了丰富的功能和美观的界面设计。 安装方式方式一:Git 安装(推荐)稳定版(建议使用)在你的 Hexo 根目录下执行: 1git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly 测试版如果想要安装较新的开发分支(可能存在 Bug): 1git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly 升级方法:在主题目录下运行 git pull 方式二:npm 安装此方法仅支持 Hexo 5.0.0 以上版本。 在你的 Hexo 根目录下执行: 1npm install hex...