# note_blogs_hexo **Repository Path**: panda_code_note/note_blogs_hexo ## Basic Information - **Project Name**: note_blogs_hexo - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-05-22 - **Last Updated**: 2023-06-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 第一章 Hexo基本环境 ## 1.1 必备的软件环境 1. Git:需要在Github部署博客系统 2. 新建Github账户,并新建仓库:**固定名称【账户名称.github.io】** 3. Node:下载、安装、调试博客系统 4. Typora:编写文章的文本编辑器 ## 1.2 初始化 1. 安装Hexo:在命令行用npm安装 ```sh npm install -g hexo-cli # 或者 cnpm install -g hexo-cli ``` 2. 新建博客站点目录,并初始化 ```sh hexo init ``` 3. 进入目录并使用npm初始化站点 ```sh npm install # 或者 cnpm install ``` ## 1.3 hexo博客目录说明 | 目录 | 作用 | | ------------ | --------------------- | | node_modules | 当前站点的依赖包 | | public | 存放生成的页面 | | scaffolds | 生成文章的一些模板 | | source | 用来存放你的文章 | | themes | 主题 | | _config.yml | 博客的配置文件 | | package.json | npm安装的依赖配置文件 | ## 1.4 安装Hexo必须依赖 ### 1. 搜索 - 搜索依赖 ```sh npm install hexo-generator-searchdb --save ``` - 配置_config.yml ```yml # 生成的搜索的索引文件 search: path: search.xml field: post format: html ``` ### 2. RSS订阅 - 下载依赖 ```sh npm install hexo-generator-feed ``` - 添加配置_config.yml ```yml # Extensions plugins: hexo-generator-feed #Feed Atom feed: type: atom path: atom.xml limit: 20 ``` ```yml feed: type: atom path: atom.xml limit: 20 hub: content: content_limit: 140 content_limit_delim: ' ' order_by: -date ``` ### 3. Git - 下载依赖 ```sh npm install hexo-deployer-git ``` - 配置_config.yml ```yml deploy: type: "git" repo: git@github.com:xiaoliuxuesheng/xiaoliuxuesheng.github.io.git branch: master ``` ## 1.5 Hexo命令行 ### 1. hexo init ```sh hexo init [folder] ``` > - 命令用于初始化本地文件夹为网站的根目录 > - folder 可选参数,用以指定初始化目录的路径,若无指定则默认为当前目录 ### 2. hexo new - 新建正式文章 ```sh hexo new [layout]