0
点赞
收藏
分享

微信扫一扫

hexo静态博客 部署到xxx.github.io github 静态页

舟海君 2024-06-04 阅读 31
github

hexo安装

npm install hexo-cli -g
hexo init blog
cd blog
npm install
hexo server

key配置

ssh-keygen -t ed25519 -C "email@e.com"

添加key到github

err
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

配置GitHub仓库

用户名.github.io

 git config --global user.email "xx@qq.com"
 git config --global user.name "user"

_config.yml

deploy:
  type: git
  repo: <repository url> # 替换为你的GitHub仓库url
  branch: master

安装hexo-deployer-git插件:

npm install hexo-deployer-git --save

部署到GitHub:

hexo clean
hexo g #hexo generate 
hexo d #hexo deploy

在这里插入图片描述

建立仓库 testhtml

在这里插入图片描述

Settings -> pages

https://xxx.github.io/testhtml/index.html

举报

相关推荐

0 条评论