zine 0.18.0 → 0.20.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: da31586867e20b6d0dd4cbfdb80875f43eecbfa9af35e6eb221b9126a41b80ed
4
- data.tar.gz: d23b0c6a22460d711205610ce9da116e5ea3b85aa29de6fc1108f9f879551f84
3
+ metadata.gz: c72d8eba392c259b5c9a7914da03137f9d85ad1a4aed6cd694401681ac5966b3
4
+ data.tar.gz: 0ac041d6c35d5608a81c2da8cb802d2aa3e324e5f16873a6069c4ef9e2060bde
5
5
  SHA512:
6
- metadata.gz: f0f640a7d8d1bf07e43fdb63847ea29b34745dca384f16e935ac781da42e54f8f6c1c79537d8d688ee2185bc3af0fa5b2f123a00542906e02b632f930a8dfa12
7
- data.tar.gz: 1b5dd24e897ba0b7eae9f58cd9426551f76ec75a3032d3002d26526a99c066a1c0cb73a07a704e2b89a2c0747144ff7279e20f7a0e7848bc81e90f8881fbbb34
6
+ metadata.gz: '004903591348d94c69026caec60e849cf071f180a63aaeb2c2481e7dbab731d3a4f0b32c1d9cb011ed3d9848dd6d15c41022aefebbc2e72a977c8d6989278d0e'
7
+ data.tar.gz: 9e720d20097b3219035d828c78f7bf2739c8938875401822550ebfe4e8350302ffe09d4056ce12355c83fb13c076b9ccaf45fc1fd8c037be91aa271009f4fd60
data/CHANGELOG.md CHANGED
@@ -1,10 +1,23 @@
1
1
  # Zine Changelog
2
2
 
3
- # 0.18.0 - 17 February, 2023
3
+ ## 0.20.0 - 5 December, 2023
4
+
5
+ - added Open Graph & canonical link tags - source/templates/header_partial.erb will need to be updated on your site
6
+ - added an extra 'git push' in the Rakefile, to push code changes as well as the tag
7
+ - expanded the meta data in the gemspec file
8
+
9
+ ## 0.19.0 - 22 November, 2023
10
+
11
+ - moved the repo from GitHub to Codeberg, changed the links in the README, gemspec, and skeleton files
12
+ - dropped the link to the now defunct Ripley project
13
+ - added Reek, dropped Solargraph, updated dependencies
14
+ - updated the Rakefile, replacing bundler/gem_tasks with direct gem and git calls
15
+
16
+ ## 0.18.0 - 17 February, 2023
4
17
 
5
18
  - replaced https://mikekreuzer.com/projects/zine/ with GitHub address
6
19
 
7
- # 0.17.0 - 17 February, 2023
20
+ ## 0.17.0 - 17 February, 2023
8
21
 
9
22
  - forced polling for the listener gem, which was skipping new files on linux otherwise
10
23
  - fixed an errant inverted comma in links, introduced in the last commit
@@ -15,7 +28,7 @@
15
28
  - year bump in the starter template
16
29
  - dropped the faraday-retry gem again after Octokit updated
17
30
 
18
- # towards 0.17.0 - 20 June, 2022 (on Github, but not RubyGems)
31
+ ## towards 0.17.0 - 20 June, 2022 (on Github, but not RubyGems)
19
32
 
20
33
  - customised the rake file
21
34
  - refactored - from 112 rubocop offenses, to 33
@@ -24,7 +37,7 @@
24
37
  - dependency updates
25
38
  - added the faraday-retry gem as a dependency, to suppress warnings (from Octokit)
26
39
 
27
- # 0.16.0 - 17 June, 2022
40
+ ## 0.16.0 - 17 June, 2022
28
41
 
29
42
  - temp warning about missing atom template in zine.yaml, better handling of missing templates
30
43
  - cli missing options bug fixed - from 0.15.0
@@ -34,25 +47,25 @@
34
47
  - reversed the sort order for this change log
35
48
  - changed the date format in the log - from US style, to everywhere else style
36
49
 
37
- # towards 0.16.0 - 3 February, 2022
50
+ ## towards 0.16.0 - 3 February, 2022
38
51
 
39
52
  - BREAKING CHANGE: added an RSS 2.0 feed in addition to the Atom feed, the rss.erb file and /rss.xml feed link will now be RSS, an Atom and RSS template are both required in the local site copy, and need to be listed in a site's zine.yml file
40
53
  - year bump in starter template
41
54
 
42
- # 0.15.0 - 26 May, 2020
55
+ ## 0.15.0 - 26 May, 2020
43
56
 
44
57
  - dependency version bumps, year bump in template
45
58
  - replaced zine.dev with https://mikekreuzer.com/projects/zine/
46
59
  - other minor refactoring & doc rewrites
47
60
 
48
- # 0.14.0 - 27 May, 2019
61
+ ## 0.14.0 - 27 May, 2019
49
62
 
50
63
  - added an AWS S3 uploader
51
64
  - added AWS CloudFront invalidation
52
65
  - added zine.dev to the footer template
53
66
  - bug fix - catch carriage returns as default yes answers to the upload? question
54
67
 
55
- # 0.13.0 - lucky 13 - 26 May, 2019
68
+ ## 0.13.0 - lucky 13 - 26 May, 2019
56
69
 
57
70
  - added some of the style changes that survived from v12, eg moved social media to the footer
58
71
  - added a (permissive as they come) robots.txt file
@@ -62,20 +75,20 @@
62
75
  - minor readme updates
63
76
  - placeholder site, mostly in case there's ever an app: https://zine.dev
64
77
 
65
- # 0.12.0 - never pushed, used up until 25 April, 2019
78
+ ## 0.12.0 - never pushed, used up until 25 April, 2019
66
79
 
67
80
  - added (then removed) Mastodon from the list of contacts, changed the styling a few times, neglected to publish
68
81
 
69
- # 0.11.0, 7 November, 2018
82
+ ## 0.11.0, 7 November, 2018
70
83
 
71
84
  - fixed a bug where String#split would break apart markdown files on tables as well as at the metadata/markdown boundary
72
85
 
73
- # 0.9.0, 1 January, 2018
86
+ ## 0.9.0, 1 January, 2018
74
87
 
75
88
  - a bug in 'zine notice' involving full & partial paths that duplicated the post to notice on the history page, fixed
76
89
  - minor code clean-up in cli.rb and server.rb
77
90
 
78
- # 0.10.0, 7 November, 2018
91
+ ## 0.10.0, 7 November, 2018
79
92
 
80
93
  - dependency version bumps
81
94
 
data/README.md CHANGED
@@ -81,13 +81,12 @@ Commands:
81
81
 
82
82
  ## Links
83
83
 
84
- - [Github][github] - show me the code
84
+ - [Code][codeberg] - show me the code
85
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
87
86
 
88
87
  ## Contributing
89
88
 
90
- Yes please. Bug reports and pull requests are welcome on GitHub at https://github.com/mikekreuzer/zine.
89
+ Yes please. Bug reports and pull requests are welcome on Codeberg at https://codeberg.org/kreuzer/zine.
91
90
 
92
91
  ## Tests
93
92
 
@@ -97,8 +96,8 @@ rake
97
96
 
98
97
  ## License
99
98
 
100
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
99
+ The gem is available as open source under the terms of the [AGPL3 License][license].
101
100
 
102
- [github]: https://github.com/mikekreuzer/zine
103
- [mk]: https://mikekreuzer/projects/zine/
101
+ [codeberg]: https://codeberg.org/kreuzer/zine
102
+ [license]: https://codeberg.org/kreuzer/zine/src/branch/main/LICENSE
104
103
  [rubygems]: https://rubygems.org/gems/zine
data/lib/zine/page.rb CHANGED
@@ -15,32 +15,33 @@ module Zine
15
15
  # A page on the site where the content comes from a file's markdown, and the
16
16
  # destination's location mirrors its own
17
17
  class Page
18
- attr_accessor :source_file # used in zine notice --
18
+ attr_accessor :formatted_data, :source_file # used in zine notice --
19
19
  # PostsAndHeadlines.one_new_post
20
- attr_reader :dest_path, :formatted_data, :template_bundle
20
+ attr_reader :dest_path, :template_bundle
21
21
 
22
22
  # the meta data, passed formatted to the template
23
23
  class FormattedData
24
24
  include ERB::Util
25
25
 
26
- attr_accessor :data, :footer_partial, :header_partial, :html, :uri
26
+ attr_accessor :config, :data, :footer_partial, :header_partial, :html, :uri
27
27
  attr_reader :page
28
28
 
29
29
  def initialize(front_matter, site_opt)
30
- site = site_opt['options']
30
+ @config = site_opt
31
+ options = @config['options']
31
32
  @page = { date_rfc3339: front_matter['date'],
32
33
  date_rfc822: parse_822_date(front_matter['date']),
33
34
  date_us: parse_date(front_matter['date']),
34
- github_name: site['github_name'],
35
- links_array: site_opt['links'],
36
- num_items_on_home: site['num_items_on_home'],
37
- site_author: site['site_author'],
38
- site_description: site['site_description'],
39
- site_name: site['site_name'],
40
- site_URL: site['site_URL'],
35
+ github_name: options['github_name'],
36
+ links_array: @config['links'],
37
+ num_items_on_home: options['num_items_on_home'],
38
+ site_author: options['site_author'],
39
+ site_description: options['site_description'],
40
+ site_name: options['site_name'],
41
+ site_URL: options['site_URL'],
41
42
  tags: slugify_tags(front_matter['tags']),
42
43
  title: html_escape(front_matter['title']),
43
- twitter_name: site['twitter_name'],
44
+ twitter_name: options['twitter_name'],
44
45
  uri: '' } # uri only generated for posts, and not until after markdown, TO DO
45
46
  end
46
47
 
@@ -125,12 +126,17 @@ module Zine
125
126
  { 'date' => DateTime.now.to_s, 'title' => md_file_name, 'tags' => [] }
126
127
  end
127
128
 
128
- def rel_path_from_build_dir(path)
129
- full = Pathname(path)
130
- full.relative_path_from(Pathname(@build_dir))
129
+ def rel_path_str_from_build_dir
130
+ dest_file = Pathname.new(@dest_path)
131
+ build_dir = Pathname.new(@formatted_data.config['directories']['build'])
132
+ dest_file.relative_path_from(build_dir).to_s
131
133
  end
132
134
 
133
135
  def template_the_html
136
+ # kludge to fix in rewrite, path wasn't created until after data originally
137
+ @formatted_data.page[:uri] = URI.join(@formatted_data.page[:site_URL],
138
+ rel_path_str_from_build_dir).to_s
139
+
134
140
  data_binding = @formatted_data.public_binding
135
141
  @formatted_data.header_partial = @header_partial.result data_binding
136
142
  @formatted_data.footer_partial = @footer_partial.result data_binding
data/lib/zine/post.rb CHANGED
@@ -43,11 +43,11 @@ module Zine
43
43
 
44
44
  def tag_and_uri_subprocess
45
45
  page_data = @formatted_data.page
46
- file_path = rel_path_from_build_dir(@dest_path).to_s
46
+ file_path_str = rel_path_str_from_build_dir
47
47
  # URI.join will expect a root directory to start...
48
- @formatted_data.uri = "#{page_data[:site_URL]}/#{file_path}"
48
+ @formatted_data.uri = "#{page_data[:site_URL]}/#{file_path_str}"
49
49
  TagData.new(page_data[:tags],
50
- file_path,
50
+ file_path_str,
51
51
  page_data[:title],
52
52
  page_data[:date_rfc3339],
53
53
  page_data[:date_us])
@@ -17,7 +17,7 @@
17
17
  <div class="column">
18
18
  <h3>The fine print</h3>
19
19
  <ul>
20
- <li>Built with <a href="https://mikekreuzer.com/projects/zine/">Zine</a></li>
20
+ <li>Built with <a href="https://codeberg.org/kreuzer/zine">Zine</a></li>
21
21
  <li>&copy; 2023<span> <%= page[:site_author] %></span></li>
22
22
  </ul>
23
23
  </div>
@@ -8,8 +8,11 @@
8
8
  <link rel="home alternate" href="<%= page[:site_URL] %>/atom.xml" type="application/atom+xml" title="<%= page[:site_name] %>">
9
9
  <link rel="home alternate" href="<%= page[:site_URL] %>/rss.xml" type="application/rss+xml" title="<%= page[:site_name] %>">
10
10
  <link rel="stylesheet" href="/screen.css">
11
- <link rel="apple-touch-icon" href="/apple-touch-icon.png">
12
- <!--<link rel="canonical" href="<%= page[:uri] %>" />-->
11
+ <link rel="apple-touch-icon" href="<%= page[:site_URL] %>/apple-touch-icon.png">
12
+ <meta property="og:title" content="<%= page[:site_name] %> - <%= page[:title] %>" />
13
+ <meta property="og:url" content="<%= page[:uri] %>" />
14
+ <meta property="og:image" content="<%= page[:site_URL] %>/apple-touch-icon.png" />
15
+ <link rel="canonical" href="<%= page[:uri] %>">
13
16
  </head>
14
17
  <body>
15
18
  <div id="skiptocontent">
@@ -9,11 +9,8 @@ directories:
9
9
  templates: templates
10
10
  links:
11
11
  -
12
- name: GitHub
13
- uri: https://github.com/mikekreuzer
14
- -
15
- name: Ripley
16
- uri: https://mikekreuzer.github.io/Ripley/
12
+ name: Codeberg
13
+ uri: https://codeberg.org/kreuzer
17
14
  options:
18
15
  github_name: mikekreuzer
19
16
  number_items_in_RSS: 7
data/lib/zine/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Zine
4
4
  # The version
5
- VERSION = '0.18.0'
5
+ VERSION = '0.20.0'
6
6
  end
metadata CHANGED
@@ -1,131 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.20.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: 2023-02-17 00:00:00.000000000 Z
11
+ date: 2023-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.3'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 2.3.16
23
- type: :development
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '2.3'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 2.3.16
33
- - !ruby/object:Gem::Dependency
34
- name: curb
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '1.0'
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: 1.0.5
43
- type: :development
44
- prerelease: false
45
- version_requirements: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: '1.0'
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: 1.0.5
53
- - !ruby/object:Gem::Dependency
54
- name: rake
55
- requirement: !ruby/object:Gem::Requirement
56
- requirements:
57
- - - "~>"
58
- - !ruby/object:Gem::Version
59
- version: '13.0'
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: 13.0.6
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: '13.0'
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- version: 13.0.6
73
- - !ruby/object:Gem::Dependency
74
- name: rspec
75
- requirement: !ruby/object:Gem::Requirement
76
- requirements:
77
- - - "~>"
78
- - !ruby/object:Gem::Version
79
- version: '3.11'
80
- type: :development
81
- prerelease: false
82
- version_requirements: !ruby/object:Gem::Requirement
83
- requirements:
84
- - - "~>"
85
- - !ruby/object:Gem::Version
86
- version: '3.11'
87
- - !ruby/object:Gem::Dependency
88
- name: simplecov
89
- requirement: !ruby/object:Gem::Requirement
90
- requirements:
91
- - - "~>"
92
- - !ruby/object:Gem::Version
93
- version: '0.22'
94
- type: :development
95
- prerelease: false
96
- version_requirements: !ruby/object:Gem::Requirement
97
- requirements:
98
- - - "~>"
99
- - !ruby/object:Gem::Version
100
- version: '0.22'
101
13
  - !ruby/object:Gem::Dependency
102
14
  name: aws-sdk-cloudfront
103
15
  requirement: !ruby/object:Gem::Requirement
104
16
  requirements:
105
17
  - - "~>"
106
18
  - !ruby/object:Gem::Version
107
- version: '1.65'
19
+ version: '1.84'
108
20
  type: :runtime
109
21
  prerelease: false
110
22
  version_requirements: !ruby/object:Gem::Requirement
111
23
  requirements:
112
24
  - - "~>"
113
25
  - !ruby/object:Gem::Version
114
- version: '1.65'
26
+ version: '1.84'
115
27
  - !ruby/object:Gem::Dependency
116
28
  name: aws-sdk-s3
117
29
  requirement: !ruby/object:Gem::Requirement
118
30
  requirements:
119
31
  - - "~>"
120
32
  - !ruby/object:Gem::Version
121
- version: '1.114'
33
+ version: '1.138'
122
34
  type: :runtime
123
35
  prerelease: false
124
36
  version_requirements: !ruby/object:Gem::Requirement
125
37
  requirements:
126
38
  - - "~>"
127
39
  - !ruby/object:Gem::Version
128
- version: '1.114'
40
+ version: '1.138'
129
41
  - !ruby/object:Gem::Dependency
130
42
  name: htmlcompressor
131
43
  requirement: !ruby/object:Gem::Requirement
@@ -174,20 +86,14 @@ dependencies:
174
86
  requirements:
175
87
  - - "~>"
176
88
  - !ruby/object:Gem::Version
177
- version: '3.7'
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: 3.7.1
89
+ version: '3.8'
181
90
  type: :runtime
182
91
  prerelease: false
183
92
  version_requirements: !ruby/object:Gem::Requirement
184
93
  requirements:
185
94
  - - "~>"
186
95
  - !ruby/object:Gem::Version
187
- version: '3.7'
188
- - - ">="
189
- - !ruby/object:Gem::Version
190
- version: 3.7.1
96
+ version: '3.8'
191
97
  - !ruby/object:Gem::Dependency
192
98
  name: net-sftp
193
99
  requirement: !ruby/object:Gem::Requirement
@@ -208,14 +114,14 @@ dependencies:
208
114
  requirements:
209
115
  - - "~>"
210
116
  - !ruby/object:Gem::Version
211
- version: '6.0'
117
+ version: '8.0'
212
118
  type: :runtime
213
119
  prerelease: false
214
120
  version_requirements: !ruby/object:Gem::Requirement
215
121
  requirements:
216
122
  - - "~>"
217
123
  - !ruby/object:Gem::Version
218
- version: '6.0'
124
+ version: '8.0'
219
125
  - !ruby/object:Gem::Dependency
220
126
  name: rainbow
221
127
  requirement: !ruby/object:Gem::Requirement
@@ -259,7 +165,7 @@ dependencies:
259
165
  version: '1.8'
260
166
  - - ">="
261
167
  - !ruby/object:Gem::Version
262
- version: 1.8.1
168
+ version: 1.8.2
263
169
  type: :runtime
264
170
  prerelease: false
265
171
  version_requirements: !ruby/object:Gem::Requirement
@@ -269,27 +175,21 @@ dependencies:
269
175
  version: '1.8'
270
176
  - - ">="
271
177
  - !ruby/object:Gem::Version
272
- version: 1.8.1
178
+ version: 1.8.2
273
179
  - !ruby/object:Gem::Dependency
274
180
  name: thor
275
181
  requirement: !ruby/object:Gem::Requirement
276
182
  requirements:
277
183
  - - "~>"
278
184
  - !ruby/object:Gem::Version
279
- version: '1.2'
280
- - - ">="
281
- - !ruby/object:Gem::Version
282
- version: 1.2.1
185
+ version: '1.3'
283
186
  type: :runtime
284
187
  prerelease: false
285
188
  version_requirements: !ruby/object:Gem::Requirement
286
189
  requirements:
287
190
  - - "~>"
288
191
  - !ruby/object:Gem::Version
289
- version: '1.2'
290
- - - ">="
291
- - !ruby/object:Gem::Version
292
- version: 1.2.1
192
+ version: '1.3'
293
193
  description: |-
294
194
  Yet another blog aware static site generator.
295
195
  There are many like it, but this one is mine.
@@ -344,11 +244,14 @@ files:
344
244
  - lib/zine/uploader_sftp.rb
345
245
  - lib/zine/version.rb
346
246
  - lib/zine/watcher.rb
347
- homepage: https://github.com/mikekreuzer/zine
247
+ homepage: https://codeberg.org/kreuzer/zine
348
248
  licenses:
349
249
  - AGPL-3.0-or-later
350
250
  metadata:
251
+ changelog_uri: https://codeberg.org/kreuzer/zine/src/branch/main/CHANGELOG.md
252
+ homepage_uri: https://codeberg.org/kreuzer/zine
351
253
  rubygems_mfa_required: 'true'
254
+ source_code_uri: https://codeberg.org/kreuzer/zine
352
255
  post_install_message:
353
256
  rdoc_options: []
354
257
  require_paths:
@@ -364,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
364
267
  - !ruby/object:Gem::Version
365
268
  version: '0'
366
269
  requirements: []
367
- rubygems_version: 3.3.7
270
+ rubygems_version: 3.4.10
368
271
  signing_key:
369
272
  specification_version: 4
370
273
  summary: Yet another blog aware static site generator.