效果:
☑字体调整
☑个人化
☑评论
☑访问统计(google analysis)
☒头像翻转效果
本地环境搭建
git
github的桌面版
ruby 3.1.3 安装地址:https://rubyinstaller.org/downloads/
jekyll 4.3.1 安装命令:
gem install jekyll
bundle 安装命令:
gem install bundler
安装完成之后,打开命令行窗口,cd到项目的文件夹(项目可以克隆下来),如果没有Gemfile,先运行bundle init
,运行 bundle add jekyll
(如果gemfile有jekyll的路径可以忽略),运行bundle install
,运行 bundle exec jekyll serve -P 5555 --watch
服务启动成功就可以直接访问出现的链接。–watch允许实时更新效果。
说明
- static里存放的是一些静态的设置,img里是头像和网站的标识,logo是头像,favicon.ico是标识。
- posts里更新博客要使用的材料
- _posts里更新博客,博客用0000-00-00-标题.md来命名,博客里前面加上yaml说明:
---
layout: mypost
title: 标题
categories: [分类,...]
extMath: true(需要用数学公式的时候加上)
---
评论用的是:utteranc ,只在博客显示的页面(_layouts\mypost.html)添加了评论,会把评论存放到我github的仓库的issue里,同时会发邮件提示。
参考:
使用jekyll和bundle https://jekyllrb.com/tutorials/using-jekyll-with-bundler/
在windows上基于github搭建个人博客平台https://zhuanlan.zhihu.com/p/102346113
模板:https://github.com/TMaize/tmaize-blog
基于Jekyll搭建个人博客 https://wu-kan.github.io/2019/01/18/%E5%9F%BA%E4%BA%8EJekyll%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/