musako 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ce4cfce6a9c5333df5b74aa7111d4157090e155
4
- data.tar.gz: bd538843d2608c9f24098876ec5f6aadb612920b
3
+ metadata.gz: a5d3527094ab36c3c38b84753dd4f908033127ed
4
+ data.tar.gz: 8886ccefe4bef31a092c2219f744e2741c23d4af
5
5
  SHA512:
6
- metadata.gz: b09c4bd4e87fd56bd19a86572cd5e95436e1b828793d166bb4465f3931c61ebfabc325989020e278d3a9836cbd26f5438ec288f73bf5cb5bf657a8f898a2c705
7
- data.tar.gz: ced159963804cfb9cbae73f6fb5d722300e262697d88be96bf20e8f2c19dc20a85021c779a1a27d3e77981acfbed23115443ba03d652eeeaa909a62eb01e9ba3
6
+ metadata.gz: 85108450e4d635a4a02fd22a9fea6d98e46530a99e73baafc12f7fdcac480a4f6ad250911d75a4da1ffdf0f8f37619dbad4d71cdcbb6b7184527ac0a1c554d3a
7
+ data.tar.gz: c2de22daa25c84be91be649057c42ab05d6d52344b09d5ad9da03075c097349fa722242f11ce4f443d25b0d192229b63208d3856140c816fa4014221ec32601a
data/README.md CHANGED
@@ -26,9 +26,12 @@ Create directories from template (only once).
26
26
 
27
27
  $ musako generate
28
28
 
29
- Write your post, and build
29
+ Write your post, and build.
30
+ (Filename rule: {YYYYMMDD-hoge.md}
30
31
 
31
- $ touch posts/blurblur.md
32
+ And can edit "config.yml" for site title and description.
33
+
34
+ $ touch posts/20140101-blurblur.md
32
35
  $ musako build
33
36
 
34
37
  Up local httpd.
@@ -25,7 +25,7 @@ module Musako
25
25
  end
26
26
 
27
27
  def self.build_page_files
28
- posts = []
28
+ posts = []
29
29
 
30
30
  # posts to html
31
31
  post_files = File.join(Musako.source_path, "posts", "**", "*.md")
@@ -33,10 +33,11 @@ module Musako
33
33
  post = Musako::Renderers::Post.new(file)
34
34
  post.render
35
35
 
36
- posts.unshift(post)
36
+ posts << post
37
37
  end
38
38
 
39
39
  views_dir = Musako.views_path
40
+ posts.sort! { |a, b| b.date <=> a.date }
40
41
 
41
42
  index_file = File.join(views_dir, "index.slim")
42
43
  Musako::Renderers::Index.new(index_file, posts).render
@@ -19,7 +19,10 @@ module Musako
19
19
 
20
20
  layout = Slim::Template.new(
21
21
  File.join(Musako.views_path, "layouts", "application.slim")
22
- ).render(self, {title: Musako.configuration[:title]}) { contents }
22
+ ).render(self, {
23
+ title: Musako.configuration[:title],
24
+ page_title: Musako.configuration[:title]
25
+ }) { contents }
23
26
 
24
27
  File.open(self.output_path, "w") do |file|
25
28
  file.write layout
@@ -24,7 +24,7 @@ module Musako
24
24
  title = if @html =~ /<h1>(.*?)<\/h1>/
25
25
  $1
26
26
  else
27
- "No title"
27
+ Musako.configuration[:title]
28
28
  end
29
29
  self.set_meta_data(title)
30
30
 
@@ -34,7 +34,10 @@ module Musako
34
34
 
35
35
  layout = Slim::Template.new(
36
36
  File.join(Musako.views_path, "layouts", "application.slim")
37
- ).render(self, {title: Musako.configuration[:title]}) { post }
37
+ ).render(self, {
38
+ title: Musako.configuration[:title],
39
+ page_title: "#{title} - #{Musako.configuration[:title]}"
40
+ }) { post }
38
41
 
39
42
  dir = File.dirname(self.output_path)
40
43
  unless File.directory? dir
@@ -1,3 +1,3 @@
1
1
  module Musako
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: musako
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - yo_waka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-23 00:00:00.000000000 Z
11
+ date: 2014-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slim
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: redcarpet
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
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
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: builder
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
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
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sass
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
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
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: commander
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.3'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.3'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description:
@@ -116,7 +116,7 @@ executables:
116
116
  extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
- - .gitignore
119
+ - ".gitignore"
120
120
  - Gemfile
121
121
  - LICENSE.txt
122
122
  - README.md
@@ -156,17 +156,17 @@ require_paths:
156
156
  - lib
157
157
  required_ruby_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
- - - '>='
159
+ - - ">="
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - '>='
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  requirements: []
168
168
  rubyforge_project:
169
- rubygems_version: 2.0.14
169
+ rubygems_version: 2.2.0
170
170
  signing_key:
171
171
  specification_version: 4
172
172
  summary: A simple static site generator