octopress 3.0.0.rc.15 → 3.0.0.rc.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/.clash.yml +159 -0
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +5 -0
  5. data/README.md +11 -144
  6. data/assets/docs/index.md +187 -0
  7. data/bin/octopress +0 -2
  8. data/lib/octopress.rb +10 -6
  9. data/lib/octopress/commands/isolate.rb +31 -0
  10. data/lib/octopress/commands/new.rb +2 -1
  11. data/lib/octopress/isolate.rb +108 -0
  12. data/lib/octopress/scaffold.rb +2 -1
  13. data/lib/octopress/version.rb +1 -1
  14. data/octopress.gemspec +2 -1
  15. data/test/Gemfile +1 -2
  16. data/test/_config.yml +3 -0
  17. data/test/{expected → _expected/blank}/_config.yml +0 -0
  18. data/test/{expected → _expected/blank}/_octopress.yml +0 -0
  19. data/test/{expected → _expected/blank}/_templates/draft +0 -0
  20. data/test/{expected → _expected/blank}/_templates/page +0 -0
  21. data/test/{expected → _expected/blank}/_templates/post +0 -0
  22. data/test/{expected/_site → _expected/blank}/index.html +0 -0
  23. data/test/_expected/integrate/_posts/2011-11-11-a-random-post.markdown +6 -0
  24. data/test/_expected/integrate/_posts/2012-11-11-another-random-post.markdown +6 -0
  25. data/test/_expected/integrate/_posts/2013-11-11-this-post-is-happy.markdown +6 -0
  26. data/test/_expected/isolate-path/_posts/2011-11-11-a-random-post.markdown +6 -0
  27. data/test/_expected/isolate-path/_posts/_exile/2012-11-11-another-random-post.markdown +6 -0
  28. data/test/_expected/isolate-path/_posts/_exile/2013-11-11-this-post-is-happy.markdown +6 -0
  29. data/test/_expected/isolate-search/_posts/2011-11-11-a-random-post.markdown +6 -0
  30. data/test/_expected/isolate-search/_posts/2012-11-11-another-random-post.markdown +6 -0
  31. data/test/_expected/isolate-search/_posts/_exile/2013-11-11-this-post-is-happy.markdown +6 -0
  32. data/test/_expected/isolate/_posts/2013-11-11-this-post-is-happy.markdown +6 -0
  33. data/test/_expected/isolate/_posts/_exile/2011-11-11-a-random-post.markdown +6 -0
  34. data/test/_expected/isolate/_posts/_exile/2012-11-11-another-random-post.markdown +6 -0
  35. data/test/{expected/_posts/2014-03-11-idea.markdown → _expected/new-draft-slug/_drafts/idea.markdown} +0 -1
  36. data/test/{expected/_drafts/stupid-idea.markdown → _expected/new-draft/_drafts/some-cool-idea.markdown} +1 -1
  37. data/test/{expected/date-page.html → _expected/new-page-date/pages/awesome-page.html} +1 -1
  38. data/test/{expected/awesome-page.html → _expected/new-page-extension/pages/awesome-page.md} +0 -0
  39. data/test/_expected/new-page-index/pages/index.html +5 -0
  40. data/test/{expected/custom-template-page.html → _expected/new-page-template/pages/awesome-page.html} +1 -1
  41. data/test/_expected/new-page/pages/awesome-page.html +5 -0
  42. data/test/{expected → _expected/new-post-dir}/_posts/stuff/2014-02-11-some-stuff.markdown +0 -0
  43. data/test/{expected → _expected/new-post-slug}/_posts/2014-03-13-awesome.markdown +0 -0
  44. data/test/{expected → _expected/new-post}/_posts/2014-03-12-awesome-stuff.markdown +0 -0
  45. data/test/_expected/publish-draft-date/_posts/2014-03-11-some-cool-idea.markdown +6 -0
  46. data/test/_expected/publish-draft-dir/_posts/ideas/2014-03-10-some-cool-idea.markdown +6 -0
  47. data/test/_expected/publish-draft/_posts/2014-03-10-some-cool-idea.markdown +6 -0
  48. data/test/_layouts/page.html +1 -0
  49. data/test/_layouts/post.html +1 -0
  50. data/test/_octopress.yml +11 -0
  51. data/test/{expected/_templates/other_page → _templates/draft} +0 -1
  52. data/test/_templates/page +4 -0
  53. data/test/{expected/_templates/date_page → _templates/post} +0 -0
  54. metadata +100 -81
  55. data/lib/octopress/commands/build.rb +0 -19
  56. data/lib/octopress/commands/doctor.rb +0 -20
  57. data/lib/octopress/commands/serve.rb +0 -30
  58. data/test/expected/_layouts/page.html +0 -1
  59. data/test/expected/_layouts/post.html +0 -1
  60. data/test/expected/_posts/2014-02-10-another-idea.markdown +0 -6
  61. data/test/expected/_posts/ideas/2014-02-13-yet-another-idea.markdown +0 -6
  62. data/test/expected/_site/2014/02/10/another-idea.html +0 -2
  63. data/test/expected/_site/2014/02/11/some-stuff.html +0 -2
  64. data/test/expected/_site/2014/02/13/yet-another-idea.html +0 -2
  65. data/test/expected/_site/2014/03/11/idea.html +0 -2
  66. data/test/expected/_site/2014/03/12/awesome-stuff.html +0 -2
  67. data/test/expected/_site/2014/03/13/awesome.html +0 -2
  68. data/test/expected/_site/awesome-page.html +0 -1
  69. data/test/expected/_site/cool-page.html +0 -1
  70. data/test/expected/_site/custom-template-page.html +0 -1
  71. data/test/expected/_site/date-page.html +0 -1
  72. data/test/expected/_site/okay-page/index.html +0 -1
  73. data/test/expected/cool-page.html +0 -5
  74. data/test/expected/index.html +0 -0
  75. data/test/expected/okay-page/index.html +0 -5
  76. data/test/test.rb +0 -162
  77. data/test/test_suite.rb +0 -161
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f7cac96f298bfc9a6c1ef49b1ca0a260fe92020
4
- data.tar.gz: 002f74354fc7b7b6ad5e41b43214a1617bc222ef
3
+ metadata.gz: c467f204f6a64e2cb3cc180b6d3b0047e6ef51db
4
+ data.tar.gz: 26566e933b1e7b3749c3f65469fbfe8b9dfc378b
5
5
  SHA512:
6
- metadata.gz: 24649037612e91a43403c9ecc78656469068ee1467599aadc8aac78870d690939e386c0cec61cc3faf031f8b475dc7c356d5382a33710218b04b7ae49f3b83d0
7
- data.tar.gz: 659d7d30a62c30149c2b2cac4c5f4c8e9ec44f6c25332ca9cdda302928b6c7801b4138ded9ded2b7feb123958a080d046f94b01bbfd8aee64e6ee82a0187238c
6
+ metadata.gz: 2172acbd11141bb8253035f8ad76baa6cdc57e37278c7c5dbc3c93a8199bc8b6333aabe0c49f03b4c7dabb03d1dd87d002625a0f0fb227a5e2d601d9bfc24347
7
+ data.tar.gz: ac045544e83a6a7137363f80f48d1a2c7ac6f98bb60704382768b3fcd557e938f64d7dca11d2a778f06874311ca4b0e235fe2632a05e615087b3203eb107f93c
data/.clash.yml ADDED
@@ -0,0 +1,159 @@
1
+ -
2
+ tasks:
3
+ reset_site:
4
+ - 'rm -rf _layouts _drafts _templates _posts _site pages site'
5
+ - 'octopress new . --blank --force'
6
+ - 'rm index.html'
7
+ - 'echo "<div class=post>{{ page.title }}{{ content }}</div>" > _layouts/post.html'
8
+ - 'echo "<div class=page>{{ page.title }}{{ content }}</div>" > _layouts/page.html'
9
+ new_draft:
10
+ - 'octopress new draft "Some Cool Idea" --date "2014-03-10 15:20 -0000"'
11
+ new_posts:
12
+ - 'octopress new post "A random post" --date "2011-11-11 11:11 -0000"'
13
+ - 'octopress new post "Another random post" --date "2012-11-11 11:11 -0000"'
14
+ - 'octopress new post "This post is happy." --date "2013-11-11 11:11 -0000"'
15
+
16
+ -
17
+ title: Create a blank site
18
+ before:
19
+ - 'rm -rf site'
20
+ - 'octopress new site --blank'
21
+ - 'echo "timezone: GMT" > site/_config.yml'
22
+ compare: _expected/blank site
23
+
24
+ -
25
+ title: Add a new post
26
+ before:
27
+ - reset_site
28
+ - 'octopress new post "Awesome stuff" --date "2014-03-12 05:10 -0000"'
29
+ compare:
30
+ - _expected/new-post/_posts _posts
31
+ -
32
+ title: Add a post with a slug
33
+ before:
34
+ - reset_site
35
+ - 'octopress new post "Super Awesome stuff" --slug awesome --date "2014-03-13 15:20 -0000"'
36
+ compare:
37
+ - _expected/new-post-slug/_posts _posts
38
+ -
39
+ title: Add a post in a subdirectory
40
+ before:
41
+ - reset_site
42
+ - 'octopress new post "Some stuff" --dir stuff --date "2014-02-11 05:10 -0000"'
43
+ compare:
44
+ - _expected/new-post-dir/_posts _posts
45
+ -
46
+ title: Add a draft
47
+ before:
48
+ - reset_site
49
+ - new_draft
50
+ compare:
51
+ - _expected/new-draft/_drafts _drafts
52
+ -
53
+ title: Add a draft with a slug
54
+ before:
55
+ - reset_site
56
+ - 'octopress new draft "Some great idea for a post" --slug idea'
57
+ compare:
58
+ - _expected/new-draft-slug/_drafts _drafts
59
+ -
60
+ title: Publish a draft
61
+ before:
62
+ - reset_site
63
+ - new_draft
64
+ - 'octopress publish _drafts/some-cool-idea.markdown'
65
+ compare:
66
+ - _expected/publish-draft/_posts _posts
67
+ enforce_missing: drafts/*
68
+
69
+ -
70
+ title: Publish a draft with a date
71
+ before:
72
+ - reset_site
73
+ - new_draft
74
+ - 'octopress publish _drafts/some-cool-idea.markdown --date "2014-03-11 20:20 -0000"'
75
+ compare:
76
+ - _expected/publish-draft-date/_posts _posts
77
+ enforce_missing: drafts/*
78
+
79
+ -
80
+ title: Publish a draft in a dir
81
+ before:
82
+ - reset_site
83
+ - new_draft
84
+ - 'octopress publish _drafts/some-cool-idea.markdown --dir ideas'
85
+ compare:
86
+ - _expected/publish-draft-dir/_posts _posts
87
+ enforce_missing: drafts/*
88
+
89
+ -
90
+ title: Add a page
91
+ before:
92
+ - reset_site
93
+ - 'octopress new page pages/awesome-page --title "Awesome Page"'
94
+ compare:
95
+ - _expected/new-page/pages pages
96
+
97
+ -
98
+ title: Add a page with an extension
99
+ before:
100
+ - reset_site
101
+ - 'octopress new page pages/awesome-page.md --title "Awesome Page"'
102
+ compare:
103
+ - _expected/new-page-extension/pages pages
104
+ -
105
+ title: Add an index page
106
+ before:
107
+ - reset_site
108
+ - 'octopress new page pages/ --title "Awesome Page"'
109
+ compare:
110
+ - _expected/new-page-index/pages pages
111
+ -
112
+ title: Add a page with a custom template
113
+ before:
114
+ - reset_site
115
+ - 'echo "---\nlayout: {{ layout }}\ntitle: {{ title }}\nkittens: true\n---" > _templates/other_page'
116
+ - 'octopress new page pages/awesome-page --template other_page'
117
+ compare:
118
+ - _expected/new-page-template/pages pages
119
+ -
120
+ title: Add a page with a date
121
+ before:
122
+ - reset_site
123
+ - 'octopress new page pages/awesome-page --date "2011-11-11 11:11 -0000"'
124
+ compare:
125
+ - _expected/new-page-date/pages pages
126
+ -
127
+ title: Isolate posts
128
+ before:
129
+ - reset_site
130
+ - new_posts
131
+ - 'octopress isolate'
132
+ compare:
133
+ - _expected/isolate/_posts _posts
134
+ -
135
+ title: Isolate posts with search
136
+ before:
137
+ - reset_site
138
+ - new_posts
139
+ - 'octopress isolate random-post'
140
+ compare:
141
+ - _expected/isolate-search/_posts _posts
142
+ -
143
+ title: Isolate posts with path
144
+ before:
145
+ - reset_site
146
+ - new_posts
147
+ - 'octopress isolate --path _posts/2011-11-11-a-random-post.markdown'
148
+ compare:
149
+ - _expected/isolate-path/_posts _posts
150
+ -
151
+ title: Integrate posts
152
+ before:
153
+ - reset_site
154
+ - new_posts
155
+ - octopress isolate
156
+ - 'octopress integrate'
157
+ compare:
158
+ - _expected/integrate/_posts _posts
159
+
data/.travis.yml CHANGED
@@ -2,4 +2,4 @@ language: ruby
2
2
  rvm:
3
3
  - 2.0.0
4
4
  - 1.9.3
5
- script: cd test && bundle exec ruby test.rb
5
+ script: bundle exec clash test
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Current released version
4
4
 
5
+ ### 3.0.0 RC16 - 2014-11-24
6
+
7
+ - Added `integrate` and `isolate` commands.
8
+ - Removed unnecessary Jekyll pass-through commands.
9
+
5
10
  ### 3.0.0 RC14 - 2014-07-26
6
11
 
7
12
  - Simplified configuration management.
data/README.md CHANGED
@@ -9,7 +9,7 @@ Octopress is an obsessively designed toolkit for writing and deploying Jekyll bl
9
9
 
10
10
  Add this line to your application's Gemfile:
11
11
 
12
- gem 'octopress', '~> 3.0.0.rc.12'
12
+ gem 'octopress', '~> 3.0.0.rc'
13
13
 
14
14
  And then execute:
15
15
 
@@ -23,17 +23,16 @@ Or install it yourself as:
23
23
 
24
24
  Here are the commands for Octopress.
25
25
 
26
- | Option | Description |
27
- |:--------------------------------|:------------------------------------------|
28
- | `octopress init <PATH>` | Adds Octopress scaffolding to your site |
29
- | `octopress new post <TITLE>` | Add a new post to your site |
30
- | `octopress new page <PATH>` | Add a new page to your site |
31
- | `octopress new draft <TITLE>` | Add a new draft post to your site |
32
- | `octopress publish <PATH>` | Publish a draft from _drafts to _posts |
33
- | `octopress new <PATH>` | works just like `jekyll new` |
34
- | `octopress build` | works just like `jekyll build` |
35
- | `octopress serve` | works just like `jekyll serve` |
36
- | `octopress doctor` | works just like `jekyll doctor` |
26
+ | Option | Description |
27
+ |:--------------------------------|:----------------------------------------------|
28
+ | `octopress init <PATH>` | Adds Octopress scaffolding to your site |
29
+ | `octopress new <PATH>` | Like `jekyll new` + `octopress init` |
30
+ | `octopress new post <TITLE>` | Add a new post to your site |
31
+ | `octopress new page <PATH>` | Add a new page to your site |
32
+ | `octopress new draft <TITLE>` | Add a new draft post to your site |
33
+ | `octopress publish <PATH>` | Publish a draft from _drafts to _posts |
34
+ | `octopress isolate [search]` | Isolate one or more posts for a faster build |
35
+ | `octopress integrate` | Restores all posts, reverting isolation. |
37
36
 
38
37
  Run `octopress [command] --help` to learn more about any command and see its options.
39
38
 
@@ -43,138 +42,6 @@ You can deploy your Octopress or Jekyll blog via git, rsync or Amazon S3. The de
43
42
 
44
43
  [octopress-deploy]: https://github.com/octopress/deploy
45
44
 
46
- ## Configuration
47
-
48
- Octopress reads its configurations from `_octopress.yml`. Here's what the configuration looks like by default.
49
-
50
- ```yaml
51
- # Default extension for new posts and pages
52
- post_ext: markdown
53
- page_ext: html
54
-
55
- # Default templates for posts and pages
56
- # Found in _templates/
57
- post_layout: post
58
- page_layout: page
59
-
60
- # Format titles with titlecase?
61
- titlecase: true
62
- ```
63
-
64
- ## Commands
65
-
66
- ### Init
67
-
68
-
69
- ```sh
70
- $ octopress init <PATH> [options]
71
- ```
72
-
73
- This will copy Octopress's scaffolding into the specified directory. Use the `--force` option to overwrite existing files. The scaffolding is pretty simple:
74
-
75
- ```
76
- _octopress.yml
77
- _templates/
78
- post
79
- page
80
- ```
81
-
82
- ### New Post
83
-
84
- This automates the creation of a new post.
85
-
86
- ```sh
87
- $ octopress new post "My Title"
88
- ```
89
-
90
- This will create a new file at `_posts/YYYY-MM-DD-my-title.markdown` with the following YAML front-matter already added.
91
-
92
- ```
93
- layout: post
94
- title: "My Title"
95
- date: YYYY-MM-DDTHH:MM:SS-00:00
96
- ```
97
-
98
- "OK, great. What else can I do?" Great question! Check out these other options:
99
-
100
- | Option | Description |
101
- |:---------------------|:----------------------------------------|
102
- | `--template PATH` | Use a template from <path> |
103
- | `--date DATE` | The date for the post. Should be parseable by [Time#parse](http://ruby-doc.org/stdlib-2.1.0/libdoc/time/rdoc/Time.html#method-i-parse) |
104
- | `--slug SLUG` | Slug for the new post. |
105
- | `--dir DIR` | Create post at _posts/DIR/. |
106
- | `--force` | Overwrite existing file. |
107
-
108
- ### New Page
109
-
110
- ```
111
- $ octopress new page some-page # ./some-page.html
112
- $ octopress new page docs/ # ./docs/index.html
113
- $ octopress new page about.html # ./about.html
114
- ```
115
-
116
- | Option | Description |
117
- |:---------------------|:----------------------------------------|
118
- | `--template PATH` | Use a template from <path> |
119
- | `--title TITLE` | The title of the new page |
120
- | `--date DATE` | The date for the page. Should be parseable by [Time#parse](http://ruby-doc.org/stdlib-2.1.0/libdoc/time/rdoc/Time.html#method-i-parse) |
121
- | `--force` | Overwrite existing file. |
122
-
123
- Note: The default page template doesn't expect a date. If you want to add dates
124
- to your pages, consider adding `date: {{ date }}` to the default template
125
- `_templates/page`, or create a new template to use for dated pages. Otherwise,
126
- you will have the `--date` option to add a date to a page.
127
-
128
- ### New Draft
129
-
130
- ```sh
131
- $ octopress new draft "My Title"
132
- ```
133
-
134
- This will create a new post in your `_drafts` directory.
135
-
136
- | Option | Description |
137
- |:-------------------|:------------------------------------------|
138
- | `--template PATH` | Use a template from <path> |
139
- | `--date DATE` | The date for the draft. Should be parseable by [Time#parse](http://ruby-doc.org/stdlib-2.1.0/libdoc/time/rdoc/Time.html#method-i-parse) (defaults to Time.now) |
140
- | `--slug SLUG` | The slug for the new post. |
141
- | `--force` | Overwrite exsiting file. |
142
-
143
- ### Publish draft
144
-
145
- ```sh
146
- $ octopress publish _drafts/some-post.md
147
- ```
148
-
149
- This will move your draft to the `_posts` directory and rename the file with the proper date.
150
-
151
- | Option | Description |
152
- |:-------------------|:------------------------------------------|
153
- | `--date DATE` | The date for the post. Should be parseable by [Time#parse](http://ruby-doc.org/stdlib-2.1.0/libdoc/time/rdoc/Time.html#method-i-parse) |
154
- | `--slug SLUG` | Change the slug for the new post. |
155
- | `--dir DIR` | Create post at _posts/DIR/. |
156
- | `--force` | Overwrite existing file. |
157
-
158
- When publishing a draft, the new post will use the draft's date. Pass the option `--date now` to the publish command to set the new post date from your system clock. As usual, you can pass any compatible date string as well.
159
-
160
- ### Templates for Posts and pages
161
-
162
- Octopress post and page templates look like this.
163
-
164
- ```
165
- ---
166
- layout: {{ layout }}
167
- title: {{ title }}
168
- ---
169
-
170
- ```
171
-
172
- The YAML variables will be replaced with the correct content when you create a page or post. To modify this template create a `_templates/post` file and change it as you wish. You can add additional YAML front-matter or content, and you can even create multiple templates. Choose a custom template when creating a new post or page like this.
173
-
174
- ```sh
175
- $ octopress new post --template _templates/linkpost
176
- ```
177
-
178
45
  ## Contributing
179
46
 
180
47
  1. Fork it
@@ -0,0 +1,187 @@
1
+ ---
2
+ title: Using Octopress
3
+ ---
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'octopress', '~> 3.0.0.rc'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install octopress --pre
18
+
19
+ ## Commands
20
+
21
+ Here are the commands for Octopress.
22
+
23
+ | Option | Description |
24
+ |:--------------------------------|:----------------------------------------------|
25
+ | `octopress init <PATH>` | Adds Octopress scaffolding to your site |
26
+ | `octopress new <PATH>` | Like `jekyll new` + `octopress init` |
27
+ | `octopress new post <TITLE>` | Add a new post to your site |
28
+ | `octopress new page <PATH>` | Add a new page to your site |
29
+ | `octopress new draft <TITLE>` | Add a new draft post to your site |
30
+ | `octopress publish <PATH>` | Publish a draft from _drafts to _posts |
31
+ | `octopress isolate [search]` | Isolate one or more posts for a faster build |
32
+ | `octopress integrate` | Restores all posts, reverting isolation. |
33
+
34
+ Run `octopress [command] --help` to learn more about any command and see its options.
35
+
36
+ ### Init
37
+
38
+ ```sh
39
+ $ octopress init <PATH> [options]
40
+ ```
41
+
42
+ This will copy Octopress's scaffolding into the specified directory. Use the `--force` option to overwrite existing files. The scaffolding is pretty simple:
43
+
44
+ ```
45
+ _octopress.yml
46
+ _templates/
47
+ post
48
+ page
49
+ ```
50
+
51
+ ### New Post
52
+
53
+ This automates the creation of a new post.
54
+
55
+ ```sh
56
+ $ octopress new post "My Title"
57
+ ```
58
+
59
+ This will create a new file at `_posts/YYYY-MM-DD-my-title.markdown` with the following YAML front-matter already added.
60
+
61
+ ```
62
+ layout: post
63
+ title: "My Title"
64
+ date: YYYY-MM-DDTHH:MM:SS-00:00
65
+ ```
66
+
67
+ "OK, great. What else can I do?" Great question! Check out these other options:
68
+
69
+ | Option | Description |
70
+ |:---------------------|:----------------------------------------|
71
+ | `--template PATH` | Use a template from <path> |
72
+ | `--date DATE` | The date for the post. Should be parseable by [Time#parse](http://ruby-doc.org/stdlib-2.1.0/libdoc/time/rdoc/Time.html#method-i-parse) |
73
+ | `--slug SLUG` | Slug for the new post. |
74
+ | `--dir DIR` | Create post at _posts/DIR/. |
75
+ | `--force` | Overwrite existing file. |
76
+
77
+ ### New Page
78
+
79
+ ```
80
+ $ octopress new page some-page # ./some-page.html
81
+ $ octopress new page docs/ # ./docs/index.html
82
+ $ octopress new page about.html # ./about.html
83
+ ```
84
+
85
+ | Option | Description |
86
+ |:---------------------|:----------------------------------------|
87
+ | `--template PATH` | Use a template from <path> |
88
+ | `--title TITLE` | The title of the new page |
89
+ | `--date DATE` | The date for the page. Should be parseable by [Time#parse](http://ruby-doc.org/stdlib-2.1.0/libdoc/time/rdoc/Time.html#method-i-parse) |
90
+ | `--force` | Overwrite existing file. |
91
+
92
+ Note: The default page template doesn't expect a date. If you want to add dates
93
+ to your pages, consider adding `date: {{ date }}` to the default template
94
+ `_templates/page`, or create a new template to use for dated pages. Otherwise,
95
+ you will have the `--date` option to add a date to a page.
96
+
97
+ ### New Draft
98
+
99
+ ```sh
100
+ $ octopress new draft "My Title"
101
+ ```
102
+
103
+ This will create a new post in your `_drafts` directory.
104
+
105
+ | Option | Description |
106
+ |:-------------------|:------------------------------------------|
107
+ | `--template PATH` | Use a template from <path> |
108
+ | `--date DATE` | The date for the draft. Should be parseable by [Time#parse](http://ruby-doc.org/stdlib-2.1.0/libdoc/time/rdoc/Time.html#method-i-parse) (defaults to Time.now) |
109
+ | `--slug SLUG` | The slug for the new post. |
110
+ | `--force` | Overwrite exsiting file. |
111
+
112
+ ### Publish draft
113
+
114
+ ```sh
115
+ $ octopress publish _drafts/some-post.md
116
+ ```
117
+
118
+ This will move your draft to the `_posts` directory and rename the file with the proper date.
119
+
120
+ | Option | Description |
121
+ |:-------------------|:------------------------------------------|
122
+ | `--date DATE` | The date for the post. Should be parseable by [Time#parse](http://ruby-doc.org/stdlib-2.1.0/libdoc/time/rdoc/Time.html#method-i-parse) |
123
+ | `--slug SLUG` | Change the slug for the new post. |
124
+ | `--dir DIR` | Create post at _posts/DIR/. |
125
+ | `--force` | Overwrite existing file. |
126
+
127
+ When publishing a draft, the new post will use the draft's date. Pass the option `--date now` to the publish command to set the new post date from your system clock. As usual, you can pass any compatible date string as well.
128
+
129
+ ### Templates for Posts and pages
130
+
131
+ Octopress post and page templates look like this.
132
+
133
+ ```
134
+ ---
135
+ layout: {{ layout }}
136
+ title: {{ title }}
137
+ ---
138
+
139
+ ```
140
+
141
+ The YAML variables will be replaced with the correct content when you create a page or post. To modify this template create a `_templates/post` file and change it as you wish. You can add additional YAML front-matter or content, and you can even create multiple templates. Choose a custom template when creating a new post or page like this.
142
+
143
+ ```sh
144
+ $ octopress new post --template _templates/linkpost
145
+ ```
146
+
147
+ ## Isolate
148
+
149
+ If your site is taking a while to build, but you want to preview a post quickly, you can isolate that post temporarily with the isolate command. Here's the syntax:
150
+
151
+ ```
152
+ octopress isolate [SEARCH] [options]
153
+ ```
154
+
155
+ This will copy all other posts into `_posts/_exile` where they will be ignored by Jekyll during the build process. Here are some examples:
156
+
157
+ - `octopress isolate` isolates the most recently dated post.
158
+ - `octopress isolate cats` isolates all posts with the word 'cats' in the filename.
159
+ - `octopress isolate --path _posts/2014-10-11-kittens.md` isolates the post at the given path.
160
+
161
+ To reintegrate all exiled posts, run `octopress integrate` which will restore all posts from `_posts/_exile` to `_posts`.
162
+
163
+ ## Configuration
164
+
165
+ Octopress reads its configurations from `_octopress.yml`. Here's what the configuration looks like by default.
166
+
167
+ ```yaml
168
+ # Default extension for new posts and pages
169
+ post_ext: markdown
170
+ page_ext: html
171
+
172
+ # Default templates for posts and pages
173
+ # Found in _templates/
174
+ post_layout: post
175
+ page_layout: page
176
+
177
+ # Format titles with titlecase?
178
+ titlecase: true
179
+ ```
180
+
181
+ ## Contributing
182
+
183
+ 1. Fork it
184
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
185
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
186
+ 4. Push to the branch (`git push origin my-new-feature`)
187
+ 5. Create new Pull Request