Lufer

  • 首页
  • 编程
  • 学习笔记
  • 日常折腾
Lufer
Code the World
  1. 首页
  2. 编程
  3. Blog
  4. 正文

Melody主题个性化修改memo

2020年12月28日 613点热度 0人点赞 0条评论

1. 修改为Google Analytics V4

Google Analytics已更新到4.0版本,页面引用方式有变化,在Melody主题的dev分支下作者已经更新了代码,master分支需要手动修改。

文件位置\hexo-theme-melody\layout\includes\head.pug

修改代码

if theme.google_analytics
  script(src="https://www.googletagmanager.com/gtag/js?id="+theme.google_analytics)
  script.
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', '!{theme.google_analytics}');

2.修改行内引用代码块颜色

主题配置文件的颜色选项不能修改行内代码块的颜色,原颜色太淡。

文件位置\hexo-theme-melody\source\css\var.styl

修改代码

$code-background = rgba(101,196,235,0.2)

本文所做修改已打包至hexo-theme-melody-lufer,可通过npm install hexo-theme-melody-lufer来进行安装。

使用此包注意要修改_config.yml中的theme为theme: melody-lufer。
把主题配置文件名由_config.melody.yml改为_config.melody-lufer.yml

标签: Hexo Melody
最后更新:2023年7月10日

Lufer

新的一天开始啦

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

文章目录
  • 1. 修改为Google Analytics V4
  • 2.修改行内引用代码块颜色

COPYRIGHT © 2022 lufer.cc.

Theme Kratos Made By Seaton Jiang

鲁ICP备2021045819号