2023-11-21 hexo next主题 如何在博客网站底部添加备案号
主题:NexT.Pisces v5.1.4
找到路径:博客目录名称\themes\hexo-theme-next\layout\_partials
找到文件:footer.swig,并在里面添加备案号,如图:
未改变前:
<div class="copyright">{# #}{% set current = date(Date.now(), "YYYY") %}{# #}© {% if theme.footer.since and theme.footer.since != current %}{{ theme.footer.since }} — {% endif %}{# #}<span itemprop="copyrightYear">{{ current }}</span> <span class="with-love"> <i class="fa fa-{{ theme.footer.icon }}"></i> </span> <span class="author" itemprop="copyrightHolder">{{ theme.footer.copyright || config.author }}</span> {% if theme.post_wordcount.totalcount %} <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-area-chart"></i> </span> {% if theme.post_wordcount.item_text %} <span class="post-meta-item-text">{{ __('post.totalcount') }}:</span> {% endif %} <span title="{{ __('post.totalcount') }}">{# #}{{ totalcount(site, '0,0.0a') }}{# #}</span> {% endif %} </div>
改变后:
<div class="copyright">{# #}{% set current = date(Date.now(), "YYYY") %}{# #}© {% if theme.footer.since and theme.footer.since != current %}{{ theme.footer.since }} — {% endif %}{# #}<span itemprop="copyrightYear">{{ current }}</span> <span class="with-love"> <i class="fa fa-{{ theme.footer.icon }}"></i> </span> <span class="author" itemprop="copyrightHolder">{{ theme.footer.copyright || config.author }}</span> {% if theme.post_wordcount.totalcount %} <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"> <i class="fa fa-area-chart"></i> </span> {% if theme.post_wordcount.item_text %} <span class="post-meta-item-text">{{ __('post.totalcount') }}:</span> {% endif %} <span title="{{ __('post.totalcount') }}">{# #}{{ totalcount(site, '0,0.0a') }}{# #}</span> {% endif %} <a href="http://beian.miit.gov.cn">粤ICP备xxx号</a> </div>
对,就是在copyright类的最后一处添加备案号链接。
注:备案链接不要添加www,不然有可能404(来自网友)。
分类:
Hexo
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
· 全程使用 AI 从 0 到 1 写了个小工具
· 从文本到图像:SSE 如何助力 AI 内容实时呈现?(Typescript篇)
2022-11-21 2022-11-21 vue+uniapp之小程序 video iphone手机 视频播放卡顿