themes_dir=".themes"# directory for blog filesnew_post_ext="markdown"# default new post file extension when using the new_post tasknew_page_ext="markdown"# default new page file extension when using the new_page task-server_port="4000"# port for preview server eg. localhost:4000+server_host=ENV['IP']||='0.0.0.0'# server bind address for preview server+server_port=ENV['PORT']||="4000"# port for preview server eg. localhost:4000desc"Initial setup for Octopress: copies the default theme into the path of Jekyll's generator. Rake install defaults to rake install[classic] to install a different theme run rake install[some_theme_name]"@@-78,7+79,7@@task:previewdosystem"compass compile --css-dir #{source_dir}/stylesheets"unlessFile.exist?("#{source_dir}/stylesheets/screen.css")jekyllPid=Process.spawn({"OCTOPRESS_ENV"=>"preview"},"jekyll --auto")compassPid=Process.spawn("compass watch")-rackupPid=Process.spawn("rackup --port #{server_port}")+rackupPid=Process.spawn("rackup --host #{server_host} --port #{server_port}")trap("INT"){[jekyllPid,compassPid,rackupPid].each{|pid|Process.kill(9,pid)rescueErrno::ESRCH}
% bundle execrakesetup_github_pagesEntertheread/writeurlforyourrepository(Forexample,'git@github.com:[username]/[username].github.io.git) or 'https://github.com/[username]/[username].github.io')Repository url: git@github.com:srym/srym.github.io.gitAdded remote git@github.com:srym/srym.github.io.git as originSet origin as default remoteMaster branch renamed to 'source'forcommittingyourblogsourcefilesrm-rf_deploymkdir_deploycd_deployInitializedemptyGitrepositoryin/Users/shiroyama/playGround/octopress/_deploy/.git/[master(root-commit)dacfaa2]Octopressinit1filechanged,1insertion(+)createmode100644index.htmlcd----## Now you can deploy to git@github.com:srym/srym.github.io.git with `rake deploy` ##
# One categorycategories:octopress# Multiple categories example 1categories:[octopress,jekyll,]# Multiple categories example 2categories:-octopress-jekyll
Github Pagesにデプロイする
ページの生成
12345678910
$bundleexecrakegenerate## Generating Site with Jekyllwritesource/stylesheets/screen.cssConfigurationfile:/home/ubuntu/workspace/octopress/_config.ymlSource:sourceDestination:publicGenerating...done.Auto-regeneration:disabled.Use--watchtoenable.
Github Pagesにデプロイ
1234567891011121314151617181920212223242526
$bundleexecrakedeploy## Deploying branch to Github Pages ## Pulling any updates from Github Pages cd_deployThereisnotrackinginformationforthecurrentbranch.Pleasespecifywhichbranchyouwanttomergewith.Seegit-pull(1)fordetails.~略~## Pushing generated _deploy websiteUsernamefor'https://github.com':Githubのユーザアカウントを入力Passwordfor'https://wivern888#gmail.com@github.com':パスワードを入力Countingobjects:24,done.Deltacompressionusingupto8threads.Compressingobjects:100%(17/17),done.Writingobjects:100%(24/24),9.98KiB|0bytes/s,done.Total24(delta11),reused0(delta0)remote:Resolvingdeltas:100%(11/11),completedwith2localobjects.Tohttps://github.com/blackhawk888/blackhawk888.github.io.gitb6205ae..f7112f2master->master## Github Pages deploy completecd-