hexo+github搭建自己的云笔记
Created At :
Count:298
Views 👀 :
准备
创建仓库
在github创建一个仓库,仓库名字为 用户名.github.io eg:我的主页是 https://github.com/ice-a 用户名就是 ice-a 那么创建就是 ice-a.github.io
|
本地搭建hexo
# 创建一个文件夹 eg: 在桌面建一个文件夹 C:\Users\ice-a\Desktop\hexo_demo cd C:\Users\ice-a\Desktop\hexo_demo npm install -g hexo-cli // 安装hexo hexo init temp_hexo_demo // hexo初始化 cd temp_hexo_demo // 切换到路径 npm install // 安装依赖
|
修改网站的相关配置
# 在 _config.yml 文件内修改 title,等内容
|
创建标签及分类文件夹
# 标签 hexo new page tags // 创建完会在source文件夹下有个tags文件夹,修改index.md里边的内容 --- title: tags date: 2024-07-13 09:38:12 type: "tags" comments: false top_img: false --- # 分类 hexo new page cetegories // 和tags的同样 --- title: categories date: 2024-07-13 10:20:06 aside: false top_img: false type: "categories" ---
|
将笔记放入_posts里边即可

部署在github
修改 _config.yml的 deploy
deploy: type: git repo: https://github.com/ice-a/ice-a.github.io.git branch: master
修改大概16行的位置的url url: https://ice-a.github.io 执行构建并部署 hexo clean hexo generate hexo deploy
|
配置githb
setting -> page -> Branch -> master -> save
|
等待几分钟就可以访问了
https://ice-a.github.io/