404

Hugo PaperMod主题添加不蒜子Busuanzi浏览统计

不蒜子Busuanzi浏览统计 Busuanzi 我是使用了Git的子模块进行主题的管理,所以为了保持子模块的完整性,所有修改都在Hugo框架中进行。 head.html 复制 head.html文件位于[Hugo_blog]/themes/PaperMod/layouts/partials/head.html 至 [Hugo_blog]/layouts/partials/head.html (如没有文件夹需要自己创建) 搜索{{- /* Styles */}} 在其上一行添加代码: 1 2 3 4 {{- if .Site.Params.busuanzi.enable -}} <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script> <meta name="referrer" content="no-referrer-when-downgrade"> {{- end -}} footer.html 复制 footer.html文件位于[Hugo_blog]/themes/PaperMod/layouts/partials/footer.html 至 [Hugo_blog]/layouts/partials/footer.html (如没有文件夹需要自己创建) 在footer标签中,添加新代码: 1 2 3 4 5 6 7 8 9 10 {{ if .Site.Params.busuanzi.enable -}} <div class="busuanzi-footer"> <span id="busuanzi_container_site_pv"> 本站总访问量<span id="busuanzi_value_site_pv"></span>次 </span> <span id="busuanzi_container_site_uv"> 本站访客数<span id="busuanzi_value_site_uv"></span>人次 </span> </div> {{- end -}} single.html 复制...

2024-01-03 · 1 min · 108 words · 0x4b404ec
404

Hugo PaperMod主题添加utterances评论

Hugo PaperMod主题添加utterances评论 What is ‘utterances’ https://utteranc.es/ utterances 是一款基于 GitHub issues 的开源评论插件. 主打免费开源~ 安装Utterances 申请Github App 打开 Utterances 进行安装 选择要连接的库 确保选择的库是公开(public)的,否则你的读者将无法查看问题/评论。 确保在对应库安装应用程序,否则用户将无法发表评论。 如果你的库是fork的一个分支,在设置页面中并确保issues功能是打开的。 修改站点配置文件 在根目录layouts\partials下创建comments.html文件并编辑(注意不是主题文件夹中的layouts) 1 2 3 4 5 6 7 8 9 10 11 {{- /* Comments area start */ -}} {{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}} <script src="https://utteranc.es/client.js" repo="安装app的个人库名" issue-term="title" label="Comment" theme="github-light" crossorigin="anonymous" async> </script> {{- /* Comments area end */ -}} 其中 repo格式类似于:0x4b404ec/0x4b404ec.github.io...

2024-01-01 · 1 min · 77 words · 0x4b404ec

[转] Hugo+GithubAction搭建Pages

利用Hugo+Github Pages搭建个人博客 转载于:https://www.cnblogs.com/liumylay/articles/17936667.html 转载于:https://www.cnblogs.com/liumylay/articles/17936667.html 转载于:https://www.cnblogs.com/liumylay/articles/17936667.html 前言 创建 GitHub 帐户 安装git,下载对应系统版本 exe ,无脑点击下一步。 安装hugo(extended edition, v0.112.0 or later) 打开 Github 中的 Hugo 库,打开右边侧边栏About下面的 Realeases,下载最新的版本,本次下载为:hugo_extended_0.121.1_windows-amd64.zip 解压后,将其中的 hugo.exe 放到指定的安装目录,比如 D:\softwares\Hugo\bin,然后将该目录添加到系统环境变量(win+R → sysdm.cpl → 高级 → 环境变量 → 系统变量 Path)的 Path 下。 打开命令行,输入 hugo version,显示版本号即为安装成功 在几分钟内利用hugo快速发布自己的个人博客 快速开始 使用Git Bash依次输入以下命令,即可建立预览一个PaperMod主题的hugo网站: 1 2 3 4 5 6 hugo new site myblog cd myblog git init git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod echo "theme = 'PaperMod'" >> hugo....

2023-12-31 · 5 min · 927 words · 0x4b404ec

Unity PlayableDirector正播倒播处理

Unity PlayableDirector(Timeline) 正播倒播处理 项目要求控制Timeline的播放状态,官方给出的方案只有正播的处理,并没有倒播的接口。 而且网上搜索的一些方案都是使用协程,但是协程在处理中途暂停继续播放上比较难处理。 所以自己随便写了一个。处理上比较傻瓜。 下载DoTween插件 略… TimelineHelper.cs 主要是提供了两个静态接口,用来实现挂TimelineDirector组件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 using UnityEngine; using UnityEngine.Playables; public static class PlayableExpansion { /// <summary> /// 为director添加自定义控制器 /// </summary> /// <param name="director"></param> /// <returns></returns> public static PlayableController AddPlayableController(this PlayableDirector director) { return director.gameObject.AddComponent<PlayableController>(); } /// <summary> /// 为obj添加自定义控制器 /// </summary> /// <param name="obj"></param> /// <returns></returns> public static PlayableController AddPlayableController(this GameObject obj) { return obj....

2023-12-31 · 6 min · 1131 words · 0x4b404ec

0 min · 0 words · 0x4b404ec