hexo+gitee搭建个人博客
本人博客地址
前提需要下载
1. node.js
node -v
2.npm
npm -v
下载成功的如下:
3下载hexo
npm install hexo -g
hexo
hexo v
报错:
bash: hexo: command not found"问题
解决办法
成功如下:
hexo init
‘hexo’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
如果你的git中已经安装了hexo,可以在git bash运行你的这个命令。
hexo init blog
然后生成你的相关的博客的目录 ,
一定要你的blog目录执行这些hexo操作
hexo clean#构建生成的页面的相关的内容hexo g# 项目启动hexo s
切换到你的themes的目录
cd themes/
下载 Fluid的主题
git clone https://gitee.com/mirrors/hexo-theme-fluid.git
一定要修改你的_config.yml文件里面的theme 为你的blog/thems/你的主题的目录的名字。
在你的这个目录的_config.yml文件中可以进行添加或者删除你的导航栏
menu: - { key: "home", link: "/", icon: "iconfont icon-home-fill" } - { key: "archive", link: "/archives/", icon: "iconfont icon-archive-fill" } - { key: "category", link: "/categories/", icon: "iconfont icon-category-fill" } - { key: "tag", link: "/tags/", icon: "iconfont icon-tags-fill" } - { key: "about", link: "/about/", icon: "iconfont icon-user-fill" } - { key: "links", link: "/links/", icon: "iconfont icon-link-fill" }
关于我页面的修改:
---------------------------# 关于页# About Page#---------------------------about: enable: true banner_img: /img/default.png banner_img_height: 60 banner_mask_alpha: 0.3 subtitle: avatar: /img/avatar.png name: "一个热编程的程序员,一直在研究怎么达到一种心流状态" intro: "An elegant theme for Hexo" # 更多图标可从 https://hexo.fluid-dev.com/docs/icon/ 查找,`class` 代表图标的 css class,添加 `qrcode` 后,图标不再是链接而是悬浮二维码 # More icons can be found from https://hexo.fluid-dev.com/docs/en/icon/ `class` is the css class of the icon. If adding `qrcode`, The icon is no longer a link, but a hovering QR code icons: - { class: "iconfont icon-github-fill", link: "https://github.com", tip: "GitHub" } - { class: "iconfont icon-douban-fill", link: "https://douban.com", tip: "豆瓣" } - { class: "iconfont icon-wechat-fill", qrcode: "/img/favicon.png" }
创建.md文件并进行上传操作:
hexo new "<>"
在你的个人博客目录:
cd C:\Users\24473\Desktop\hexo\blog\blog\source\_posts
你也可以手动的移动.md文件在这个目录,hexo会自动识别
hexo clean #清除一些缓存 hexo g #生成html文件hexo s #启动hexo
部署到Gitee上面
deploy: type: git repo: https://gitee.com/smallcutemonkey/smallcutemonkey.git branch: master