Slient Plant

  • 首页

  • 关于

  • 标签

  • 归档

windows下搭建jekyll环境

发表于 2013-08-08 | 更新于 2017-08-05 | 评论数:
本文字数: 1.5k | 阅读时长 ≈ 1 分钟

安装Ruby

Jekyll是基于Ruby的静态网页生成工具,使用rubyinstaller在windows下安装Ruby. 下载链接. 在RubyInstallersArchives下选择合适的版本,64位系统选择(x64)结尾的安装文件。

安装rubyinstaller到D:\Ruby200. 确保安装时在安装界面中选中添加ruby到环境变量的选项。

安装Ruby DevKit

下载链接.在Development Kit下选择合适版本。 下回来的文件是个7z的自解压包,解压到D:\Rubydevkit. 运行

ruby dk.rb init
ruby hk.rb install

安装jekyll

理论到直接运行

gem install jekyll

就可以安装jekyll了,但是国内的网络环境(你懂的)可能访问不到rubygems,因为 rubygem的服务使用了Amazon的云服务器。但是可以使用淘宝的国内镜像:http://ruby.taobao.org/.

$ gem sources --remove https://rubygems.org/
$ gem sources -a http://ruby.taobao.org/
$ gem sources -l
*** CURRENT SOURCES ***

http://ruby.taobao.org
# 请确保只有 ruby.taobao.org	

先用gem sources -l看看,有些情况下是默认使用http://rubygems.org 而不是https://rubygems.org

gem install jekyll

下载jekyll

至此jekyll就成功安装并且可以使用了。

安装Python

Jekyll使用Pygments在高亮代码,而Pygments是基于Python的。首先安装Python, windows上选用Portable Python。安装到D:\Portable_Python

然后将Portable Python下的App\Scripts和App目录添加到环境变量PATH中。

安装easy install

easy install是Python库的管理软件,类似于gem对于Ruby。我们安装easy install来安装Pygments. https://pypi.python.org/pypi/setuptools/0.9.8#windows,在python官网这一节介绍中可以找到怎么在windows下安装easy installer的说明,保存ez_setup.py到本地,比如说D:\

python ez_setup.py

安装Pygments#

easy_install Pygments

安装git

用jekyll写博客少不了用git啦,下载安装msysgit.把安装界面上的选项全部勾上,选项全部默认就好。

第一个模板

现在jekyll环境已经成功搭建了,下个jekyll bootstrap模板体验一下。在开始菜单中找开git bash.

cd /D
git clone https://github.com/jekyllbootstrap/theme-the-program.git
cd theme-the-program
jekyll serve

访问http://localhost:4040

深入了解jekyll

了解jekyll的配置和各个文件的作用,这篇文章是个很好的入门:基于jekyll的github建站指南

参考文章

  • 在Windows系统配置Jekyll
  • 基于jekyll的github建站指南

Setup Clojure with SLIME under Emacs

发表于 2012-08-24 | 更新于 2017-08-05 | 评论数:
本文字数: 1.3k | 阅读时长 ≈ 1 分钟

Updated:

Swank Clojure is deprecated in favour of nrepl.el

nrepl.el on Github


Clojure Side

  • Clojure
  • Leiningen

Emcas Side

  • Emcas (normally with SLIME installed)
  • clojure-mode

Basically what you need is leiningen on Clojure side and clojure-mode on Emacs side.

Setup lein

Install lein according to the instructions on its index. For lein 2.0 add such line into your global user profile .lein/profiles.clj.

{:user {:plugins [[lein-swank "1.4.4"]]}}

If you still use lein 1.x, you need such steps.

  • run lein plugin install lein-swank 1.4.4
  • add :dev-dependencies [[lein-swank "1.4.4"]] to your project.clj

Setup clojure-mode

Download clojure-mode.el, place it under your emacs load path, add such line to your .emacs file.

1
(require 'clojure-mode)

You may install paredit and rainbow-delimiters to enhance experience for writting Clojure code with Emacs.

Start up SLIME with Clojure

Now

M-x clojure-jack-in

Warn: conflit with inferior-lisp-program

Sometimes you work under Emacs with Common Lisp before, you may see Emacs pop up with a window of error message when run the command above. That's might be caused by the previous compiled swank version for common lisp.

Comment out your setup for Common Lisp in your .emacs like below and try again:

(setq inferior-lisp-program "sbcl --noinform")
1…45
Randall Wang

Randall Wang

Just another coder . Heavy Emacs user

22 日志
16 标签
RSS
GitHub
0%
© 2022 Randall Wang
由 Hexo 强力驱动 v3.8.0
|
主题 – NexT.Gemini v7.0.0