# blog **Repository Path**: javathis/blog ## Basic Information - **Project Name**: blog - **Description**: 分享开源软件、分享最新的开源技术 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 4 - **Created**: 2022-07-04 - **Last Updated**: 2025-06-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 准备软件: - git (提供命令git) [git官网](https://git-scm.com/) - notepad++(方便编辑)[notepad++官网](https://notepad-plus-plus.org/) - nodejs(hexo依赖)[nodejs官网](https://nodejs.org/en/) - 7z(压缩包)[7z官网](https://www.7-zip.org/) ## 安装 nodejs、git、notepad++和7z的安装过程省略。主要要说的是hexo的安装和配置。 首先需要配置npm的国内源 ```bash npm config set registry https://registry.npm.taobao.org #配置国内的镜像源 npm info hexo # 测试查看hexo的安装信息,是否是taobao.org的源 ``` ### 安装hexo ```bash npm install -g hexo # 通过npm安装hexo # -g 指定全局安装,可以使用hexo命令 ``` ## 写作 1. 下载代码到本地 ``` git clone https://gitee.com/javathis/blog.git ``` 2. 写博客 + 进入blog目录 + 创建博客 执行命令: ```bash hexo new post #title不用加文件后缀 ``` 进入blog/source/_posts/目录可以看到有一个与\<title\>同名文件夹及\<title\>.md文件,修改md文件即可 ``` --- title: 文章标题 date: 2021-10-20 20:34:02 tags: 作者名 categories: 文章分类 --- // 这里写下你的md博客内容 // .... ``` 3. 本地预览 ```bash npm run start ``` 4. 提交代码 ```bash git add ./source/_posts git commit -m '提交信息' git push ``` ### 发布 进入gitee源码库pages页面 https://gitee.com/javathis/blog/pages 点击页面“更新”按钮 ![](https://pic1.zhimg.com/80/v2-a6d7bff3334406b6ddbea7a64e2b0d9c_720w.png) ### 主题配置 修改配置文件blog/_config.fluid.yml,参考官方文档: > [https://hexo.fluid-dev.com/docs/guide/](https://hexo.fluid-dev.com/docs/guide/) ### 注意 + 代码更新到远程仓库后,需要更新博客pages服务才能看到博客内容!!! + 图片放在如果放在文章同名文件夹下,记得md中图片的路径应该为:./图片名.png ## 参考文档 Hexo 使用文档:https://hexo.io/docs/ 主题使用文档:https://blinkfox.github.io/2018/09/28/qian-duan/hexo-bo-ke-zhu-ti-zhi-hexo-theme-matery-de-jie-shao/#toc-heading-23 写文章一些语法参考 ![](https://pica.zhimg.com/80/v2-ee736b4b4e2fb5d2ad3432598b3644a8_720w.png)