使用githubPage+hexo搭建个人博客

hexo常用命令

bash 复制代码
hexo init                      #初始化文件夹
hexo generate[g]               #生成静态页面至public目录
hexo server[s]                 #开启预览访问端口(默认端口4000,'ctrl + c'关闭server)
hexo deploy[d]                 #部署到GitHub
hexo new[n] "postName"         #新建文章
hexo new[n] page "pageName"    #新建页面

选择主题

  1. 选一个主题并配置,具体操作根据READEME
    Themes
  2. 第一种方式:拉到hexo目录下的themes目录下
    第二种方式:npm instll xxx(建议)

博客配置

  1. 根据文档修改
  2. 上传github
    在GitHub Pages上部署Hexo
  3. 配置
bash 复制代码
deploy:
  type: git
  repo: https://github.com/<username>/<project>
  # example, https://github.com/hexojs/hexojs.github.io
  branch: gh-pages
  1. 执行 hexo clean && hexo deploy
  2. 浏览 username.github.io,检查你的网站能否运作

编写文章

  1. 创建文章
bash 复制代码
hexo new 使用githubPage+hexo搭建个人博客
  1. 在source/_posts下找到创建的md文章进行修改
  2. 编写完成后进行部署
bash 复制代码
hexo g
hexo d
相关推荐
miofly2 小时前
Claude 自主发现类 CRISPR 结构的新型逆转录酶系统:Anthropic 生命科学实验室的早期成果
开源·github
HelloGitHub4 小时前
《HelloGitHub》第 126 期
开源·github
miofly5 小时前
GitHub 日榜趋势速报 | 2026-09-28
开源·github
miofly10 小时前
GitHub 日榜趋势速报 | 2026-09-27
开源·github
怕浪猫10 小时前
顶级模型一句话,AI 写出了能玩的 QQ飞车
前端·面试·github
粥里有勺糖10 小时前
视野修炼-技术周刊第134期 | 豆豆眼头像
前端·github·aigc
粥里有勺糖10 小时前
体验一下最近比较🔥的闪卡SKILL
前端·github
miofly10 小时前
GitHub 日榜趋势速报 | 2026-09-26
开源·github
峰向AI10 小时前
让代码自己写出 PRD:两个 Skill 把业务规则变成可追溯的文档
github
峰向AI10 小时前
阿里开源:把企业级 Agent 落地经验写成了一本 30 章的开源手册
github