jekyll-s3-yearofmoo 0.0.17 → 0.0.18

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.
@@ -71,12 +71,24 @@ cloudfront_distribution_id: YOUR_CLOUDFRONT_DIST_ID (OPTIONAL)
71
71
  paths
72
72
  end
73
73
 
74
+ def find_matching_content_type(file)
75
+ ext = File.extname(file).downcase
76
+ if ext == '.html' || ext == '.xview'
77
+ return 'text/html'
78
+ end
79
+ return nil
80
+ end
81
+
74
82
  def customize_file_metadata(file)
75
83
  data = { :access => 'public-read' }
76
84
  expiry = find_matching_expires_header(file)
77
85
  if expiry
78
86
  data[:expires] = expiry
79
87
  end
88
+ content_type = find_matching_content_type(file)
89
+ if content_type
90
+ data['Content-Type'] = content_type
91
+ end
80
92
  data
81
93
  end
82
94
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module S3
3
- VERSION = "0.0.17"
3
+ VERSION = "0.0.18"
4
4
  end
5
5
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 17
9
- version: 0.0.17
8
+ - 18
9
+ version: 0.0.18
10
10
  platform: ruby
11
11
  authors:
12
12
  - Philippe Creux