使用jekyll搭建本身的博客系统

方式一

  1. 在上网下载一款Jekyll主题
  2. 修改配置
  3. 在_posts文件夹内写博客,并推送到本身的github page上去。

方式二

这种方法主要是用来在本地预览效果,这样不用每次写完博客或网页后必须上传到github上才能够看到效果。css

  1. 下载Ruby
    在官网下载,安装时将ruby添加到环境变量选项勾选。
  2. 下载Ruby DevKit
    将DevKit解压到须要的路径,而后打开命令行进入到这个目录执行以下命令
cd 解压目录
    ruby dk.rb init
    ruby dk.rb install
    #官方源不可用
    gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
    gem install jekyll

gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/ 应为ssl没法经过的话,能够使用http协议。 3. 下载主题
4. 预览效果
jekyll --server --auto
http://localhost:4000 预览git

如下是本人安装过程当中遇到的问题:
Jekyll 3x版本使用主题时,在配置_config.yml时,github

markdown: redcarpet
    redcarpet:
    extensions:
        - hard_wrap
        - no_intra_emphasis
        - autolink
        - strikethrough
        - tables
        - lax_spacing
        - with_toc_data

改变为ruby

markdown: kramdown
    kramdown:
    input: GFM
    extensions:
        - autolink
        - footnotes
        - smart
        - hard_wrap
        - no_intra_emphasis
        - strikethrough
        - tables
        - lax_spacing
        - with_toc_data
    enable_coderay: true
    syntax_highlighter: rouge
    coderay:
        coderay_line_numbers:  nil

参考连接bash

  1. Jekyll官方教程
  2. ruby镜像
  3. 参考的博客
  4. Jekyll主题
相关文章
相关标签/搜索