内容转载自煮雪话河山
{% link Hexo美化:本站日志创建及配置,煮雪话河山,https://blog.cent1pedee.top/posts/bda0f2db.html %}
{% note info simple %}info 非常感谢煮雪话河山的帮助,写了教程,还帮忙找到了产生的错误{% endnote %}

第一步

在{% label _config.anzhiyu.yml %}下的{% label menu: %}添加

  关于: 
    关于本人: /about/ || anzhiyu-icon-paper-plane
    想做的事: /todolist/ || anzhiyu-icon-stream
    本站日志: /update/ || anzhiyu-icon-bolt  # 没有就新建一个

第二步

  • 新建本站日志分类页
Hexo new page update
```md
---
title: 更新日志
date: 2024-09-23 00:00:00
type: update
comments: false
aside: false
top_img: false
---

{% tip home %}本站日记是后面建的,前面有些时间对不上可能{% endtip %}

{% timeline 2024 %}
# <!-- timeline 09-23 -->
# 更新内容
# <!-- endtimeline -->
<!-- timeline 10-29 -->
[增加网站统计](https://blog.667408.xyz/posts/263c605d)
[文章改成永久链接](https://blog.667408.xyz/posts/614e46f9)
<!-- endtimeline -->
<!-- timeline 10-28 -->
[友人帐换了一个样式](https://blog.667408.xyz/posts/936c664c)
[增加页脚动物园](https://blog.667408.xyz/posts/15b5a328)
<!-- endtimeline -->
<!-- timeline 10-08 -->
[增加来访者信息](https://blog.667408.xyz/posts/2370fd62)
<!-- endtimeline -->
<!-- timeline 10-07 -->
[把博客源码上传到github](https://blog.667408.xyz/posts/c6ad5cda)
<!-- endtimeline -->
<!-- timeline 09-27 -->
[添加追番页面](https://blog.667408.xyz/posts/e3ca322b)
<!-- endtimeline -->
<!-- timeline 09-26 -->
[增加了文章卡片的擦亮动画](https://blog.667408.xyz/posts/7208a5f5)
[添加待办清单](https://blog.667408.xyz/posts/b47abf66)
<!-- endtimeline -->
<!-- timeline 09-25 -->
[添加游戏收藏页](https://blog.667408.xyz/posts/a4d0465e)
<!-- endtimeline -->
<!-- timeline 09-23 -->
本站诞生日
<!-- endtimeline -->

{% endtimeline %}

第三步

  • 在{% label source/_data %}下新建{% label update.yml %}文件,并添加以下内容:
- top_background: "https://s11.ax1x.com/2023/12/20/pioqoNT.jpg"
  class_name: "日志"
  description: "本站日志"
  tip: "这里是本站的更新日志"
  buttonLink: "https://blog.667408.xyz/about/"
  buttonText: "关于本站"

第四步

  • 在{% label themes/anzhiyu/layout/page.pug %}中添加以下内容,注意缩进对应,{% label + %}是给你看的,记得删除
      when 'music'
        include includes/page/music.pug
      when 'todolist'
        include includes/page/todolist.pug
      when 'games'
        include includes/page/games.pug
      when 'envelope'
        include includes/page/envelope.pug
+      when 'update'     
+        include includes/page/update.pug

第五步

  • 在{% label themes/anzhiyu/layout/includes/page %}下新建{% label update.pug %}文件,并添加以下内容:
#update
  if site.data.update
    each i in site.data.update
      .author-content.author-content-item.UpdatePage.single(style = `background: url(${i.top_background}) left 37% / cover no-repeat !important;`)
        .card-content
          .author-content-item-tips=i.class_name
          span.author-content-item-title=i.description
          .content-bottom
            .tips=i.tip
          .banner-button-group
            a.banner-button(href=i.buttonLink)
              i.anzhiyufont.anzhiyu-icon-arrow-circle-right(style='font-size: 1.3rem')
              span.banner-button-text=i.buttonText

  #article-container
    != page.content

本地三连预览

hexo clean; hexo g; hexo s