gem 'middleman-deploy'
gem 'middleman-syntax' # markdown
gem 'middleman-rouge' # syntax-highlight
# comment
gem 'middleman-disqus'
git remote add origin git@github.com:yourname/repository.git
bundle exec middleman server
middleman server # localhost:4567
middleman build [--clean]
middleman deloy [--build-before]
automatic run build during middleman deploy
activate :deploy do |deploy|
#...
deploy.build_before = true # default :false
end
Github page
activate :deploy do |deploy|
#...
deploy.method = :git
end
syntax
http://alexpeattie.com/blog/github-style-syntax-highlighting-with-pygments/
# Gemfile
gem 'middleman-syntax'
# config.rb
activate :syntax
use redcarpet
gem 'redcarpet'
set :markdown_engine, :redcarpet
set :markdown, fenced_code_blocks: true
use kramdown
require 'kramdown'
set :markdown_engine, :kramdown
download css and add
https://github.com/richleland/pygments-css/blob/master/github.css
Helper
http://rubydoc.info/github/middleman/middleman-blog/master/Middleman/Blog/Helpers
paging helper
http://forum.middlemanapp.com/t/link-to-first-and-last-page-with-pagination/940/3
google 検索
- カスタム検索を作成 https://www.google.com/cse/create/new