docker run -it --rm -v ~/blog:/blog dockercraft/bundler
Initial
gem install jekyll bundler
Create new website
jekyll new my-awesome-site
bundle install
bundle install --path vendor/bundle
Build website
jekyll build
bundle exec jekyll build
Start local server
bundle exec jekyll serve
Set listener
bundle exec jekyll serve --host 0.0.0.0
Set port
bundle exec jekyll serve --port 3000
Add this line to your application’s Gemfile:
gem 'jekyll-compose', group: [:jekyll_plugins]
And then execute:
bundle
or
bundle install
bundle exec jekyll page "My New Page"
jekyll page "My New Page"
bundle exec jekyll post "My New Post"
jekyll post "My New Post"
bundle exec jekyll draft "My new draft"
jekyll draft "My new draft"
bundle exec jekyll publish _drafts/my-new-draft.md
jekyll publish _drafts/my-new-draft.md
specify a specific date on which to publish it
jekyll publish _drafts/my-new-draft.md --date 2014-01-24
bundle exec jekyll unpublish _posts/2014-01-24-my-new-draft.md
jekyll unpublish _posts/2014-01-24-my-new-draft.md
bundle exec jekyll algolia
_site
.sass-cache
.jekyll-metadata
.puls.swp
.push
.bundle
.bundle/*
jekyll new-theme sample-theme
cd sample-theme
On sample-theme.gemspec
file
Gem::Specification.new do |spec|
spec.name = "sample-theme"
spec.version = "0.1.0"
spec.authors = [""]
spec.email = [""]
spec.summary = %q{TODO: Write a short summary, because Rubygems requires one.}
spec.homepage = "TODO: Put your gem's website or public repo URL here."
spec.license = "MIT"
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(assets|_layouts|_includes|_sass|LICENSE|README)}i) }
spec.add_runtime_dependency "jekyll", "~> 3.6"
spec.add_development_dependency "bundler", "~> 1.12"
spec.add_development_dependency "rake", "~> 10.0"
end
gem build sample-theme.gemspec
On your jekyll site, update Gemfile
gem "sample-theme", :path => "/var/theme"
bundle install
bundle install --path vendor/bundle
# _config.yml
theme: sample-theme
build exec jekyll build
build exec jekyll serve
show_excerpts: ture
Add <!--more-->
post.