1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Octopressにて、ローカル環境でサクサク確認作業をするには?

Posted at

Octopressで新規記事を書いたり、テーマを変更したりした時、ローカル環境でサクサク確認作業をする方法をメモる。
基本的な操作は、Blogging Basicsの"Generate & Preview"を参照すると良い。

自動生成

以下のコマンドでファイルを自動生成する。

$ rake generate
## Generating Site with Jekyll
unchanged sass/screen.scss
Configuration from /Users/y-hirasawa/Projects/rails/fakestarbaby.github.com/_config.yml
Building site: source -> public
Successfully generated site: source -> public

ファイル監視

以下のコマンドでファイルを監視する。

$ rake watch
Starting to watch source with Jekyll and Compass.
Configuration from /Users/y-hirasawa/Projects/rails/fakestarbaby.github.com/_config.yml
Auto-regenerating enabled: source -> public
[2012-03-29 09:23:12] regeneration: 117 files changed
>>> Compass is watching for changes. Press Ctrl-C to Stop.

WEBサーバー起動

以下のコマンドでWEBサーバーを起動する。

$ rake preview
Starting to watch source with Jekyll and Compass. Starting Rack on port 4000
Configuration from /Users/y-hirasawa/Projects/rails/fakestarbaby.github.com/_config.yml
[2012-03-29 09:24:55] INFO  WEBrick 1.3.1
[2012-03-29 09:24:55] INFO  ruby 1.9.2 (2011-07-09) [x86_64-darwin11.3.0]
[2012-03-29 09:24:55] INFO  WEBrick::HTTPServer#start: pid=7792 port=4000
Auto-regenerating enabled: source -> public
[2012-03-29 09:24:55] regeneration: 117 files changed
>>> Compass is watching for changes. Press Ctrl-C to Stop.

この状態でゴニョゴニョすれば、ファイルの変更を自動的に検知して、即時に確認作業を行う事が出来るようになる。
便利ですね。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?