Github-hexo搭建个人博客

本文指导你从安装Node.js开始,通过hexo搭建本地博客,再到部署到GitHub,自定义Yilia主题,并掌握关键步骤如文章创建、生成和部署。涵盖主题切换与配置,确保你的博客技术气息浓厚且易于管理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


title: Github+hexo搭建个人博客
tags: created by luffy

一、hexo搭建本地博客

1.安装Node.js
2.npm install -g cnpm --registry=https://registry.npm.taobao.org
3.cnpm install -g hexo-cli
4.新建一个文件夹,来存放博客内容
5.进入文件夹,cmd命令:hexo init
6.启动博客:hexo s
7.新建文章:hexo n "blogName"(生成的是md文件)
8.生成博客文章:hexo g

二、博客部署到Github

1.Github新建仓库
2.仓库命名必须为:用户名.github.io
3.安装hexo相关git插件:cnpm install --save hexo-deployer-git
4.blog目录下设置_config.yml文件:
    Deployment下
    type: git 
    repo: 仓库地址(后缀为.git的url)
    branch: master
5.hexo d

三、自定义博客主题

GitHub:github.com/litten/hexo-theme-yilia
更换主题:
    1.git clone 
        https://github.com/litten/hexo-theme-yilia.git themes/yilia
        https://github.com/luuman/hexo-theme-spfk.git themes/spfk
    2.修改_config,yml: theme: yilia
    3.重启hexo:hexo clean->hexo g-> hexo s
    4.推到远端:hexo d
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值