-
Notifications
You must be signed in to change notification settings - Fork 2
构建 Jekyll Quick Start
bin4xin edited this page Apr 29, 2022
·
1 revision
直接编译,ECMAScript6,因此必须安装 ruby >= 2.0 和 nodejs.
- 1.安装 nodejs
yum install nodejs
- 2.安装 ruby 2.2.4 and rubygems
- Step 1: Install Required Packages
- Step 2: Compile ruby 2.2.4 source code
- Step 3: Install rubygems
yum install gcc-c++ patch readline readline-devel zlib zlib-devel
yum install libyaml-devel libffi-devel openssl-devel make
yum install bzip2 autoconf automake libtool bison iconv-devel sqlite-devel
wget -c https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.4.tar.gz
wget -c https://rubygems.org/rubygems/rubygems-2.4.8.tgz
ruby setup.rb
- 安装 bundle 和 build
gem install bundle
gem install build
- Fork mirrors source code
bundle install
jekyll build
在MacOS BigSur v11.2下测试无任何问题,之后在博客文件夹根目录下jekyll serve -P 80
或bundle exec jekyll server -P 80
即可运行demo,可参考:
Jekyll在本地安装的目的一般是用来方便预览网页,但其真正方便的地方是可以结合GitHub pages来快速搭建一个自己的博客页,省去了自己购买服务器和维护服务器的精力。
Jekyll有很多模板可供选择,一般会将要发表的文章以md的格式存放在_post目录下,对应网站则会自动生成一篇文章,并会套用模板中的css样式,以达到美化界面的效果。
wiki 贡献者 Bin4xin • feifei1606 • codecat