目录

Hugo Loveit主题使用记录

LoveIt主题的使用文档非常非常详细,小白也可以轻松掌握。文档地址

有问题先看exampleSite

基本上设置的问题都可以在这里找到参考模板

categories的设置

post里有一项

categories = ["cate"]

在content/categories文件夹下要生成对应名字的文件夹。在文件夹里建立’_index.md’,设置分类名字。这样就可以在主页的"分类" 下自动归档了。

关联github

和远程仓连接

先cd到public这个文件夹,然后主要执行以下的命令

git init
git add .
git remote add origin 远程仓名字
git pull origin main # 一定要
git push origin main

远程仓的名字是github.io那个仓的ssh地址。main是仓的branch的名字,可以在终端通过

git branch -a

查看所有branch的名字

最后一行还可以换成

git push -f -u origin master

指把本地仓替换掉远程仓。

一些报错

  1. “Your name and email address were configured automatically based on your username and hostname.” 这个是本机的名字和远程仓的名字不一样。用下面两条命令修改一下
git config --global user.name <your name>
git config --global user.email <your email>
  1. “Updates were rejected because the tip of your current branch is behind its remote counterpart. Integrate the remote changes (e.g. ‘git pull …’) before pushing again.” 这个是本地仓和远程仓没有合并,冲突了。执行下面的命令
git config pull.rebase false

还是一堆错

如果远程仓没用了,又和本地仓有冲突,建议把远程仓清空。随便建立一个空的文件夹,在文件下初始化git,然后操作详见清空远程仓

插入公式

详细参考公式

注意点:

  1. 如果要插入的下标很简单,比如$\mu_b$,可以直接用\mu_b。如果下标比较复杂,比如$\mu_\theta$,记得用
\mu\_\theta

而不是\mu_\theta,不然容易报错。