oheart / oheart.github.io

Hexo-blog

Home Page:https://oheart.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hexo-blog

用hexo-blog搭建的个人博客。

预览地址:https://oheart.github.io/

doc

中文doc
英文doc

初始化hexo-blog

  1. npm install hexo-cli -g
  2. hexo init blog
  3. cd blog
  4. npm install
  5. hexo server

常见用法

  1. 新建文章: hexo new �文章名
  2. 新建页面:hexo new page about
    用localhost:4000/about/index.html访问
  3. 修改项目根目录的_config.yml中的 post_asset_folder 参数设置文章的资源文件夹要不要.默认为false,设置为true新建文章时可以生成对应的文件夹
    资源文件夹
  4. 部署(deploy)
  • github新建oheart.github.io的仓库,这里的oheart是用户名。
  • doc
  • hexo generate - d 文件生成后立即部署网站
  • 上传一个README.md到github

编辑文章内容

  1. title: 标题
  2. date: 创建日期
  3. tags: 标签
  4. categories: 分类

scaffolds里面的模板(md文件)

  1. post.md(新建文章的模板)
    给post.md添加categories字段,那么每次新建文章时就会多出来一个categories字段.
  2. page.md(新建页面的模板)
  3. draft.md()

参考链接

  1. hexo+github搭建个人博客01
  2. hexo+github搭建个人博客02

About

Hexo-blog

https://oheart.github.io/


Languages

Language:HTML 74.1%Language:CSS 16.4%Language:JavaScript 9.5%