• hexo搭建博客


    Hexo Usage


    下载安装

    • 安装Node
      到Node.js官网下载相应平台的最新版本,一路安装即可。我用的是node-v0.10.22-x86.msi

    • 安装Git
      Git的客户端很多,我用的是msysgit,喜欢用绿色版本Portable application for official Git for Windows 1.8.4,下载下来设置一下环境变量即可,Git_HOME,%Git_HOME%in之类的,不多说。

    github

    • 注册账号
    • 新建仓库
    • add shh公钥

    hexo的安装和初始化

    • 安装 npm install -g hexo
    • 升级
    • 初始化 init
    • 生成网站 hexo generate
    • 服务器 hexo server
      服器会跑在 http://localhost:port (port 预设为 4000,可在 _config.yml 设定)

    hexo的使用

    写文章
    • 创建新博客 hexo new
    • 离线编辑文章属性
      title: postName #文章页面上的显示名称,可以任意修改,不会出现在URL中
      date: 2013-12-02 15:30:16 #文章生成时间,一般不改,当然也可以任意修改
      categories: default#文章分类目录,可以为空,注意:后面有个空格
      tags: [hexo]#文章标签,可空,多标签请用格式[tag1,tag2,tag3],注意:后面有个空格
      description: 你对本页的描述
    属性
    - - - 
    这里开始使用markdown格式输入你的正文。
    
    自定义主题

    all of theme
    pacman
    modernist
    ishgo

    • 安装主题
      git clone https://github.com/heroicyang/hexo-theme-modernist.git themes/modernist
      目录是否是modernist无所谓,只要与_config.yml文件一致即可。
      安装完成后,打开hexo_config.yml,修改主题为modernist
      theme: modernist
      打开hexo hemesmodernist目录,编辑主题配置文件_config.yml:
    • 更新主题
      cd themes/modernist
      git pull

    域名申请

    GitHubPages默认为每个用户分配了一个二级域名『your_user_name.github.com』或『your_user_name.github.io』。
    如果你对上述域名不满意,可以到狗爹上申请一个自己的域名,然后绑定到GitHub Pages。绑定方法很简单,在repo根目录下建立一个CNAME文件,里面写上域名即可。

  • 相关阅读:
    Python3 面向对象小练习
    Python3 面向对象进阶1
    Python3 类的继承小练习
    Python3 类的继承
    Python3 数据结构之词频统计(英文)
    Python3 类与对象之王者荣耀对战小游戏
    Python3 类与对象
    SQL优化单表案例
    SQL性能分析
    索引简介
  • 原文地址:https://www.cnblogs.com/TaogenJia/p/5354879.html
Copyright © 2020-2023  润新知