hexo gitee搭建博客问题

发布时间 2023-06-11 14:59:12作者: france水

下载hexo

  • npm install -g hexo-cli
  • 出现 Error: EPERM: operation not permitted错误
    • 删除C:\Users{你的用户文件夹}/目录中的.npmrc文件,一般为隐藏
    • 以管理员身份运行打开cmd

下载依赖

  • Error: EPERM: operation not permitted, open 'D:\nodejs\soft\node_cache_cacache\tmp\c1d39dfc'
    • vscode=>属性=>兼容性=>勾选以管理员身份运行此程序
    • 在系统中搜索框 输入 Windos PowerShell,以管理员的身份打开;
    • set-ExecutionPolicy RemoteSigned A

添加音乐功能

#博客目录下
aplayer:
  meting: true
  asset_inject: false
#主题yml文件下  
aplayerInject:
  enable: true
  per_page: true
#主题yml文件下
inject:
  head:
  bottom:
    # - <script src="xxxx"></script>
    # netease  tencent服务商  到平台中f12找data-matcher 中的id    不能换行
    - <div class="aplayer no-destroy" data-id="959789984" data-server="netease" data-order="list" data-prereload="auto" 
    data-type="playlist" data-fixed="true" data-autoplay="true data-mutex="true"></div>

添加追番

npm install hexo-bilibili-bangumi --save
#在hexo g之前
更新番剧数据:hexo bangumi -u
删除数据命令:hexo bangumi -d

#主目录yml
bangumi:
  enable: true
  path: bilibili/index.html
  vmid:
  title:
  quote:
  show: 1
  loading:
  metaColor:
  color:
  webp:
  
enable: 是否启用
path: 番剧页面路径,默认 bangumis/index.html
vmid: 哔哩哔哩番剧页面的 vmid(uid)
title: 该页面的标题
quote: 写在页面开头的一段话,支持 html 语法
show: 初始显示页面:0: 想看 , 1: 在看 , 2: 看过,默认为 1
loading: 图片加载完成前的 loading 图片
metaColor: meta 部分 (简介上方) 字体颜色
color: 简介字体颜色
webp: 番剧封面使用 webp 格式 (此格式在 safari 浏览器下不显示,但是图片大小可以缩小 100 倍左右), 默认 true
vmid 登录哔哩哔哩后前往 https://space.bilibili.com/ 页面,网址最后的一串数字就是 uid

公开追番隐私  设置-安全隐私-空间设置

hexo new page "bilibili"
可以在主题menu下添加  追番: /bilibili/

图片背景

Refused to apply style from 'http://localhost:4000/css/custom.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

- <link rel="stylesheet" type="text/css" href="./css/custom.css" media="defer" onload="this.media='all'">

外挂标签