$30 off During Our Annual Pro Sale. View Details »

Welcome to Octopress

Yuuki Sumida
December 14, 2012

Welcome to Octopress

合同勉強会in大都会岡山 -2012 Winter-
http://partake.in/events/4b7fe4db-858b-4193-b392-3406ed2b571f

Yuuki Sumida

December 14, 2012
Tweet

More Decks by Yuuki Sumida

Other Decks in Programming

Transcript

  1. ウェルカム・トゥ・オクトプレス
    ウェルカム・トゥ・オクトプレス
    2012/12/15(Sat)
    2012/12/15(Sat)
    合同勉強会
    合同勉強会in
    in大都会岡山
    大都会岡山

    View Slide

  2. About me
    About me

    もじゃ変

    天領倉敷Scala/岡山Javaユーザ会

    ニンジャヘッズ(重篤)

    View Slide

  3. Agenda
    Agenda

    Octopressの紹介

    デモ(Octopressでの記事作成~デプロイ)

    Octopressライフが捗るTips

    View Slide

  4. Octopress
    Octopressの紹介
    の紹介

    View Slide

  5. Octopress
    Octopressとは
    とは

    ブログ風の静的HTMLを生成する
    アプリケーション

    Ruby製のファイルジェネレータJekyllに
    ブログライクなテンプレート/専用のrake
    コマンド群を追加したもの

    ローカルで記事を作成してGitHub Pages/
    Heroku等にデプロイする

    記事はmarkdown/textileで記述

    View Slide

  6. Octopress
    Octopressとは
    とは

    GitHub
    – 言わずと知れたGitリポジトリのホスティングサー
    ビス

    GitHub Pages
    – GitHub上で静的なWebページを公開するための
    サービス
    – 専用のリポジトリ(1ユーザにつき1つ)に静的なWeb
    ページをPushすることで、公開される

    View Slide

  7. Octopress
    Octopressとは
    とは
    html documents(local)
    github repository
    github:pages
    1.push 2.deploy

    View Slide

  8. Octopress
    Octopressとは
    とは
    blog entry(md/textile)
    github repository
    github:pages
    1.html generate
    3.deploy
    ------
    ------
    ------
    ------
    octopress
    2.push
    ※厳密にはGitHub Pages上のJekyllがよしなにしてくれる

    View Slide

  9. Octopress
    Octopressの導入
    の導入
    ※Ruby 1.9.2以上が必要
    $ git clone git://github.com/imathis/octopress.git octopress
    $ cd octopress
    $ gem install bundler
    $ bundle install
    $ rake install
    $ rake setup_github_pages

    View Slide

  10. デモ
    デモ
    (Octopress
    (Octopressでの記事作成~デプロイ
    での記事作成~デプロイ)
    )

    View Slide

  11. 記事を新規作成する
    記事を新規作成する
    $ rake new_post[“記事のタイトル”]

    View Slide

  12. 作成した記事のプレビュー
    作成した記事のプレビュー
    $ rake generate
    $ rake preview

    View Slide

  13. 作成した記事のデプロイ
    作成した記事のデプロイ
    $ rake deploy

    View Slide

  14. Octopress
    Octopressライフが捗る
    ライフが捗るTips
    Tips

    View Slide

  15. 設定ファイルについて
    設定ファイルについて

    View Slide

  16. Octopress
    Octopressのテーマを変更する
    のテーマを変更する

    https://github.com/imathis/octopress/wiki/3rd-Party-Octopress-Themes
    $ cd octopress
    $ git clone GIT_URL .themes/THEME_NAME
    $ rake install['THEME_NAME']
    $ rake generate

    View Slide

  17. Octopress
    Octopressをバージョン管理する
    をバージョン管理する

    直下以下をそのままgitとかに突っ込めばOK

    .gitignoreで_deployディレクトリ以下を除外

    View Slide

  18. さいごに
    さいごに

    View Slide

  19. Octopress
    Octopressのいいところ
    のいいところ

    好きなエディタでゴリゴリできる

    バージョン管理できる

    静的HTMLが吐かれる

    気になるところは自分で弄れる

    View Slide

  20. Octopress
    Octopressのいくないところ
    のいくないところ

    記事を書くために環境を作らないといけない
    – 会社PCでゴリゴリやりにくい

    テーマとかあんまりない

    画像のアップロードは別でやらないといけな

    View Slide