4

【丢弃】【jekyll】安装和配置.

 3 years ago
source link: https://www.guofei.site/2017/05/06/jekyll.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

【丢弃】【jekyll】安装和配置.

2017年05月06日

Author: Guofei

文章归类: ,文章编号:


版权声明:本文作者是郭飞。转载随意,但需要标明原文链接,并通知本人
原文链接:https://www.guofei.site/2017/05/06/jekyll.html

Edit

(新增)docker

有了docker,就不用很麻烦的配置了,只需要一行

docker run --rm --label=jekyll --volume /c/try_for_docker1:/srv/jekyll -it -p 127.0.0.1:4006:4000 jekyll/jekyll jekyll serve --force_polling --destination /srv/jekyll/blog --source /srv/jekyll/blog_md_dir

也可以用 bash 进去,允许手动进行一些操作

docker run --rm --label=jekyll --volume /c/try_for_docker1:/srv/jekyll -it -p 127.0.0.1:4006:4000 jekyll/jekyll bash

安装配置(弃用)

弃用了,因为用docker更方便(见于上文)

安装配置1

  • 安装python
  • 安装easyinstall
    # Anaconda Prompt:
    pip install easy_install
  • 安装ruby 下载exe文件

安装配置2

ruby下:

easy_install Pygments # (Anaconda Prompt下)安装Pygments,Pygments是一个语法高亮插件
gem install bundler # 安装bundler
gem install jekyll # 安装 jekyll

可以开心得玩啦

ruby下:

jekyll new site-name # 创建一个新的站点,名字是site-name
jekyll build # 构建
jekyll server # 开启本地服务器查看效果
jekyll server -P 4001 # 指定端口
jekyll server -w # 文件发生变化时,自动重新编译(最新版本下,这个功能是默认开启的)
jekyll serve --destination <destination> --source <source> # 指定生成网站的文件夹,指定读取jekyll的文件夹

# 例如:
jekyll serve --destination C:/myblog/ --source C:\Users\guofei8\Desktop\git\GitHub\guofei9987.github.io

您的支持将鼓励我继续创作!

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK