diff --git a/source/_posts/Hexo.md b/source/_posts/Hexo.md index fd5e13e..e40933e 100644 --- a/source/_posts/Hexo.md +++ b/source/_posts/Hexo.md @@ -52,6 +52,8 @@ hexo new [layout] 新建一篇文章。如果没有设置 `layout` 的话,默认使用 [_config.yml](https://hexo.io/zh-cn/docs/configuration) 中的 `default_layout` 参数代替。如果标题包含空格的话,请使用引号括起来。 +# Butterfly 主题 + ## 鼠标样式修改 1. 在\themes\butterfly\source\css路径下创建一个mouse.css文件,在文件中添加如下代码: @@ -79,3 +81,43 @@ hexo new [layout] <title> 3. 重新部署,即可看到效果 + +## 增加网站备案信息 + +找到`themes/butterfly/layout/includes/footer.pug`文件 + +在文件 `if theme.footer.copyright`中增加 + +```pug + br + center + | ICP备案号: + a(href="https://beian.miit.gov.cn" target="_blank") 辽ICP备2025052969号-1 +``` + +完整如下: + +```pug +#footer-wrap + if theme.footer.owner.enable + - var now = new Date() + - var nowYear = now.getFullYear() + if theme.footer.owner.since && theme.footer.owner.since != nowYear + .copyright!= `©${theme.footer.owner.since} - ${nowYear} By ${config.author}` + else + .copyright!= `©${nowYear} By ${config.author}` + if theme.footer.copyright + .framework-info + span= _p('footer.framework') + ' ' + a(href='https://hexo.io')= 'Hexo' + span.footer-separator | + span= _p('footer.theme') + ' ' + a(href='https://github.com/jerryc127/hexo-theme-butterfly')= 'Butterfly' + br + center + | ICP备案号: + a(href="https://beian.miit.gov.cn" target="_blank") 辽ICP备2025052969号-1 + if theme.footer.custom_text + .footer_custom_text!=`${theme.footer.custom_text}` +``` + diff --git a/themes/butterfly/layout/includes/rightside.pug b/themes/butterfly/layout/includes/rightside.pug index 9696d0b..7fbd3d7 100644 --- a/themes/butterfly/layout/includes/rightside.pug +++ b/themes/butterfly/layout/includes/rightside.pug @@ -29,13 +29,16 @@ mixin rightsideItem(array) if commentsJsLoad a#to_comment(href="#post-comment" title=_p("rightside.scroll_to_comment")) i.fas.fa-comments + when 'xxxx' + button#xxxx(type="button" title="测试按钮") + i.fas.fa-xxxx #rightside - const { enable, hide, show } = theme.rightside_item_order - - const hideArray = enable ? hide && hide.split(',') : ['readmode','translate','darkmode','hideAside'] + - const hideArray = enable ? hide && hide.split(',') : ['readmode','translate','darkmode','hideAside', 'xxxx'] - const showArray = enable ? show && show.split(',') : ['toc','chat','comment'] - + #rightside-config-hide if hideArray +rightsideItem(hideArray)