Yhzhtk's Blog

(热爱技术,高效Code)     归档  标签  源码  关于 


在Windows上部署Jekyll 英文

2013-06-05    jekyll  windows 


来自http://www.madhur.co.in/blog/2011/09/01/runningjekyllwindows.html

Jekyll can also be made to run on Windows Operating System. This prefer when I am working on my office laptop which has Windows 7 installed on it.

Following packages are required to setup Jekyll on Windows:

  • Ruby & Ruby Development Kit : Can be installed from here
  • Jekyll
  • Python : I used the portable version available here
  • Pygments

1 Install the Ruby from http://rubyinstaller.org/downloads/ and install it to path such as C:\ruby

2 Install the Ruby development kit from here and extract it to path such as c:\devkit. Run the following commands

ruby dk.rb init

to generate the config.yml file to be used later in this Step

3 Edit the generated config.yml file to include installed Rubies. For example, in our case, it will look like this

# This configuration file contains the absolute path locations of all
# installed Rubies to be enhanced to work with the DevKit. This config
# file is generated by the 'ruby dk.rb init' step and may be modified
# before running the 'ruby dk.rb install' step. To include any installed
# Rubies that were not automagically discovered, simply add a line below
# the triple hyphens with the absolute path to the Ruby root directory.
#
# Example:
#
# ---
# - C:/ruby19trunk
# - C:/ruby192dev
#
---
- C:/ruby

4 Run the following command to install to DevKit enhance your installed Rubies. This step installs (or updates) an operating_system.rb file into the relevant directory needed to implement a RubyGems

ruby dk.rb install

5 Install Jekyll using following command

gem install jekyll

6 Now, you can start using Jekyll. If you require code highlighting using pygments as well, follow the additional steps as well. Install Portable Python from here

7 Now we need to install, easy_install. For python versions > 3, this can be installed fromhttp://pypi.python.org/pypi/distribute Download distribute_setup.py and run the following command in python

python distribute_setup.py

8 Now to install pygments, simply run this command:

easy_install Pygments	

9 Note that if you are using Python > 3 as discussed in this blog, you are likely to hit the following error when running Pygmentize

Liquid error: Bad file descriptor
TypeError: Can't convert 'bytes' object to str implicitly

These are known issues and the resolution has been discussed here: https://github.com/rtomayko/posix-spawn/issues/17

This requires a change in C:\ruby\lib\ruby\gems\1.9.1\gems\albino-1.3.3\lib\albino.rb file.

I have created the gist of the changes required here





Load Disqus comments, wait a moment..

分类标签

jekyll3   编码1   windows1   bootstrap1   git3   删除1   命令3   python11   ide1   学习笔记3   实例分析1   mp3-tag1   github1   gravatar1   goagent1   翻墙1   C#4   找茬工具1   微博自动评论1   电脑监控1   备份1   云搜索1   wxPython1   py2exe1   yaml1   Eric1   PyQt1   Django1   设计模式5   翻译4   单例1   工厂1   抽象工厂1   生成器1   原型1   适配器1   桥接1   组合1   装饰1   外观1   享元1   代理1   MVC1   观察者1   状态1   策略1   模板1   访问者1   职责链1   解释器1   迭代器1   中介者1   备忘录1   js1   resize bar1   geohash1   口琴1   rpm安装gitlab1   CentOs1   WordPress1   数据库1   读脏数据1   丢失的修改1   不可重复读1   幻影读1   1   隔离1   思维导图1   事务1   笔记迁移1   note1   issue1  

最新博文

最新评论

Feed订阅


©2013 首页   关于     View me on GitHub Powered by Jekyll & Bootstrap 知识共享许可协议