jekyll开发静态网站
一、Ruby环境安装配置
-
首先下载
ruby
安装ruby download ,安装完ruby
后,再安装rubyGems
:运行gem update --system
即可。 -
然后下载DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe。解压DevKit,然后命令行cd到该目录,运行
ruby dk.rb init ruby dk.rb review ruby dk.rb install gem install rdiscount --platform=ruby
二、jekyll环境安装配置
gem install jekyll bundler gem install jekyll-sitemap bundler gem install jekyll-gist bundler gem install jekyll-mentions bundler
三、创建工程,启动服务器进行本地预览
~ $ jekyll new my-awesome-site ~ $ cd my-awesome-site ~/my-awesome-site $ bundle exec jekyll serve # => Now browse to http://localhost:4000
四、Gemfile文件内容
source "https://rubygems.org" gem "jekyll", "3.5.1" gem "jekyll-sitemap" gem "jekyll-gist" gem "jekyll-mentions" gem "jekyll-feed", "~> 0.6" gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]