【jekyll】建站日志

网站结构

jekyll官网写的很简洁明了,用的时候去查

变量
模版
语法

高级功能

Google Analytics

一个用来统计用户点击的分析网站

https://analytics.google.com/

使用很简单,一步一步照着做就行了

KaTeX 官方方法

不解析+官方用法 https://github.com/KaTeX/KaTeX

遗留问题

kramdown 总是把 $$y=x^2$$ 解析成 \( \) 的形式,
必需配置一下才能识别 $$ 这种 inline 的形式

效果 \(y=\oint_l \dfrac{\alpha}{1+e^{-z}}dz\)

徽章

github-profile-trophy

  • https://github-profile-trophy.vercel.app/?username=guofei9987&title=Stars,Followers,MultiLanguage,Commits,PullRequest&row=1&column=5
  • https://github-readme-stats.vercel.app/api/pin/?username=guofei9987&repo=scikit-opt&theme=radical
  • https://github-readme-stats.vercel.app/api?username=guofei9987&show_icons=true&theme=radical&hide=commits,prs
  • https://img.shields.io/github/followers/guofei9987?label=%20&logoColor=%231abc9c&style=social

原始版本的自制徽章:

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="20" role="img">
  <text x="0" y="15" style="fill:red;font-weight: bold;">2本
  </text>
</svg>
2本

插入音乐

<iframe frameborder="20" border="20" marginwidth="10" marginheight="0" width="298" height="80" src="/public/assets/追梦人.mp3"></iframe>

打赏模块

见于 https://github.com/guofei9987/donate

颜色美化

code颜色示例(TODO)

一些模版语言

site.posts 指的是 _posts 下的文件,与 layout 无关


下面这个是
【% for category in site.categories %】
  【% if category[0] == '前端' %】
  【% continue %】
  【% endif %】

【% endfor %】


下面这个是展示如何 只取出categories=前端
【% for post in site.categories['前端'] %】
。。。
【% endfor %】

解析到www

github 端用www.guofei.site

阿里云解析时 用cname 和 @ 和 guofei9987.github.io

双线解析

  • 调研了阿里云oss挂载静态网页,感觉非常麻烦。
  • gitee双线部署,但gitee收费不低
  • coding https://www.sunweihu.com/5159.html
  • 双线路 https://www.jianshu.com/p/a530cd48a059

(部署了,又撤下来了,因为每次都要提交两次,嫌麻烦)

搜索:借助Google

https://programmablesearchengine.google.com/

代码拷贝功能

GitHub的API

图片

Stars Forks Watchers

Contributors License

个人的: Followers

github.com/guofei9987/scikit-opt

个人:https://api.github.com/users/guofei9987

仓库API:https://api.github.com/users/guofei9987/repos

其它问题

  1. “自我介绍”页面中的 github logo,只能在浅色背景下正常显示。而GitHub主页一般是深色背景。


您的支持将鼓励我继续创作!