一、创建github账号,本地安装git

github创建

官网注册:https://github.com/

本地安装git,步骤:

  • 安装git

    windows:https://git-for-windows.github.io/
  • TortoiseGit安装

    https://tortoisegit.org/
  • 添加 SSH key

    • 1、首先需要检查你电脑是否已经有 SSH key
      运行 git Bash 客户端,输入如下代码:

      1
      2
      $ cd ~/.ssh
      $ ls

      这两个命令就是检查是否已经存在 id_rsa.pub 或 id_dsa.pub 文件,如果文件已经存在,那么你可以跳过步骤2,直接进入步骤3。

    • 2、创建一个 SSH key

      1
      $ ssh-keygen -t rsa -C "your_email@example.com"

      代码参数含义:

      • -t 指定密钥类型,默认是 rsa ,可以省略。
      • -C 设置注释文字,比如邮箱。

        最终生成 ==id_rsa==和 ==id_rsa.pub== 两个秘钥文件

    • 3、添加你的 SSH key 到 github上面去
      拷贝==id_rsa.pub==文件内容,至github账号相关设置
    • 4、测试ssh
      1
      $ ssh -T git@github.com

建立github仓库

仓库命名规则:用户名.github.io

二、安装node.js

到Node.js官网下载相应平台的最新版本,一路安装即可(或者搜索安装程序下载安装)

三、使用 Hexo 创建博客框架

安装Hexo

打开git shell,输入命令:

1
npm install hexo-cli -g

等待安装

部署Hexo

打开 Git Shell,进入想要部署的目录:

  • 1、hexo初始化

    1
    hexo init Hexo

    创建 hexo 目录

  • 2、安装依赖文件

    1
    2
    $ cd Hexo
    $ npm install
  • 3、启动

    1
    2
    $ hexo generate (可以简写成: hexo g)
    $ hexo server

    访问页面 http://localhost:4000/

    将本地文件部署到 GitHub

  • 修改 Hexo 中的 _config.yml 文件,添加如下

    1
    2
    3
    4
    deploy:
    type: git
    repo: https://yourname:password@github.com/yourname/yourname.github.io.git
    branch: master
  • 将其 deploy 到仓库中

    1
    2
    3
    $ hexo clean
    $ hexo generate
    $ hexo deploy

    通过 https://yourname.github.io 即可访问博客

四、增加模板(jacman)

  • 下载模板
    https://github.com/wuchong/jacman
  • 拷贝至hexo\themes目录下面
  • 修改hexo下的_config.yml文件

    1
    2
    3
    theme: jacman
    stylus:
    compress: true
  • 重启hexo

五、Jacman配置

https://github.com/wuchong/jacman

安装RSS

切换到blog根目录下,输入:

1
$ npm install hexo-generator-feed

安装sitemap

切换到blog根目录下,输入:

1
$ npm install hexo-generator-sitemap

之后重启博客,访问/atom.xml和/sitemap.xml,会发现已经生成了。可以把sitemap提交到搜索引擎的站长平台来增加收录。

增加站内搜索(google)

  • 注册Search Console
  • 设置_config.yml
    1
    2
    3
    google_cse:
    enable: true
    cx: 010843689475283178591 ## e.g. 018294693190868310296:abnhpuysycw your Custom Search ID.

艾萨克·阿西莫夫

文档来源:百度百科

  艾萨克·阿西莫夫(英语:Isaac Asimov,1920年1月2日-1992年4月6日),美国著名科幻小说家、科普作家、文学评论家,美国科幻小说黄金时代的代表人物之一。
  阿西莫夫一生著述近500本,题材涉及自然科学、社会科学和文学艺术等许多领域,与儒勒·凡尔纳、赫伯特·乔治·威尔斯并称为科幻历史上的三巨头,同时还与罗伯特·海因莱因、亚瑟·克拉克并列为科幻小说的三巨头。 同时也是著名的门萨学会会员,并且后来担任副会长。 其作品中以《基地系列》、《银河帝国三部曲》和《机器人系列》三大系列被誉为“科幻圣经 ”。曾获代表科幻界最高荣誉的雨果奖和星云终身成就大师奖。小行星5020、《阿西莫夫科幻小说》杂志和两项阿西莫夫奖都是以他的名字命名。 他提出的“机器人学三定律”被称为“现代机器人学的基石”。

Kindle电子书下载

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment