打开themes\anzhiyu\source\css\page\homepage.styl找到改为以下内容
123456789101112#content-inner #recent-posts > .recent-post-item > .recent-post-info > .content display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.4; color: var(--anzhiyu-secondtext); margin-top: 0.3rem; font-size: 14px; opacity 1; height 35px; padding: 0px 32px;
NPM 插件安装的部署方法:
12345npm i hexo-history-calendar --save# 或者cnpm i hexo-history-calendar --save
注意,一定要加–save,不然本地预览的时候可能不会显示!!!
新增网站根目录_config 配置项(不是主题的):
123456789history_calendar: priority: 4 enable: true enable_page: all layout: type: class name: sticky_layout index: 0 temple_html: '<div class="card-widget card-history"><div class="card-content"><div class="item-headline"><i class="fas fa-clock fa-spin"></i> ...
如果有安装店长的插件版侧边栏电子钟(与店长的电子钟冲突),在博客根目录[Blogroot]下打开终端,运行以下指令
12# 卸载原版电子钟npm uninstall hexo-butterfly-clock
安装插件,在博客根目录[Blogroot]下打开终端,运行以下指令:
1npm install hexo-butterfly-clock-anzhiyu --save
添加配置信息,以下为写法示例在站点配置文件_config.yml或者主题配置文件_config.anzhiyu.yml中添加
123456789101112131415161718192021# electric_clock# see https://anzhiy.cn/posts/fc18.htmlelectric_clock: enable: true # 开关 priority: 5 #过滤器优先权 enable_page: all # 应用页面 exclude: # - /posts/ # - /about/ layout: # 挂载容器类型 type: class name: st ...
在根目录source\custom\css中创建schedule.css
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901 ...
创建组件
主题新建themes/anzhiyu/layout/includes/widget/card_poem.pug,内容如下
123456789101112131415161718#card-poem.card-widget #poem_sentence #poem_info #poem_dynasty #poem_authorscript(src='https://cdn.jsdelivr.net/npm/js-heo@1.0.11/poem/jinrishici.js', charset='utf-8')script(type='text/javascript'). jinrishici.load(function(result) { var sentence = document.querySelector("#poem_sentence") var author = document.qu ...
Hexo 本地环境配置一、安装git
1.点击安装包,进行安装2.安装完成后,鼠标右键可以看到:Git Bash Here, 点击后打开命令窗口
1git --version # 查看git版本
二、安装Node.js
点击安装包,进行安装
安装完成后,配置环境变量,并在终端里面输入:
1node -v # 查看node.js版本
npm 的下载速度受到网络环境和源服务器的影响,如果存在 npm 命令执行非常慢的情况,可以使用国内的镜像源来加速下载
123npm config set registry https://registry.npmmirror.com #切换为淘宝NPM镜像站npm config set registry https://mirrors.cloud.tencent.com/npm/ # 切换为腾讯镜像npm config set registry https://registry.npmjs.org # 切换为官方镜像
查看镜像使用状态
1npm config get registry # 查看镜像使用状态
如果返回 ...
#安知鱼主题配置#主题安装
(npm安装):
1npm i hexo-theme-anzhiyu
此方法只支持 Hexo 5.0.0 以上版本 通过 npm 安装并不会在 themes 里生成主题文件夹,而是在 node_modules 里生成
应用主题
打开 Hexo 根目录下的 config.yml, 找到以下配置项,把主题改为anzhiyu
1234# Extensions## Plugins: https://hexo.io/plugins/## Themes: https://hexo.io/themes/theme: anzhiyu
安装 pug 和 stylus 渲染插件
1npm install hexo-renderer-pug hexo-renderer-stylus --save
无法安装可以使用cnpm进行安装
1npm install hexo-renderer-pug hexo-renderer-stylus --save --registry=http://registry.npmmirror.com
本地启动 hexo
123hexo clh ...














