侧边栏壁纸
博主头像
流殃博主等级

用微笑面对生活

  • 累计撰写 176 篇文章
  • 累计创建 43 个标签
  • 累计收到 2 条评论

目 录CONTENT

文章目录

halo博客主题开发

流殃
2023-02-03 / 0 评论 / 0 点赞 / 134 阅读 / 194 字 / 正在检测是否收录...

前言

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一下,然后使用自己的仓库地址

0

评论区