anzhiyu主题搭建友链朋友圈下-前端

    首先我们来看一下anzhiyu主题的朋友圈设置:

1
2
3
4
5
6
# 朋友圈配置
friends_vue:
enable: true
vue_js: https://cdn.jsdelivr.net/npm/ciraos-static@1.0.0/js/index.8ca3b1ec.js
apiurl: https://fcircle.ciraos.top/ # 朋友圈后端地址
top_background: https://cdn.jsdelivr.net/gh/ciraos/ciraos-static@main/img/miku.webp

    这里分为三部分:

前端 index.js 获取

    anzhiyu主题给了我们两种方法:

  1. https://npm.elemecdn.com/anzhiyu-blog-static@1.0.0/js/friends_vue/index.js下载下来,然后将代码中的friends.anheyu.com替换为您的后端url然后在上述配置中的vue_js引入;
  2. hexo-circle-of-friends-front项目下载下来之后,将代码中的friends.anheyu.com替换为你自己的后端链接,然后npm run build,然后会在dist/assets文件夹下生成一个js文件,这就是我们前端需要的js文件啦!然后把它放在你可以引入的地方,不过不建议本地引入。

朋友圈页面配置

    在博客根目录打开git bash here,执行以下命令,创建一个友链pyq的页面:

1
hexo new page "fcircle"

    接着再编辑一下友链pyq页面的font-matter
    只展示主要部分:

1
2
3
4
5
6
---
title: 朋友圈
type: 'fcircle'
comments: false
aside: false
---

    注意,留心网址最后有没有/,如果没有,请加上,反之,则忽略。
    OK! 基本上部署过程已经结束!记得要在配置文件的menu中加上pyq的链接地址哦!
    然后我们就可以hexo s查看效果啦!!