zine 0.14.0 → 0.15.0

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
  SHA256:
3
- metadata.gz: 83a6d732e0f716bf2df642356304e6e80622736f778ff6367e3bf742a3d55f04
4
- data.tar.gz: 75c284e7e74f8594372c2be764590de57a2a1072b70e989136c09130948478ea
3
+ metadata.gz: ec6708f393eb728e1c5683a092f37ee2008c41c292105be0587c89045f9b267a
4
+ data.tar.gz: c33be8fdc0d2b17ea341cd532827493491d41c665ffb21f0505dab21adfeaf27
5
5
  SHA512:
6
- metadata.gz: 95a3b894f4d3cc1c03bce1509990de4185f5f7c503d694c440dd3c730bc45e49b9e01a65f60a94d5976e5cef4da77c802fdd6bc7133c3028618d8f1dc3485376
7
- data.tar.gz: 5aaa407679487a1e807722e79d02f523ac0b75fa73b595e8fb2a2ece08157b1d3d6bbcca678256b40bc7327662886b48a419d7e2b377d750043a1d7a3e1bccda
6
+ metadata.gz: dd3359cbf10d141396f05ab17489eb44d80ff1bd6830dac029e8469a5d0a7d503d332a4892191f1240cf42813657ad10f90afed54ca19106e679710915196f9f
7
+ data.tar.gz: 51769bedd049eac1a94a9e94cd4c0114303e847861f7cfb38044269d3aa1f05a538c62cdb3e0289a72f1835247d64236849e36bb33586bf963cc3d4d6f312ec5
@@ -141,12 +141,20 @@
141
141
  - placeholder site, mostly in case there's ever an app: https://zine.dev
142
142
 
143
143
  # 0.14.0 - May 27, 2019
144
+
144
145
  - added an AWS S3 uploader
145
146
  - added AWS CloudFront invalidation
146
147
  - added zine.dev to the footer template
147
148
  - bug fix - catch carriage returns as default yes answers to the upload? question
148
149
 
150
+ # 0.15.0 - May 26, 2020
151
+
152
+ - dependency version bumps, year bump in template
153
+ - replaced zine.dev with https://mikekreuzer.com/projects/zine/
154
+ - other minor refactoring & doc rewrites
155
+
149
156
  TO DO
157
+
150
158
  - add canonical links to page headers, means the build order needs to change...
151
159
  - generate sitemap.xml
152
160
  - fix the SFTP error from 0.7/0.8, also likely applies to S3
@@ -154,8 +162,10 @@ TO DO
154
162
  - tests, lots of tests
155
163
 
156
164
  MAY DO
165
+
157
166
  - concurrent-ruby gem
158
167
  - migration scripts from eg Jekyll?
159
168
  - Apple News
160
169
  - much refactoring, frozen_string_literal, split monster classes, etc
170
+ - replace thor with optparse
161
171
  - an app... maybe
data/README.md CHANGED
@@ -2,38 +2,34 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/zine.svg)](https://badge.fury.io/rb/zine)
4
4
 
5
- Yet another blog aware static site generator.
6
-
7
- ## Why yet another static blog engine?
8
-
9
- Despite the [proliferation in these things][engine_list] (!) I still find it more comfortable to use my own tools, changing them to suit my changing needs, for example here as I've moved between GitHub, EC2 & S3 hosts.
5
+ Zine is an open source, command line, blog-aware, static website generator.
10
6
 
11
7
  Distinguishing features include:
12
8
 
13
9
  - ERB templates
14
10
  - Sass stylesheets
15
11
  - fast incremental builds
16
- - a choice of AWS S3, GitHub & SFTP file uploads
12
+ - a choice of AWS S3, GitHub & SFTP file uploaders
17
13
 
18
- Presented here in the hope it's of use to someone else too.
14
+ ## How do I get it?
19
15
 
20
- ## Installation
16
+ Zine is a Ruby Gem, so if you have Ruby on your machine (it comes installed standard on a Mac), open Terminal & type
21
17
 
22
- Install the gem.
18
+ ````bash
19
+ gem install zine
20
+ ````
23
21
 
24
- ```shell
25
- $ gem install zine
26
- ```
22
+ And you're away.
27
23
 
28
- To generate a new site scaffold, cd to a new folder and:
24
+ To generate a new scaffold site, cd to a new directory and:
29
25
 
30
26
  ```shell
31
27
  $ zine site
32
28
  ```
33
29
 
34
- Then update your site's name, your name & so on in zine.yaml. Pay particular care to the Upload section, if you want to use Zine as an SFTP uploader to deploy files that've changed, you'll need to edit this section to include your remote server's details, as well as the path to a YAML file with your username & password (nil for that if you're using SSH without a password).
30
+ Then update your site's name, your name & so on in zine.yaml. Pay particular care to the Upload section, if you want to use Zine to deploy files you've changed, you'll need to edit this section to include your remote server's details, including the path to a YAML file with your credentials.
35
31
 
36
- ## Day to day usage
32
+ ## Day to day use
37
33
 
38
34
  To set up a new blog post:
39
35
 
@@ -41,15 +37,25 @@ To set up a new blog post:
41
37
  $ zine post 'Your chosen title'
42
38
  ```
43
39
 
44
- Your new post will have some fields set up in the YAML front matter, feel free to edit them too. Markdown files you create outside of the posts folder will be rendered into HTML in the same relative position in the build folder.
40
+ Your new post will have some fields set up in the YAML front matter, feel free to edit them too.
41
+
42
+ You can also create other Markdown files outside of the posts folder, those will be rendered into HTML in the same relative position in the build folder. That's how the project, about etc pages on my site are made for example.
45
43
 
46
- Once you're done writing, build your new site:
44
+ Type zine build before you start writing to serve up a local copy of your site that you can refresh to see what the build version will look like.
47
45
 
48
46
  ```shell
49
- $ zine build # or zine force
47
+ $ zine build
50
48
  ```
51
49
 
52
- Build only writes files for things that have changed while it's running, so the first time you build your site you should use force -- force writes all of the files (& so also uploads them all too if you've set up uploads).
50
+ or
51
+
52
+ ```shell
53
+ $ zine force
54
+ ```
55
+
56
+ Build will only watch for the things that change while it's running, so the first time you build your site you should use force -- force writes all of the files (& so also uploads them all too if you've set up uploads).
57
+
58
+ Control-C in Terminal when you're done.
53
59
 
54
60
  ## Design & development
55
61
 
@@ -73,11 +79,11 @@ Commands:
73
79
  zine version # Show the version number
74
80
  ```
75
81
 
76
- ### Up next
77
-
78
- Many versions on this is only an early cut of this gem, the stuff I considered a (barely) minimum viable product. More to come...
82
+ ## Links
79
83
 
80
- A brief TODO list at the end of the change log.
84
+ - [Github][github] - show me the code
85
+ - [Ruby gems][rubygems] - show me the Ruby details (pick up some gems while you're there)
86
+ - [Project site][mk] - Zine's home on the web
81
87
 
82
88
  ## Contributing
83
89
 
@@ -93,4 +99,6 @@ rake
93
99
 
94
100
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
95
101
 
96
- [engine_list]: https://staticsitegenerators.net
102
+ [github]: https://github.com/mikekreuzer/zine
103
+ [mk]: https://mikekreuzer/projects/zine/
104
+ [rubygems]: https://rubygems.org/gems/zine
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'erb'
2
4
  require 'rainbow'
3
5
  require 'zine/page'
@@ -102,10 +104,11 @@ module Zine
102
104
  # preview posts_and_guard -- no preview needed...
103
105
  return if @options['upload']['method'] == 'none' ||
104
106
  (guard.delete_array.empty? && guard.upload_array.empty?)
105
- uploader = Zine::Upload.new @options['directories']['build'],
107
+
108
+ uploader = Zine::Upload.new(@options['directories']['build'],
106
109
  @options['upload'],
107
110
  guard.delete_array,
108
- guard.upload_array
111
+ guard.upload_array)
109
112
  uploader.upload_decision MockYes
110
113
  end
111
114
 
@@ -158,18 +161,18 @@ module Zine
158
161
  end
159
162
 
160
163
  def init_options
161
- @options ||= begin
162
- YAML.safe_load File.open('zine.yaml')
163
- rescue ArgumentError => err
164
- puts Rainbow("Could not parse YAML options: #{err.message}").red
165
- end
164
+ @options ||= YAML.safe_load File.open('zine.yaml')
165
+ rescue ArgumentError => e
166
+ puts Rainbow("Could not parse YAML options: #{e.message}").red
166
167
  end
167
168
 
168
169
  def init_templates
170
+ Encoding.default_external = 'UTF-8'
169
171
  tem_array = Dir[File.join(@options['directories']['templates'], '*.erb')]
170
172
  tem_array.each do |tem|
171
173
  @templates_by_name.merge!(File.basename(tem, '.*') =>
172
- ERB.new(File.read(tem), 0, '-'))
174
+ ERB.new(File.read(tem),
175
+ trim_mode: '-'))
173
176
  end
174
177
  end
175
178
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'thor'
2
4
  require 'rainbow'
3
5
  require 'time'
@@ -16,6 +18,10 @@ module Zine
16
18
  def init_site
17
19
  @the_site ||= Zine::Site.new
18
20
  end
21
+
22
+ def options
23
+ @the_site.options
24
+ end
19
25
  end
20
26
 
21
27
  desc 'build', 'Build the site'
@@ -47,7 +53,7 @@ module Zine
47
53
  desc 'nuke', 'Delete the build folder'
48
54
  def nuke
49
55
  init_site
50
- FileUtils.remove_dir @the_site.options['directories']['build'],
56
+ FileUtils.remove_dir options['directories']['build'],
51
57
  force: true
52
58
  puts Rainbow('Site nuked. It\'s the only way to be sure.').green
53
59
  end
@@ -55,7 +61,6 @@ module Zine
55
61
  desc 'post TITLE', 'Create the file for a new blog post, titled TITLE'
56
62
  def post(name)
57
63
  init_site
58
- options = @the_site.options
59
64
  option_dir = options['directories']
60
65
  Zine::CLI.source_root option_dir['templates']
61
66
  @date = DateTime.now
@@ -77,7 +82,7 @@ module Zine
77
82
  desc 'style', 'Build the site\'s stylesheet'
78
83
  def style
79
84
  init_site
80
- style = Zine::Style.new(@the_site.options['directories'])
85
+ style = Zine::Style.new(options['directories'])
81
86
  style.process(File)
82
87
  puts Rainbow('Stylesheet rendered').green
83
88
  end
@@ -17,8 +17,8 @@
17
17
  <div class="column">
18
18
  <h3>The fine print</h3>
19
19
  <ul>
20
- <li>Built with <a href="https://zine.dev">Zine</a></li>
21
- <li>&copy; 2019<span> <%= page[:site_author] %></span></li>
20
+ <li>Built with <a href="https://mikekreuzer.com/projects/zine/">Zine</a></li>
21
+ <li>&copy; 2020<span> <%= page[:site_author] %></span></li>
22
22
  </ul>
23
23
  </div>
24
24
  </footer>
@@ -1,4 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Zine
2
4
  # The version
3
- VERSION = '0.14.0'.freeze
5
+ VERSION = '0.15.0'
4
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Kreuzer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-26 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,110 +16,116 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '2.1'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 2.0.1
22
+ version: 2.1.4
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: '2.0'
29
+ version: '2.1'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 2.0.1
32
+ version: 2.1.4
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: curb
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 0.9.6
39
+ version: 0.9.10
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 0.9.6
46
+ version: 0.9.10
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '12.3'
53
+ version: '13.0'
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: 12.3.2
56
+ version: 13.0.1
57
57
  type: :development
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '12.3'
63
+ version: '13.0'
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: 12.3.2
66
+ version: 13.0.1
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: rspec
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: '3.8'
73
+ version: '3.9'
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: '3.8'
80
+ version: '3.9'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: simplecov
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - "~>"
86
86
  - !ruby/object:Gem::Version
87
- version: 0.16.1
87
+ version: 0.18.5
88
88
  type: :development
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - "~>"
93
93
  - !ruby/object:Gem::Version
94
- version: 0.16.1
94
+ version: 0.18.5
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: aws-sdk-cloudfront
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
99
  - - "~>"
100
100
  - !ruby/object:Gem::Version
101
- version: '1.18'
101
+ version: '1.27'
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: 1.27.1
102
105
  type: :runtime
103
106
  prerelease: false
104
107
  version_requirements: !ruby/object:Gem::Requirement
105
108
  requirements:
106
109
  - - "~>"
107
110
  - !ruby/object:Gem::Version
108
- version: '1.18'
111
+ version: '1.27'
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: 1.27.1
109
115
  - !ruby/object:Gem::Dependency
110
116
  name: aws-sdk-s3
111
117
  requirement: !ruby/object:Gem::Requirement
112
118
  requirements:
113
119
  - - "~>"
114
120
  - !ruby/object:Gem::Version
115
- version: '1.40'
121
+ version: '1.66'
116
122
  type: :runtime
117
123
  prerelease: false
118
124
  version_requirements: !ruby/object:Gem::Requirement
119
125
  requirements:
120
126
  - - "~>"
121
127
  - !ruby/object:Gem::Version
122
- version: '1.40'
128
+ version: '1.66'
123
129
  - !ruby/object:Gem::Dependency
124
130
  name: htmlcompressor
125
131
  requirement: !ruby/object:Gem::Requirement
@@ -140,54 +146,54 @@ dependencies:
140
146
  requirements:
141
147
  - - "~>"
142
148
  - !ruby/object:Gem::Version
143
- version: '2.1'
149
+ version: '2.2'
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 2.2.1
144
153
  type: :runtime
145
154
  prerelease: false
146
155
  version_requirements: !ruby/object:Gem::Requirement
147
156
  requirements:
148
157
  - - "~>"
149
158
  - !ruby/object:Gem::Version
150
- version: '2.1'
159
+ version: '2.2'
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: 2.2.1
151
163
  - !ruby/object:Gem::Dependency
152
164
  name: kramdown-parser-gfm
153
165
  requirement: !ruby/object:Gem::Requirement
154
166
  requirements:
155
167
  - - "~>"
156
168
  - !ruby/object:Gem::Version
157
- version: '1.0'
158
- - - ">="
159
- - !ruby/object:Gem::Version
160
- version: 1.0.1
169
+ version: '1.1'
161
170
  type: :runtime
162
171
  prerelease: false
163
172
  version_requirements: !ruby/object:Gem::Requirement
164
173
  requirements:
165
174
  - - "~>"
166
175
  - !ruby/object:Gem::Version
167
- version: '1.0'
168
- - - ">="
169
- - !ruby/object:Gem::Version
170
- version: 1.0.1
176
+ version: '1.1'
171
177
  - !ruby/object:Gem::Dependency
172
178
  name: listen
173
179
  requirement: !ruby/object:Gem::Requirement
174
180
  requirements:
175
181
  - - "~>"
176
182
  - !ruby/object:Gem::Version
177
- version: '3.0'
183
+ version: '3.2'
178
184
  - - ">="
179
185
  - !ruby/object:Gem::Version
180
- version: 3.1.5
186
+ version: 3.2.1
181
187
  type: :runtime
182
188
  prerelease: false
183
189
  version_requirements: !ruby/object:Gem::Requirement
184
190
  requirements:
185
191
  - - "~>"
186
192
  - !ruby/object:Gem::Version
187
- version: '3.0'
193
+ version: '3.2'
188
194
  - - ">="
189
195
  - !ruby/object:Gem::Version
190
- version: 3.1.5
196
+ version: 3.2.1
191
197
  - !ruby/object:Gem::Dependency
192
198
  name: net-sftp
193
199
  requirement: !ruby/object:Gem::Requirement
@@ -214,14 +220,14 @@ dependencies:
214
220
  requirements:
215
221
  - - "~>"
216
222
  - !ruby/object:Gem::Version
217
- version: '4.0'
223
+ version: '4.18'
218
224
  type: :runtime
219
225
  prerelease: false
220
226
  version_requirements: !ruby/object:Gem::Requirement
221
227
  requirements:
222
228
  - - "~>"
223
229
  - !ruby/object:Gem::Version
224
- version: '4.0'
230
+ version: '4.18'
225
231
  - !ruby/object:Gem::Dependency
226
232
  name: rainbow
227
233
  requirement: !ruby/object:Gem::Requirement
@@ -242,14 +248,14 @@ dependencies:
242
248
  requirements:
243
249
  - - "~>"
244
250
  - !ruby/object:Gem::Version
245
- version: '2.0'
251
+ version: '2.3'
246
252
  type: :runtime
247
253
  prerelease: false
248
254
  version_requirements: !ruby/object:Gem::Requirement
249
255
  requirements:
250
256
  - - "~>"
251
257
  - !ruby/object:Gem::Version
252
- version: '2.0'
258
+ version: '2.3'
253
259
  - !ruby/object:Gem::Dependency
254
260
  name: thin
255
261
  requirement: !ruby/object:Gem::Requirement
@@ -270,20 +276,20 @@ dependencies:
270
276
  requirements:
271
277
  - - "~>"
272
278
  - !ruby/object:Gem::Version
273
- version: '0.19'
279
+ version: '1.0'
274
280
  - - ">="
275
281
  - !ruby/object:Gem::Version
276
- version: 0.19.4
282
+ version: 1.0.1
277
283
  type: :runtime
278
284
  prerelease: false
279
285
  version_requirements: !ruby/object:Gem::Requirement
280
286
  requirements:
281
287
  - - "~>"
282
288
  - !ruby/object:Gem::Version
283
- version: '0.19'
289
+ version: '1.0'
284
290
  - - ">="
285
291
  - !ruby/object:Gem::Version
286
- version: 0.19.4
292
+ version: 1.0.1
287
293
  description: |-
288
294
  Yet another blog aware static site generator.
289
295
  There are many like it, but this one is mine.
@@ -337,7 +343,7 @@ files:
337
343
  - lib/zine/uploader_sftp.rb
338
344
  - lib/zine/version.rb
339
345
  - lib/zine/watcher.rb
340
- homepage: https://zine.dev
346
+ homepage: https://mikekreuzer.com/projects/zine/
341
347
  licenses:
342
348
  - MIT
343
349
  metadata: {}
@@ -356,7 +362,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
356
362
  - !ruby/object:Gem::Version
357
363
  version: '0'
358
364
  requirements: []
359
- rubygems_version: 3.0.3
365
+ rubygems_version: 3.0.6
360
366
  signing_key:
361
367
  specification_version: 4
362
368
  summary: Yet another blog aware static site generator.