前言

halo博客版本:2.0以上 系统:win11 wsl2 中的 ubuntu-20.04 方式:docker方式

本机上已经安装了docker desktop image-1675411355351

安装

安装halo

  docker run \
  -it -d \
  --name halo \
  -p 8090:8090 \
  -v ~/.halo2:/root/.halo2 \
  halohub/halo:2.2.0 \
  --halo.external-url=http://localhost:8090/ \
  --halo.security.initializer.superadminuser=admin \
  --halo.security.initializer.superadminpassword=P@88w0rd  \
  --spring.thymeleaf.cache=false

安装hao主题

cd ~/.halo2
mkdir -p themes/theme-hao
cd themes/theme-hao
git init
touch test
git add .
git commit -m "test"
rm -rf test 
git checkout -b main
git remote add origin git@github.com:shy-share/halo-theme-hao.git
git fetch --all &&  git reset --hard origin/main && git pull

git@github.com:shy-share/halo-theme-hao.git 是我fork hao主题的自己的仓库,你如果要提交pr,也可以自己fork一下,然后使用自己的仓库地址