octopress-printable 0.1.1.1 → 0.1.2

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: 3a053215d4f4864452208d8fb8d17d5c27c3234a
4
- data.tar.gz: b155ab563874ed00e1b7f3d54e5577cc45595399
3
+ metadata.gz: 91fb6d106d970a5a5590f95ba6329f6c9849c830
4
+ data.tar.gz: 11ea287af9b0d96a2f1bda2b01ad93a360fa72d3
5
5
  SHA512:
6
- metadata.gz: 955994de683ca03fae3fb43eea7129936e423ec0ca8fe743be85907e019baf4d10c3906cc2841ec21b3b5c143879524ba003b73a2b7d383da20e7c1aca32a246
7
- data.tar.gz: d05b348316ad44874e4a8fe02fdd4262303f361a4283540fd1bfac4bd54b3776049e87291f8dc1018a972019f98c8bd86d09ed27be57ddb436263c0efa1a31e8
6
+ metadata.gz: 154bd8b518bd0a8716b107ceb8e8f33a6c6cefbd5483fe6be608c17cbe0af858a36e1690da5c294ec319eb50ff880ead30dfb4a592201f88dd5615f7a089ff88
7
+ data.tar.gz: 8254fc3bda5acd4e14e3fc2714719f1d6aa8112318974fd624e23cfa1a5f693dbb0b66ab39abbcd6d6b9bc42713bbe727de43138c17d983e2dcc7f9e9ac1a62a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.2 - 2015-05-30
4
+ - Add 'noprintable' config to yaml front matter
5
+
3
6
  ## 0.1.1 - 2015-05-18
4
7
  - Add online version link in pdf
5
8
 
@@ -1,3 +1,18 @@
1
+ {% if post %}
2
+ {% if post.noprintable %}
3
+ {% assign display = false %}
4
+ {% else %}
5
+ {% assign display = true %}
6
+ {% endif %}
7
+ {% else %}
8
+ {% if page.noprintable %}
9
+ {% assign display = false %}
10
+ {% else %}
11
+ {% assign display = true %}
12
+ {% endif %}
13
+ {% endif %}
14
+
15
+ {% if display %}
1
16
  <span class="printable">
2
17
 
3
18
  {% if post %}
@@ -11,3 +26,4 @@
11
26
  {% endif %}
12
27
 
13
28
  </span>
29
+ {% endif %}
@@ -34,6 +34,12 @@ module Octopress
34
34
 
35
35
  site.posts.each do |p|
36
36
  post = p.path
37
+ head = YAML.load_file(post)
38
+
39
+ if head['noprintable']
40
+ next
41
+ end
42
+
37
43
  pdf = p.url.sub(/^\//, "")
38
44
  pdf = pdf.sub(/\/$/, "")
39
45
  pdf = pdf.gsub(/\//, "-")
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Printable
3
- VERSION = "0.1.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-printable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wang Jian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-18 00:00:00.000000000 Z
11
+ date: 2015-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler