middleman-tansu 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -0
  3. data/features/helpers.feature +156 -2
  4. data/features/template_cli.feature +35 -0
  5. data/fixtures/breadcrumbs-has-title-app/config.rb +1 -0
  6. data/fixtures/breadcrumbs-has-title-app/source/dir/index.html.erb +4 -0
  7. data/fixtures/breadcrumbs-has-title-app/source/dir/sub_dir/page.md +3 -0
  8. data/fixtures/breadcrumbs-has-title-app/source/images/.gitkeep +0 -0
  9. data/fixtures/breadcrumbs-has-title-app/source/index.html.erb +4 -0
  10. data/fixtures/breadcrumbs-has-title-app/source/javascripts/.gitkeep +0 -0
  11. data/fixtures/breadcrumbs-has-title-app/source/layouts/layout.erb +13 -0
  12. data/fixtures/breadcrumbs-has-title-app/source/stylesheets/all.css +0 -0
  13. data/fixtures/breadcrumbs-has-title-app/source/templates/index.html.erb +1 -0
  14. data/fixtures/index-app/config.rb +1 -0
  15. data/fixtures/index-app/source/dir/page.md +0 -0
  16. data/fixtures/index-app/source/images/.gitkeep +0 -0
  17. data/fixtures/index-app/source/javascripts/.gitkeep +0 -0
  18. data/fixtures/index-app/source/layouts/layout.erb +17 -0
  19. data/fixtures/index-app/source/stylesheets/all.css +0 -0
  20. data/fixtures/index-app/source/templates/index.html.erb +1 -0
  21. data/fixtures/title-app/config.rb +1 -0
  22. data/fixtures/title-app/source/dir/sub_dir/page.md +3 -0
  23. data/fixtures/title-app/source/images/.gitkeep +0 -0
  24. data/fixtures/title-app/source/javascripts/.gitkeep +0 -0
  25. data/fixtures/title-app/source/layouts/layout.erb +10 -0
  26. data/fixtures/title-app/source/stylesheets/all.css +0 -0
  27. data/fixtures/title-app/source/templates/index.html.erb +1 -0
  28. data/fixtures/title-has-title-app/config.rb +1 -0
  29. data/fixtures/title-has-title-app/source/dir/index.html.erb +3 -0
  30. data/fixtures/title-has-title-app/source/dir/sub_dir/page.md +0 -0
  31. data/fixtures/title-has-title-app/source/images/.gitkeep +0 -0
  32. data/fixtures/title-has-title-app/source/index.html.erb +3 -0
  33. data/fixtures/title-has-title-app/source/javascripts/.gitkeep +0 -0
  34. data/fixtures/title-has-title-app/source/layouts/layout.erb +11 -0
  35. data/fixtures/title-has-title-app/source/stylesheets/all.css +0 -0
  36. data/fixtures/title-has-title-app/source/templates/index.html.erb +1 -0
  37. data/lib/middleman-tansu/helpers.rb +46 -2
  38. data/lib/middleman-tansu/template/shared/config.tt +1 -0
  39. data/lib/middleman-tansu/template/source/layouts/layout.slim +18 -28
  40. data/lib/middleman-tansu/template/source/sample.html.md +6 -5
  41. data/lib/middleman-tansu/template/source/sitemap.xml.builder +16 -0
  42. data/lib/middleman-tansu/template.rb +2 -4
  43. data/lib/middleman-tansu/version.rb +1 -1
  44. data/middleman-tansu.gemspec +4 -3
  45. metadata +73 -26
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 364857873d9ff35d57550ac0e610410f45b4456b
4
- data.tar.gz: a516657c295c9f1d9f58036ca2ee136b8cd4a1b0
3
+ metadata.gz: 6f81c9bc1a8df9d9ee97dd9d2f6d21a025b4846f
4
+ data.tar.gz: 7b125b5379c5cb0b57596f6b3bcc2e42d8bae8d0
5
5
  SHA512:
6
- metadata.gz: 0cd66e13e948f54cd1a046c946039d671b551fc0b900b79ebe25e17a3c336c732882f97cd2455366c7b1a72daef4b93579e2fb93c848d0a5d9fdf0d2fe213ebf
7
- data.tar.gz: 6ae1e80576f6650b0c9224174f861c0721c59d3956aec49638626f39f4243a849bd206134614715555680a949d3d57afac47aafb267d878c08ba7b6572e526c3
6
+ metadata.gz: 3b3ed8a4afef1d52bb030f60e4524a5d81c0209f0a4637cc8e2b92f08ed5a48f75c96206bd9814426598cbb733d99cf55a4ecf52a6e7f396b6cc5d18598df6f1
7
+ data.tar.gz: ff7af4caa6f8bc2048509295177220ab40f5ebdcc04079a1b28704f258a7eda4a72cdcb44bdaf5e7a355e37abb5cbc858b86905a688dbc46c30aafa3f9a26fa9
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Middleman::Tansu
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/middleman-tansu.svg)](http://badge.fury.io/rb/middleman-tansu)
4
+ [![Build Status](https://travis-ci.org/yterajima/middleman-tansu.svg?branch=develop)](https://travis-ci.org/yterajima/middleman-tansu)
5
+
3
6
  TODO: Write a gem description
4
7
 
5
8
  ## Installation
@@ -37,6 +37,24 @@ Feature: Helpers
37
37
  And the helper result "build/index.html" should contain '<ul class="bread-links">'
38
38
  And the helper result "build/index.html" should contain '<li class="root"><a href="/">Home</a></li>'
39
39
 
40
+ Scenario: `breadcrumbs` helper with index page that has title Frontmatter
41
+ Given a fixture app "breadcrumbs-has-title-app"
42
+ When I run `middleman build --verbose`
43
+ Then the exit status should be 0
44
+
45
+ # /index.html
46
+ And the helper result "build/index.html" should contain '<ul class="breadcrumbs">'
47
+ And the helper result "build/index.html" should contain '<li class="root"><a href="/">Root Page</a></li>'
48
+
49
+ # /dir/page.html
50
+ And the helper result "build/dir/sub_dir/page.html" should contain:
51
+ """
52
+ <li class="root"><a href="/">Root Page</a></li>
53
+ <li><a href="/dir/">Dir/Index Title</a></li>
54
+ <li><a href="/dir/sub_dir/">sub_dir</a></li>
55
+ <li class="current">Dir&#x2F;Page Title</li>
56
+ """
57
+
40
58
  Scenario: `children_pages` helper
41
59
  Given a fixture app "children-pages-app"
42
60
  And a file named "source/templates/index.html.erb" with:
@@ -98,7 +116,7 @@ Feature: Helpers
98
116
  And a file named "source/templates/index.html.erb" with:
99
117
  """
100
118
  <ul>
101
- <% children_pages(:category).each do |page| %>
119
+ <% children_pages(:category).each do |page| %>
102
120
  <li><%= link_to(page_name(page), page_url(page)) %></li>
103
121
  <% end %>
104
122
  </ul>
@@ -120,7 +138,7 @@ Feature: Helpers
120
138
  And a file named "source/templates/index.html.erb" with:
121
139
  """
122
140
  <ul>
123
- <% children_pages(:category, :desc).each do |page| %>
141
+ <% children_pages(:category, :desc).each do |page| %>
124
142
  <li><%= link_to(page_name(page), page_url(page)) %></li>
125
143
  <% end %>
126
144
  </ul>
@@ -136,3 +154,139 @@ Feature: Helpers
136
154
  <li><a href="/dir1/page2.html">dir1/Page2 Title</a></li>
137
155
  <li><a href="/dir1/page1.html">dir1/Page1 Title</a></li>
138
156
  """
157
+
158
+ Scenario: `title` helper
159
+ Given a fixture app "title-app"
160
+ When I run `middleman build --verbose`
161
+ Then the exit status should be 0
162
+ And the helper result "build/index.html" should contain:
163
+ """
164
+ <title>Middleman-Tansu</title>
165
+ """
166
+ And the helper result "build/dir/index.html" should contain:
167
+ """
168
+ <title>dir/ - Middleman-Tansu</title>
169
+ """
170
+ And the helper result "build/dir/sub_dir/index.html" should contain:
171
+ """
172
+ <title>dir/sub_dir/ - Middleman-Tansu</title>
173
+ """
174
+ And the helper result "build/dir/sub_dir/page.html" should contain:
175
+ """
176
+ <title>Page Title - Middleman-Tansu</title>
177
+ """
178
+
179
+ Scenario: `title` helper with app.config.site_title option
180
+ Given a fixture app "title-app"
181
+ And a file named "config.rb" with:
182
+ """
183
+ set :site_title, "TANSU"
184
+ activate :tansu
185
+ """
186
+ When I run `middleman build --verbose`
187
+ Then the exit status should be 0
188
+ And the helper result "build/index.html" should contain:
189
+ """
190
+ <title>TANSU</title>
191
+ """
192
+ And the helper result "build/dir/index.html" should contain:
193
+ """
194
+ <title>dir/ - TANSU</title>
195
+ """
196
+ And the helper result "build/dir/sub_dir/page.html" should contain:
197
+ """
198
+ <title>Page Title - TANSU</title>
199
+ """
200
+
201
+ Scenario: `title` helper
202
+ Given a fixture app "title-has-title-app"
203
+ When I run `middleman build --verbose`
204
+ Then the exit status should be 0
205
+ And the helper result "build/index.html" should contain:
206
+ """
207
+ <title>Root Page - Middleman-Tansu</title>
208
+ """
209
+ And the helper result "build/dir/index.html" should contain:
210
+ """
211
+ <title>Dir/Index Title - Middleman-Tansu</title>
212
+ """
213
+ And the helper result "build/dir/sub_dir/page.html" should contain:
214
+ """
215
+ <title>dir/sub_dir/page - Middleman-Tansu</title>
216
+ """
217
+
218
+ Scenario: `heading` helper
219
+ Given a fixture app "title-app"
220
+ When I run `middleman build --verbose`
221
+ Then the exit status should be 0
222
+ And the helper result "build/index.html" should contain:
223
+ """
224
+ <h1>Middleman-Tansu</h1>
225
+ """
226
+ And the helper result "build/dir/index.html" should contain:
227
+ """
228
+ <h1>dir/</h1>
229
+ """
230
+ And the helper result "build/dir/sub_dir/index.html" should contain:
231
+ """
232
+ <h1>dir/sub_dir/</h1>
233
+ """
234
+ And the helper result "build/dir/sub_dir/page.html" should contain:
235
+ """
236
+ <h1>Page Title</h1>
237
+ """
238
+
239
+ Scenario: `heading` helper with app.config.site_title option
240
+ Given a fixture app "title-app"
241
+ And a file named "config.rb" with:
242
+ """
243
+ set :site_title, "TANSU"
244
+ activate :tansu
245
+ """
246
+ When I run `middleman build --verbose`
247
+ Then the exit status should be 0
248
+ And the helper result "build/index.html" should contain:
249
+ """
250
+ <h1>TANSU</h1>
251
+ """
252
+ And the helper result "build/dir/index.html" should contain:
253
+ """
254
+ <h1>dir/</h1>
255
+ """
256
+ And the helper result "build/dir/sub_dir/page.html" should contain:
257
+ """
258
+ <h1>Page Title</h1>
259
+ """
260
+
261
+ Scenario: `heading` helper
262
+ Given a fixture app "title-has-title-app"
263
+ When I run `middleman build --verbose`
264
+ Then the exit status should be 0
265
+ And the helper result "build/index.html" should contain:
266
+ """
267
+ <h1>Root Page</h1>
268
+ """
269
+ And the helper result "build/dir/index.html" should contain:
270
+ """
271
+ <h1>Dir/Index Title</h1>
272
+ """
273
+ And the helper result "build/dir/sub_dir/page.html" should contain:
274
+ """
275
+ <h1>dir/sub_dir/page</h1>
276
+ """
277
+ Scenario: `index?` helper
278
+ Given a fixture app "index-app"
279
+ When I run `middleman build --verbose`
280
+ Then the exit status should be 0
281
+ And the helper result "build/index.html" should contain:
282
+ """
283
+ <h2>Index</h2>
284
+ """
285
+ And the helper result "build/dir/index.html" should contain:
286
+ """
287
+ <h2>Index</h2>
288
+ """
289
+ And the helper result "build/dir/page.html" should contain:
290
+ """
291
+ <h2>Page</h2>
292
+ """
@@ -9,6 +9,7 @@ Feature: Template CLI
9
9
  | .gitignore |
10
10
  | config.rb |
11
11
  | source/sample.html.md |
12
+ | source/sitemap.xml.builder |
12
13
  | source/layouts/layout.slim |
13
14
  | source/stylesheets/all.css.sass |
14
15
  | source/stylesheets/github-markdown.css |
@@ -22,6 +23,40 @@ Feature: Template CLI
22
23
  And the following files should exist:
23
24
  | build/index.html |
24
25
  | build/sample.html |
26
+ | build/sitemap.xml |
25
27
  | build/stylesheets/all.css |
26
28
  And the file "build/index.html" should contain "middleman-tansu の簡単な紹介"
29
+ And the helper result "build/sample.html" should contain:
30
+ """
31
+ <li class="current">middleman-tansu の簡単な紹介</li>
32
+ """
33
+ And the helper result "build/sitemap.xml" should contain:
34
+ """
35
+ <loc>http://localhost:4567/index.html</loc>
36
+ """
27
37
 
38
+ Scenario: Build a new project with app.config.sitemap_url
39
+ Given I run `middleman init MY_PROJECT --template tansu`
40
+ And a file named "MY_PROJECT/config.rb" with:
41
+ """
42
+ require "slim"
43
+ require "builder"
44
+ set :site_title, "Middleman-Tansu"
45
+ set :sitemap_url, "http://middlemanapp.com"
46
+ activate :tansu
47
+ set :markdown_engine, :redcarpet
48
+ set :markdown, :fenced_code_blocks => true, :smartypants => true, :with_toc_data => true
49
+ activate :syntax, :inline_theme => 'github'
50
+ """
51
+ And I cd to "MY_PROJECT"
52
+ When I run `middleman build`
53
+ Then the exit status should be 0
54
+ And the following files should exist:
55
+ | build/index.html |
56
+ | build/sample.html |
57
+ | build/sitemap.xml |
58
+ | build/stylesheets/all.css |
59
+ And the helper result "build/sitemap.xml" should contain:
60
+ """
61
+ <loc>http://middlemanapp.com/index.html</loc>
62
+ """
@@ -0,0 +1 @@
1
+ activate :tansu
@@ -0,0 +1,4 @@
1
+ ---
2
+ title: Dir/Index Title
3
+ ---
4
+
@@ -0,0 +1,3 @@
1
+ ---
2
+ title: Dir/Page Title
3
+ ---
@@ -0,0 +1,4 @@
1
+ ---
2
+ title: Root Page
3
+ ---
4
+
@@ -0,0 +1,13 @@
1
+ <html>
2
+ <head>
3
+ <meta charsrt="utf-8">
4
+ <title>title</title>
5
+ </head>
6
+ <body>
7
+ <h1>Helpers</h1>
8
+
9
+ <h2>breadcrumbs helper</h2>
10
+ <%= breadcrumbs %>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ activate :tansu
File without changes
File without changes
File without changes
@@ -0,0 +1,17 @@
1
+ <html>
2
+ <head>
3
+ <meta charsrt="utf-8">
4
+ <title>title</title>
5
+ </head>
6
+ <body>
7
+ <h1>Helpers</h1>
8
+
9
+ <% if index? %>
10
+ <h2>Index</h2>
11
+ <% else %>
12
+ <h2>Page</h2>
13
+ <% end %>
14
+
15
+ <%= yield %>
16
+ </body>
17
+ </html>
File without changes
@@ -0,0 +1 @@
1
+ <p>Proxy Page</p>
@@ -0,0 +1 @@
1
+ activate :tansu
@@ -0,0 +1,3 @@
1
+ ---
2
+ title: Page Title
3
+ ---
File without changes
File without changes
@@ -0,0 +1,10 @@
1
+ <html>
2
+ <head>
3
+ <meta charsrt="utf-8">
4
+ <title><%= title %></title>
5
+ </head>
6
+ <body>
7
+ <h1><%= heading %></h1>
8
+ <%= yield %>
9
+ </body>
10
+ </html>
File without changes
@@ -0,0 +1 @@
1
+ <p>Proxy Page</p>
@@ -0,0 +1 @@
1
+ activate :tansu
@@ -0,0 +1,3 @@
1
+ ---
2
+ title: Dir/Index Title
3
+ ---
@@ -0,0 +1,3 @@
1
+ ---
2
+ title: Root Page
3
+ ---
@@ -0,0 +1,11 @@
1
+ <html>
2
+ <head>
3
+ <meta charsrt="utf-8">
4
+ <title><%= title %></title>
5
+ </head>
6
+ <body>
7
+ <h1><%= heading %></h1>
8
+
9
+ <%= yield %>
10
+ </body>
11
+ </html>
@@ -0,0 +1 @@
1
+ <p>Proxy Page</p>
@@ -15,19 +15,63 @@ module Middleman
15
15
 
16
16
  def breadcrumbs(klass = 'breadcrumbs', root = "Top")
17
17
  li = []
18
+ root = page_title("/") || root
18
19
  li.push("<li class=\"root\">#{link_to(root, "/")}</li>")
19
20
 
20
21
  paths = path_list(current_resource.path)
21
22
  paths.each do |path|
23
+ name = page_title(path[:path]) || path[:name]
22
24
  if path == paths.last
23
- li.push("<li class=\"current\">#{path[:name]}</li>")
25
+ li.push("<li class=\"current\">#{h(name)}</li>")
24
26
  else
25
- li.push("<li>#{link_to(path[:name], path[:path])}</li>")
27
+ li.push("<li>#{link_to(name, path[:path])}</li>")
26
28
  end
27
29
  end
28
30
  "<ul class=\"#{klass}\">\n#{li.join("\n")}\n</ul>"
29
31
  end
30
32
 
33
+ def page_title(path)
34
+ if /\.html$/ !~ path
35
+ path = File.join(path, config.tansu[:default_document])
36
+ end
37
+ sitemap.find_resource_by_path(path).data.title
38
+ end
39
+
40
+ def page_title_or_path(path)
41
+ page_title(path) || path.gsub(/(index)?\.html$/, "")
42
+ end
43
+
44
+ def title(splitter = ' - ')
45
+ base_title = base_title()
46
+ page_title = page_title_or_path(current_resource.path)
47
+
48
+ if !page_title.empty?
49
+ "#{page_title}#{splitter}#{base_title}"
50
+ else
51
+ base_title
52
+ end
53
+ end
54
+
55
+ def heading
56
+ base_title = base_title()
57
+ page_title = page_title_or_path(current_resource.path)
58
+
59
+ if !page_title.empty?
60
+ page_title
61
+ else
62
+ base_title
63
+ end
64
+ end
65
+
66
+ def base_title
67
+ config[:site_title] || "Middleman-Tansu"
68
+ end
69
+
70
+ def index?
71
+ regex = Regexp.new("#{config.tansu[:default_document]}$")
72
+ regex =~ current_resource.path || "/" == current_resource.path
73
+ end
74
+
31
75
  def children_pages(key = :date, order_by = :asc)
32
76
  dirs = []
33
77
  pages = []
@@ -3,6 +3,7 @@ require "builder"
3
3
 
4
4
  # Tansu Settings
5
5
  set :site_title, "Middleman-Tansu"
6
+ set :sitemap_url, "http://localhost:4567"
6
7
  activate :tansu
7
8
 
8
9
  # Markdown Settings
@@ -9,12 +9,7 @@ html
9
9
  meta name="viewport" content="width=device-width,user-scalable=no,maximum-scale=1"
10
10
 
11
11
  title
12
- - if /^index.html$/ =~ current_resource.path
13
- = config.site_title
14
- - elsif data.page.title
15
- = "#{data.page.title} - #{config.site_title}"
16
- - else
17
- = "#{current_resource.path.gsub(/index\.html$/, "")} - #{config.site_title}"
12
+ = title
18
13
 
19
14
  == stylesheet_link_tag "all"
20
15
 
@@ -25,30 +20,25 @@ html
25
20
  == breadcrumbs
26
21
 
27
22
  h1
28
- - if /^index.html$/ =~ current_resource.path
29
- = config.site_title
30
- - elsif data.page.title
31
- = data.page.title
32
- - else
33
- = current_resource.path.gsub(/index\.html$/, "")
23
+ = heading
34
24
 
35
25
  article.markdown-body
36
- - if data.page.author || data.page.date
37
- div.metadata
38
- - if data.page.author
39
- dl
40
- dt author
41
- dd
42
- - if data.page.author.instance_of?(Array)
43
- == data.page.author.join(", ")
44
- - else
45
- == data.page.author
46
-
47
- - if data.page.date
48
- dl
49
- dt date
50
- dd
51
- == data.page.date
26
+ - if !index?
27
+ div.metadata
28
+ - if data.page.author
29
+ dl
30
+ dt author
31
+ dd
32
+ - if data.page.author.instance_of?(Array)
33
+ = data.page.author.join(", ")
34
+ - else
35
+ = data.page.author
36
+
37
+ - if data.page.date
38
+ dl
39
+ dt date
40
+ dd
41
+ = data.page.date
52
42
 
53
43
  == yield
54
44
 
@@ -4,7 +4,7 @@ author: yterajima
4
4
  date: 2014-01-25 23:32:00 +0900
5
5
  ---
6
6
 
7
- [middleman-tansu](https://github.com/yterajima/middleman-tansu) は Markdown ファイルをディレクトリを使って分類管理するために開発されているテンプレートです。例えるなら, 静的な wiki のようなものを目指しています。バラバラに管理される Markdown を tansu (箪笥) に入れてまとめて管理できるように工夫されています。
7
+ [middleman-tansu](https://github.com/yterajima/middleman-tansu) は Markdown ファイルをディレクトリを使って分類管理するために開発されているテンプレートです。例えるなら静的な wiki のようなものを目指しています。バラバラに管理される Markdown を tansu (箪笥) に入れてまとめて管理できるように工夫されています。
8
8
 
9
9
  ## middleman-tansu が提供する機能
10
10
 
@@ -59,17 +59,18 @@ __NOTICE__: `index.html` として出力されるファイルが存在する場
59
59
  - children_pages
60
60
  - 現在のページがあるディレクトリ中のファイル/ディレクトリ一覧
61
61
  - この Helper は `index.html` になるファイルの中で使われます
62
-
62
+ - title
63
+ - title タグ中に表示すべき文字列を返す
64
+ - heading
65
+ - h1 タグ中に表示すべき文字列を返す
63
66
 
64
67
  ### 4.プロジェクトテンプレート
65
68
 
66
69
  middleman-tansu は拡張機能と同時にプロジェクトテンプレートを提供しています。次のコマンドで初期化できます。
67
70
 
68
71
  ```sh
69
- $ middleman tansu PROJECT_NAME --template tansu
72
+ $ middleman init PROJECT_NAME --template tansu
70
73
  ```
71
74
 
72
75
  このまま `$ middleman server` すると基本的な機能が用意されたテンプレートを使うことができます。このテンプレートは github-flavored-markdown を使用することができます。もちろんコードの構文ハイライトも対応します。
73
76
 
74
-
75
-
@@ -0,0 +1,16 @@
1
+ ---
2
+ layout: false
3
+ ---
4
+ site_url = config[:sitemap_url] || "http://localhost:4567/"
5
+ xml.instruct!
6
+ xml.urlset 'xmlns' => "http://www.sitemaps.org/schemas/sitemap/0.9" do
7
+ sitemap.resources.select { |page| page.destination_path =~ /\.html/ }.each do |page|
8
+ xml.url do
9
+ xml.loc File.join(site_url, page.destination_path)
10
+ xml.lastmod Time.now.iso8601
11
+ xml.changefreq page.data.changefreq || "weekly"
12
+ xml.priority page.data.priority || "0.5"
13
+ end
14
+ end
15
+ end
16
+
@@ -29,13 +29,11 @@ module Middleman
29
29
  empty_directory File.join(location, 'source', 'layouts')
30
30
 
31
31
  copy_file 'source/sample.html.md', File.join(location, 'source/sample.html.md')
32
-
32
+ copy_file 'source/sitemap.xml.builder', File.join(location, 'source/sitemap.xml.builder')
33
33
  copy_file 'source/layouts/layout.slim', File.join(location, 'source/layouts/layout.slim')
34
-
34
+ copy_file 'source/templates/index.html.slim', File.join(location, 'source/templates/index.html.slim')
35
35
  copy_file 'source/stylesheets/all.css.sass', File.join(location, 'source', options[:css_dir], 'all.css.sass')
36
36
  copy_file 'source/stylesheets/github-markdown.css', File.join(location, 'source', options[:css_dir], 'github-markdown.css')
37
-
38
- copy_file 'source/templates/index.html.slim', File.join(location, 'source', 'templates', 'index.html.slim')
39
37
  end
40
38
  end
41
39
  end
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Tansu
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -21,12 +21,13 @@ Gem::Specification.new do |spec|
21
21
  spec.required_ruby_version = '>= 1.9.3'
22
22
 
23
23
  spec.add_runtime_dependency "middleman", "~>3.3"
24
+ spec.add_runtime_dependency "middleman-syntax", "~> 2.0"
25
+ spec.add_runtime_dependency "slim", "~> 3.0"
26
+ spec.add_runtime_dependency "redcarpet", "~> 3.2"
27
+ spec.add_runtime_dependency "builder", "~> 3.2"
24
28
 
25
29
  spec.add_development_dependency "cucumber", "~> 1.3"
26
30
  spec.add_development_dependency "aruba", "~> 0.6"
27
31
  spec.add_development_dependency "bundler", "~> 1.5"
28
32
  spec.add_development_dependency "rake", "~> 10"
29
- spec.add_development_dependency "slim", "~> 3.0"
30
- spec.add_development_dependency "redcarpet", "~> 3.2"
31
- spec.add_development_dependency "middleman-syntax", "~> 2.0"
32
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-tansu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuya Terajima
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-25 00:00:00.000000000 Z
11
+ date: 2015-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman
@@ -25,103 +25,117 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.3'
27
27
  - !ruby/object:Gem::Dependency
28
- name: cucumber
28
+ name: middleman-syntax
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.3'
34
- type: :development
33
+ version: '2.0'
34
+ type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.3'
40
+ version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: aruba
42
+ name: slim
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.6'
48
- type: :development
47
+ version: '3.0'
48
+ type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.6'
54
+ version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: bundler
56
+ name: redcarpet
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.5'
62
- type: :development
61
+ version: '3.2'
62
+ type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.5'
68
+ version: '3.2'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: builder
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10'
75
+ version: '3.2'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.2'
83
+ - !ruby/object:Gem::Dependency
84
+ name: cucumber
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.3'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '10'
96
+ version: '1.3'
83
97
  - !ruby/object:Gem::Dependency
84
- name: slim
98
+ name: aruba
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '3.0'
103
+ version: '0.6'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '3.0'
110
+ version: '0.6'
97
111
  - !ruby/object:Gem::Dependency
98
- name: redcarpet
112
+ name: bundler
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - "~>"
102
116
  - !ruby/object:Gem::Version
103
- version: '3.2'
117
+ version: '1.5'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
- version: '3.2'
124
+ version: '1.5'
111
125
  - !ruby/object:Gem::Dependency
112
- name: middleman-syntax
126
+ name: rake
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - "~>"
116
130
  - !ruby/object:Gem::Version
117
- version: '2.0'
131
+ version: '10'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: '2.0'
138
+ version: '10'
125
139
  description: A Template of Middleman.
126
140
  email:
127
141
  - terra@e2esound.com
@@ -149,6 +163,15 @@ files:
149
163
  - fixtures/breadcrumbs-app/source/layouts/layout.erb
150
164
  - fixtures/breadcrumbs-app/source/stylesheets/all.css
151
165
  - fixtures/breadcrumbs-app/source/templates/index.html.erb
166
+ - fixtures/breadcrumbs-has-title-app/config.rb
167
+ - fixtures/breadcrumbs-has-title-app/source/dir/index.html.erb
168
+ - fixtures/breadcrumbs-has-title-app/source/dir/sub_dir/page.md
169
+ - fixtures/breadcrumbs-has-title-app/source/images/.gitkeep
170
+ - fixtures/breadcrumbs-has-title-app/source/index.html.erb
171
+ - fixtures/breadcrumbs-has-title-app/source/javascripts/.gitkeep
172
+ - fixtures/breadcrumbs-has-title-app/source/layouts/layout.erb
173
+ - fixtures/breadcrumbs-has-title-app/source/stylesheets/all.css
174
+ - fixtures/breadcrumbs-has-title-app/source/templates/index.html.erb
152
175
  - fixtures/breadcrumbs-params-app/config.rb
153
176
  - fixtures/breadcrumbs-params-app/source/dir/page.md
154
177
  - fixtures/breadcrumbs-params-app/source/images/.gitkeep
@@ -203,6 +226,13 @@ files:
203
226
  - fixtures/drawer-app/source/stylesheets/all.css
204
227
  - fixtures/drawer-app/source/templates/index.html.erb
205
228
  - fixtures/empty-app/source/.gitkeep
229
+ - fixtures/index-app/config.rb
230
+ - fixtures/index-app/source/dir/page.md
231
+ - fixtures/index-app/source/images/.gitkeep
232
+ - fixtures/index-app/source/javascripts/.gitkeep
233
+ - fixtures/index-app/source/layouts/layout.erb
234
+ - fixtures/index-app/source/stylesheets/all.css
235
+ - fixtures/index-app/source/templates/index.html.erb
206
236
  - fixtures/path-list-app/config.rb
207
237
  - fixtures/path-list-app/source/images/.gitkeep
208
238
  - fixtures/path-list-app/source/javascripts/.gitkeep
@@ -210,6 +240,22 @@ files:
210
240
  - fixtures/path-list-app/source/page/list/.gitkeep
211
241
  - fixtures/path-list-app/source/stylesheets/all.css
212
242
  - fixtures/path-list-app/source/templates/index.html.erb
243
+ - fixtures/title-app/config.rb
244
+ - fixtures/title-app/source/dir/sub_dir/page.md
245
+ - fixtures/title-app/source/images/.gitkeep
246
+ - fixtures/title-app/source/javascripts/.gitkeep
247
+ - fixtures/title-app/source/layouts/layout.erb
248
+ - fixtures/title-app/source/stylesheets/all.css
249
+ - fixtures/title-app/source/templates/index.html.erb
250
+ - fixtures/title-has-title-app/config.rb
251
+ - fixtures/title-has-title-app/source/dir/index.html.erb
252
+ - fixtures/title-has-title-app/source/dir/sub_dir/page.md
253
+ - fixtures/title-has-title-app/source/images/.gitkeep
254
+ - fixtures/title-has-title-app/source/index.html.erb
255
+ - fixtures/title-has-title-app/source/javascripts/.gitkeep
256
+ - fixtures/title-has-title-app/source/layouts/layout.erb
257
+ - fixtures/title-has-title-app/source/stylesheets/all.css
258
+ - fixtures/title-has-title-app/source/templates/index.html.erb
213
259
  - lib/middleman-tansu.rb
214
260
  - lib/middleman-tansu/command.rb
215
261
  - lib/middleman-tansu/drawer.rb
@@ -220,6 +266,7 @@ files:
220
266
  - lib/middleman-tansu/template/shared/config.tt
221
267
  - lib/middleman-tansu/template/source/layouts/layout.slim
222
268
  - lib/middleman-tansu/template/source/sample.html.md
269
+ - lib/middleman-tansu/template/source/sitemap.xml.builder
223
270
  - lib/middleman-tansu/template/source/stylesheets/all.css.sass
224
271
  - lib/middleman-tansu/template/source/stylesheets/github-markdown.css
225
272
  - lib/middleman-tansu/template/source/templates/index.html.slim