octopress-ink 1.0.0.rc.5 → 1.0.0.rc.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 929a480cd5c29286e1e9d27ac281ce9f78352205
4
- data.tar.gz: d946b8c7b9154c3b1c8c264ff0fadda79bcfaaf7
3
+ metadata.gz: 727c703ec69287f70483794f60e961fdfe54969b
4
+ data.tar.gz: 66e14204dcc1b8784e14d4a776817d3602f5ea3d
5
5
  SHA512:
6
- metadata.gz: 412911ec07bbcd3deb32b4927d02e099e5720d3e87a2b540fa19e1fb35fb8790232d1dcee09c8c8c3b9d0fa38a38dff7b643a81abe91ada2dc53b2459bc22e16
7
- data.tar.gz: 266037047141b44054ce6cb560920ce4283b41d553bc56fb8f1678ead45efa140f5becf4264f6e85be5a44eef7af4af75db91a715b0d13c1d10e1dee01c01c63
6
+ metadata.gz: fd1a5f496fc17d8f448ac105e99102401aaaff9b7b970a4af86aac1a17a6cd4089d3934fb79174cc8b4f7b184501803448499968a6efc9cbe53a2f54399b796d
7
+ data.tar.gz: dd9aad5f81d50b136982d990e46874563fa1e97d94ed34466ae6a839352d120ce64e82675485fcc519f9a347c805bf1ed8a7f0571cb0e6b4af57c409845de360
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.0.0 RC6 - 2014-06-07
4
+
5
+ - Fixed: New gems gemspec scaffold does not include Ink's pre-release version numbers.
6
+ - Fixed: Better formatting for ordinal dates.
7
+ - Other minor bug fixes
8
+
3
9
  ## Current released version
4
10
 
5
11
  ### 1.0.0 RC5 - 2014-06-06
@@ -112,9 +112,10 @@ module Octopress
112
112
  # e.g. "spec" as in spec.name = "gem name"
113
113
  #
114
114
  def self.dependencies
115
- minor_version = VERSION.scan(/\d\.\d/)[0]
115
+ minor_version = VERSION.scan(/\d+\.\d/)[0]
116
+ current_patch_version = VERSION.sub(/\.(alpha|rc).*/i, '')
116
117
  d = "#{@settings[:spec_var]}.add_development_dependency \"octopress\"\n\n"
117
- d += "#{@settings[:spec_var]}.add_runtime_dependency \"octopress-ink\", \"~> #{minor_version}\", \">= #{VERSION}\"\n"
118
+ d += "#{@settings[:spec_var]}.add_runtime_dependency \"octopress-ink\", \"~> #{minor_version}\", \">= #{current_patch_version}\"\n"
118
119
  end
119
120
 
120
121
  # Add Octopress Ink plugin to core module file
@@ -76,29 +76,6 @@ module Octopress
76
76
  end
77
77
  end
78
78
 
79
- # Truncate a string at the <!--more--> marker
80
- # input - The content of a post or page
81
- #
82
- # Returns only the content preceeding the marker
83
- #
84
- def excerpt(input)
85
- if input.index(/<!--\s*more\s*-->/i)
86
- input.split(/<!--\s*more\s*-->/i)[0]
87
- else
88
- input
89
- end
90
- end
91
-
92
- # Checks for excerpt markers (helpful for template conditionals)
93
- #
94
- # input - The content of a page or post
95
- #
96
- # Returns true/false if the excerpt marker is found
97
- #
98
- def has_excerpt(input)
99
- input =~ /<!--\s*more\s*-->/i ? true : false
100
- end
101
-
102
79
  # Escapes HTML content for XML
103
80
  def cdata_escape(input)
104
81
  input.gsub(/<!\[CDATA\[/, '&lt;![CDATA[').gsub(/\]\]>/, ']]&gt;')
@@ -126,8 +103,8 @@ module Octopress
126
103
  compact_newlines(input).strip.gsub(/\s*\n\s*/, separator)
127
104
  end
128
105
 
129
- module_function :root, :expand_url, :expand_urls, :full_url, :full_urls, :excerpt, :cdata_escape, :titlecase, :classify, :sluggify, :join_lines, :compact_newlines, :unorphan
130
- public :expand_url, :expand_urls, :full_url, :full_urls, :excerpt, :cdata_escape, :titlecase, :classify, :sluggify, :join_lines, :compact_newlines, :unorphan
106
+ module_function :root, :expand_url, :expand_urls, :full_url, :full_urls, :cdata_escape, :titlecase, :classify, :sluggify, :join_lines, :compact_newlines, :unorphan
107
+ public :expand_url, :expand_urls, :full_url, :full_urls, :cdata_escape, :titlecase, :classify, :sluggify, :join_lines, :compact_newlines, :unorphan
131
108
  end
132
109
  end
133
110
  end
@@ -18,13 +18,17 @@ module Jekyll
18
18
  self.data.merge! add_post_vars(self.data)
19
19
  end
20
20
 
21
- if self.data['date']
22
- text = format_date(self.data['date'])
23
- xmlschema = datetime(self.data['date']).xmlschema
24
- html = date_html(text, xmlschema)
25
21
 
26
- self.data['date_xml'] = xmlschema
27
- self.data['date_html'] = html
22
+ if type == :page || type == :post
23
+ if self.data['date'] || self.respond_to?(:date)
24
+ the_date = self.data['date'] || self.date
25
+ text = format_date(the_date)
26
+ xmlschema = datetime(the_date).xmlschema
27
+ html = date_html(text, xmlschema)
28
+
29
+ self.data['date_xml'] = xmlschema
30
+ self.data['date_html'] = html
31
+ end
28
32
  end
29
33
 
30
34
  if self.data['updated']
@@ -76,7 +80,7 @@ module Jekyll
76
80
  def ordinalize(date)
77
81
  date = datetime(date)
78
82
  d = "<span class='date-month'>#{date.strftime('%b')}</span> "
79
- d = "<span class='date-day'>#{date.strftime('%e')}</span> "
83
+ d += "<span class='date-day'>#{date.strftime('%-d')}</span>"
80
84
  d += "<span class='date-suffix'>#{ordinal_suffix(date)}</span>, "
81
85
  d += "<span class='date-year'>#{date.strftime('%Y')}</span>"
82
86
  end
@@ -120,10 +124,12 @@ module Jekyll
120
124
  position = config['marker_position']
121
125
 
122
126
  if config['marker_position'] == 'before'
123
- "#{marker}&nbsp;#{title}"
127
+ title = "#{marker}&nbsp;#{title}"
124
128
  else
125
- "#{title}&nbsp;#{marker}"
129
+ title = "#{title}&nbsp;#{marker}"
126
130
  end
131
+
132
+ title
127
133
  end
128
134
 
129
135
  def title_text(config, title)
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Ink
3
- VERSION = "1.0.0.rc.5"
3
+ VERSION = "1.0.0.rc.6"
4
4
  end
5
5
  end
data/lib/octopress-ink.rb CHANGED
@@ -85,8 +85,10 @@ module Octopress
85
85
  if Octopress::Ink.config['docs_mode']
86
86
  payload['doc_pages'] = Octopress::Ink::Plugins.doc_pages
87
87
  end
88
+
89
+ payload['site'] ||= {}
88
90
 
89
- payload['site']['linkposts'] = site.posts.collect do |p|
91
+ payload['site']['linkposts'] = site.posts.select do |p|
90
92
  p.data['linkpost']
91
93
  end
92
94
 
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6
+ <title>Another Test Post</title>
7
+ <meta name="viewport" content="width=device-width">
8
+ </head>
9
+ <body class=" ">
10
+ <div class='local-override'><p>some random post
11
+ <a href="/food">relative link</a></p>
12
+ </div>
13
+
14
+ </body>
15
+ </html>
@@ -7,27 +7,64 @@
7
7
  <meta name="viewport" content="width=device-width">
8
8
  </head>
9
9
  <body class=" ">
10
- <div class='local-override'><p>Test plugin assets and overrides:</p>
11
-
12
- <ul>
13
- <li>stylesheets</li>
14
- <li>javascripts</li>
15
- <li>files</li>
16
- <li>images</li>
17
- <li>fonts</li>
18
- <li>sass plugin</li>
19
- </ul>
20
-
21
- <p>Test configurations</p>
22
-
23
- <ul>
24
- <li>sass compression</li>
25
- <li>sass line numbers</li>
26
- <li>combine_css</li>
27
- <li>combine_js</li>
28
- </ul>
29
-
30
- <p>one <span class='separator'></b> two <span class='separator'></b> three <span class='separator'></b> four five</p>
10
+ <div class='local-override'>
11
+ one <span class='separator'></b> two <span class='separator'></b> three <span class='separator'></b> four five
12
+
13
+
14
+ title: Another Test Post
15
+ title text: Another Test Post
16
+ title html: Another Test&nbsp;Post
17
+ title url: /2014/02/02/test-post-2.html
18
+ linkpost: false
19
+
20
+ date: 2014-02-02 00:00:00 -0600
21
+ date_xml: 2014-02-02T00:00:00-06:00
22
+ date_html: <time class='entry-date' datetime='2014-02-02T00:00:00-06:00' pubdate><span class='date-month'>Feb</span> <span class='date-day'>2</span><span class='date-suffix'>nd</span>, <span class='date-year'>2014</span></time>
23
+
24
+ content: <p>some random post
25
+ <a href="/food">relative link</a></p>
26
+
27
+ title: Test Post
28
+ title text: Test Post →
29
+ title html: Test&nbsp;Post&nbsp;<span class='post-marker post-marker-after'>→</span>
30
+ title url: http://timecube.com
31
+ linkpost: true
32
+
33
+ date: 2014-02-01 00:00:00 -0600
34
+ date_xml: 2014-02-01T00:00:00-06:00
35
+ date_html: <time class='entry-date' datetime='2014-02-01T00:00:00-06:00' pubdate><span class='date-month'>Feb</span> <span class='date-day'>1</span><span class='date-suffix'>st</span>, <span class='date-year'>2014</span></time>
36
+
37
+ content: <p>Test post <strong>strong</strong> <em>emphasized</em> <a href="http://example.com">some link</a></p>
38
+
39
+
40
+
41
+ title: Another Test Post
42
+ title text: Another Test Post
43
+ title html: Another Test&nbsp;Post
44
+ title url: /2014/02/02/test-post-2.html
45
+ linkpost: false
46
+
47
+ date: 2014-02-02 00:00:00 -0600
48
+ date_xml: 2014-02-02T00:00:00-06:00
49
+ date_html: <time class='entry-date' datetime='2014-02-02T00:00:00-06:00' pubdate><span class='date-month'>Feb</span> <span class='date-day'>2</span><span class='date-suffix'>nd</span>, <span class='date-year'>2014</span></time>
50
+
51
+ content: <p>some random post
52
+ <a href="/food">relative link</a></p>
53
+
54
+
55
+
56
+ title: Test Post
57
+ title text: Test Post →
58
+ title html: Test&nbsp;Post&nbsp;<span class='post-marker post-marker-after'>→</span>
59
+ title url: http://timecube.com
60
+ linkpost: true
61
+
62
+ date: 2014-02-01 00:00:00 -0600
63
+ date_xml: 2014-02-01T00:00:00-06:00
64
+ date_html: <time class='entry-date' datetime='2014-02-01T00:00:00-06:00' pubdate><span class='date-month'>Feb</span> <span class='date-day'>1</span><span class='date-suffix'>st</span>, <span class='date-year'>2014</span></time>
65
+
66
+ content: <p>Test post <strong>strong</strong> <em>emphasized</em> <a href="http://example.com">some link</a></p>
67
+
31
68
  </div>
32
69
 
33
70
  </body>
@@ -0,0 +1,11 @@
1
+ title: {{ post.title }}
2
+ title text: {{ post.title_text }}
3
+ title html: {{ post.title_html }}
4
+ title url: {{ post.title_url }}
5
+ linkpost: {{ post.linkpost }}
6
+
7
+ date: {{ post.date }}
8
+ date_xml: {{ post.date_xml }}
9
+ date_html: {{ post.date_html }}
10
+
11
+ content: {{ post.content }}
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: Another Test Post
3
+ layout: theme:test
4
+ ---
5
+
6
+ some random post
7
+ <a href="/food">relative link</a>
@@ -0,0 +1,27 @@
1
+ ---
2
+ layout: theme:test
3
+ title: Your New Jekyll Site
4
+ index: true
5
+ ---
6
+
7
+ {% assign separator = ' <span class='separator'></b> ' %}
8
+ {% capture foo | join_lines:separator %}
9
+ one
10
+ two
11
+ three
12
+
13
+ four five
14
+
15
+ {% endcapture %}{{ foo }}
16
+
17
+ {% for post in site.posts %}
18
+ {% include post_data.html %}
19
+ {% endfor %}
20
+
21
+ {% for post in site.articles %}
22
+ {% include post_data.html %}
23
+ {% endfor %}
24
+
25
+ {% for post in site.linkposts %}
26
+ {% include post_data.html %}
27
+ {% endfor %}
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_development_dependency "octopress"
24
24
 
25
- spec.add_runtime_dependency "octopress-ink", "~> 1.0", ">= 1.0.0.rc.4"
25
+ spec.add_runtime_dependency "octopress-ink", "~> 1.0", ">= 1.0.0"
26
26
  end
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_development_dependency "octopress"
24
24
 
25
- spec.add_runtime_dependency "octopress-ink", "~> 1.0", ">= 1.0.0.rc.4"
25
+ spec.add_runtime_dependency "octopress-ink", "~> 1.0", ">= 1.0.0"
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-ink
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc.5
4
+ version: 1.0.0.rc.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-06 00:00:00.000000000 Z
11
+ date: 2014-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -236,6 +236,7 @@ files:
236
236
  - test/copy_test/_copy/stylesheets/theme-test.css
237
237
  - test/copy_test/_copy/stylesheets/theme-test2.css
238
238
  - test/expected/2014/02/01/test-post.html
239
+ - test/expected/2014/02/02/test-post-2.html
239
240
  - test/expected/favicon.ico
240
241
  - test/expected/favicon.png
241
242
  - test/expected/four/index.xml
@@ -306,6 +307,7 @@ files:
306
307
  - test/plugins/test-theme/stylesheets/theme-test2.css
307
308
  - test/source/.gitignore
308
309
  - test/source/_includes/foo.html
310
+ - test/source/_includes/post_data.html
309
311
  - test/source/_layouts/head.html
310
312
  - test/source/_layouts/local.html
311
313
  - test/source/_plugins/awesome-sauce/config.yml
@@ -316,8 +318,9 @@ files:
316
318
  - test/source/_plugins/theme/stylesheets/_colors.sass
317
319
  - test/source/_plugins/theme/stylesheets/theme-test.css
318
320
  - test/source/_posts/2014-02-01-test-post.md
321
+ - test/source/_posts/2014-02-02-test-post-2.md
319
322
  - test/source/favicon.png
320
- - test/source/index.md
323
+ - test/source/index.html
321
324
  - test/source/test_config/plugin_config.html
322
325
  - test/source/test_config/theme_config.html
323
326
  - test/source/test_layouts/local.html
@@ -443,6 +446,7 @@ test_files:
443
446
  - test/copy_test/_copy/stylesheets/theme-test.css
444
447
  - test/copy_test/_copy/stylesheets/theme-test2.css
445
448
  - test/expected/2014/02/01/test-post.html
449
+ - test/expected/2014/02/02/test-post-2.html
446
450
  - test/expected/favicon.ico
447
451
  - test/expected/favicon.png
448
452
  - test/expected/four/index.xml
@@ -513,6 +517,7 @@ test_files:
513
517
  - test/plugins/test-theme/stylesheets/theme-test2.css
514
518
  - test/source/.gitignore
515
519
  - test/source/_includes/foo.html
520
+ - test/source/_includes/post_data.html
516
521
  - test/source/_layouts/head.html
517
522
  - test/source/_layouts/local.html
518
523
  - test/source/_plugins/awesome-sauce/config.yml
@@ -523,8 +528,9 @@ test_files:
523
528
  - test/source/_plugins/theme/stylesheets/_colors.sass
524
529
  - test/source/_plugins/theme/stylesheets/theme-test.css
525
530
  - test/source/_posts/2014-02-01-test-post.md
531
+ - test/source/_posts/2014-02-02-test-post-2.md
526
532
  - test/source/favicon.png
527
- - test/source/index.md
533
+ - test/source/index.html
528
534
  - test/source/test_config/plugin_config.html
529
535
  - test/source/test_config/theme_config.html
530
536
  - test/source/test_layouts/local.html
data/test/source/index.md DELETED
@@ -1,30 +0,0 @@
1
- ---
2
- layout: theme:test
3
- title: Your New Jekyll Site
4
- ---
5
-
6
- Test plugin assets and overrides:
7
-
8
- - stylesheets
9
- - javascripts
10
- - files
11
- - images
12
- - fonts
13
- - sass plugin
14
-
15
- Test configurations
16
-
17
- - sass compression
18
- - sass line numbers
19
- - combine_css
20
- - combine_js
21
-
22
- {% assign separator = ' <span class='separator'></b> ' %}
23
- {% capture foo | join_lines:separator %}
24
- one
25
- two
26
- three
27
-
28
- four five
29
-
30
- {% endcapture %}{{ foo }}