ragerender 0.1.7 → 0.1.9

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.
@@ -64,9 +64,6 @@ Jekyll::Hooks.register :site, :after_init do |site|
64
64
  site.config['url'] ||= "https://#{File.basename(site.source)}.thecomicseries.com"
65
65
  site.config = site.config
66
66
 
67
- setup_collection site, :comics, '/:collection/:slug/', layout: 'comic-page', chapter: '0'
68
- setup_collection site, :posts, '/blogarchive/:slug/', layout: 'blog-display'
69
-
70
67
  site.config['defaults'].push({
71
68
  'scope' => {
72
69
  'path' => '',
@@ -134,8 +131,8 @@ class RageRender::WebcomicDrop < Jekyll::Drops::Drop
134
131
  extend Forwardable
135
132
  extend RageRender::Pipettes
136
133
 
137
- def self.def_config_delegator source, target
138
- define_method(target) { @obj.site.config[source.to_s] }
134
+ def self.def_config_delegator source, target, default=nil
135
+ define_method(target) { @obj.site.config.fetch(source.to_s, default) }
139
136
  end
140
137
 
141
138
  def_config_delegator :search, :searchon
@@ -143,14 +140,38 @@ class RageRender::WebcomicDrop < Jekyll::Drops::Drop
143
140
  def_config_delegator var, var
144
141
  end
145
142
 
143
+ def webcomicid
144
+ @obj.site.config['id'] || @obj.site.hash
145
+ end
146
+
146
147
  def webcomicname
147
148
  escape @obj.site.config['title']
148
149
  end
149
150
 
150
151
  def webcomicslogan
152
+ escape @obj.site.config['slogan']
153
+ end
154
+
155
+ def webcomicdescription
151
156
  escape @obj.site.config['description']
152
157
  end
153
158
 
159
+ def webcomicactivitystatus
160
+ escape @obj.site.config['status']&.capitalize
161
+ end
162
+
163
+ def webcomicsub
164
+ URI.parse(@obj.site.config['url']).host.split.first
165
+ end
166
+
167
+ def comicprofile
168
+ "https://comicfury.com/comicprofile.php?url=#{webcomicsub}"
169
+ end
170
+
171
+ def addsubscriptionlink
172
+ "https://comicfury.com/comic.php?action=addsubscription&url=#{webcomicsub}"
173
+ end
174
+
154
175
  def_loop :webcomicgenres, :genre_link, :genre_name
155
176
  def webcomicgenres
156
177
  (@obj.site.config['genres'] || []).map do |g|
@@ -166,7 +187,15 @@ class RageRender::WebcomicDrop < Jekyll::Drops::Drop
166
187
  end
167
188
 
168
189
  def webcomicurl
169
- @obj.site.baseurl
190
+ @obj.site.config['url']
191
+ end
192
+
193
+ def webcomicrating
194
+ @obj.site.config['rating']
195
+ end
196
+
197
+ def lastupdate
198
+ comicfury_date Time.now
170
199
  end
171
200
 
172
201
  def lastupdatedmy
@@ -194,14 +223,34 @@ class RageRender::WebcomicDrop < Jekyll::Drops::Drop
194
223
  @obj.site.posts.docs.any?
195
224
  end
196
225
 
226
+ def hascomics
227
+ comicsnum > 0
228
+ end
229
+
230
+ def comicsnum
231
+ @obj.site.collections['comics'].docs.size
232
+ end
233
+
234
+ def usechapters
235
+ @obj.site.collections['comics'].docs.any? {|comic| comic.data.include? 'chapter' }
236
+ end
237
+
238
+ %w{subscriptions pageviewsnum visitsnum}.each do |var|
239
+ def_config_delegator var, var, 0
240
+ end
241
+
197
242
  def hidefromhost
198
243
  false
199
244
  end
200
245
 
201
- def_loop :extrapages, :link, :title
246
+ def_loop :extrapages, :link, :title, :foldername
202
247
  def extrapages
203
248
  @obj.site.pages.reject {|page| page.data['hidden'] }.map do |page|
204
- {'link' => page.url, 'title' => escape(page.data['title'])}
249
+ {
250
+ 'link' => page.url,
251
+ 'title' => escape(page.data['title']),
252
+ 'foldername' => File.basename(URI::parse(page.url).path, '.*'),
253
+ }
205
254
  end
206
255
  end
207
256
 
@@ -232,14 +281,58 @@ class RageRender::WebcomicDrop < Jekyll::Drops::Drop
232
281
  escape @obj.data['title']
233
282
  end
234
283
 
284
+ def isarchive
285
+ @obj.data['layout'] == 'archive'
286
+ end
287
+
288
+ def issearch
289
+ @obj.data['layout'] == 'search'
290
+ end
291
+
235
292
  def iscomicpage
236
- @obj.type == :comics
293
+ @obj.data['layout'] == 'comic-page'
294
+ end
295
+
296
+ def isblog
297
+ @obj.data['layout'] == 'blog-archive'
298
+ end
299
+
300
+ def isoverview
301
+ @obj.data['layout'] == 'overview'
302
+ end
303
+
304
+ def iserrorpage
305
+ @obj.data['layout'] == 'error-page'
306
+ end
307
+
308
+ def isfrontpage
309
+ @obj.data['slug'] == 'frontpage'
310
+ end
311
+
312
+ def iscomicrelatedpage
313
+ @obj.type == :comics || @obj.data['layout'] == 'overview'
237
314
  end
238
315
 
239
316
  def isextrapage
240
317
  @obj.type == :pages && @obj.data['hidden'] != true
241
318
  end
242
319
 
320
+ def currentdate
321
+ comicfury_date Date.today
322
+ end
323
+
324
+ def day
325
+ Date.today.day
326
+ end
327
+
328
+ def month
329
+ Date.today.month
330
+ end
331
+
332
+ def year
333
+ Date.today.year
334
+ end
335
+
243
336
  def fallback_data
244
337
  {}
245
338
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ragerender
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Worthington
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-02-26 00:00:00.000000000 Z
11
+ date: 2026-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rsec
@@ -184,6 +184,7 @@ description: |-
184
184
  description: >
185
185
  My epic story about how him and her
186
186
  fell into a romantic polycule with they and them
187
+ status: active
187
188
  genres:
188
189
  - Comedy
189
190
  - Romance
@@ -246,6 +247,8 @@ description: |-
246
247
  date: "2025-03-05 16:20"
247
248
  image: "images/ghost.png"
248
249
  author: "Jane doe"
250
+ description: "Some spooky mouseover text"
251
+ keywords: [excellent, comic page, spooky]
249
252
  custom:
250
253
  # use yes and no for tickbox settings
251
254
  spooky: yes
@@ -256,6 +259,9 @@ description: |-
256
259
  Testing webcomics
257
260
  Now easier than ever
258
261
  Thanks to RageRender
262
+ transcript: >
263
+ The transcript contains a machine-readable version
264
+ of all the text in your comic image.
259
265
  comments:
260
266
  - author: "Skippy"
261
267
  date: "13 Mar 2025, 3.45 PM"
@@ -295,6 +301,44 @@ description: |-
295
301
  - anything else will display the extra page that has the matching
296
302
  <tt>slug</tt> in its Front Matter
297
303
 
304
+ === Comics with custom HTML code
305
+
306
+ You can use custom HTML code in place of an image for your comic page. Instead
307
+ of creating an image, just create an HTML file in your <tt>images</tt> folder:
308
+
309
+ cat '<video src="/files/my-animation.webm"></video>" > images/1.html
310
+
311
+ === Multi-image comics
312
+
313
+ You can add up to 12 images to each comic page on ComicFury. To do that in
314
+ RageRender, add each image to an <tt>images</tt> key in your comic page:
315
+
316
+ ---
317
+ title: "Comic with many pages"
318
+ date: "2026-04-20 16:20"
319
+ images:
320
+ - /images/first.png
321
+ - /images/second.png
322
+ - /images/third.png
323
+ ---
324
+
325
+ === Testing search pages
326
+
327
+ Live search does not work in RageRender, as your site is statically built and
328
+ can't respond to new data from the browser. However, you can simulate a search
329
+ when you build the site to help test search results designs. To do that, add a
330
+ `searchterm` to the search page using defaults in your `_config.yml`:
331
+
332
+ defaults:
333
+ - scope:
334
+ path: ''
335
+ layout: search
336
+ values:
337
+ searchterm: "my character"
338
+
339
+ The search that gets performed will be somewhat similar to how ComicFury will
340
+ search your comic, but may not be exactly the same.
341
+
298
342
  === Putting changes on ComicFury
299
343
 
300
344
  Once you're done making changes, you can <tt>pack</tt> your layout:
@@ -356,6 +400,20 @@ files:
356
400
  - assets/comic-not-found.html
357
401
  - assets/overview.html
358
402
  - assets/search.html
403
+ - inspector/.gitignore
404
+ - inspector/Rakefile
405
+ - inspector/_includes/field_row.html
406
+ - inspector/_includes/field_rows.html
407
+ - inspector/_includes/field_table.html
408
+ - inspector/_templates/archive.html
409
+ - inspector/_templates/blog-archive.html
410
+ - inspector/_templates/blog-display.html
411
+ - inspector/_templates/comic-page.html
412
+ - inspector/_templates/error-page.html
413
+ - inspector/_templates/overall.html
414
+ - inspector/_templates/overview.html
415
+ - inspector/_templates/search.html
416
+ - inspector/layout.css
359
417
  - lib/ragerender.rb
360
418
  - lib/ragerender/cflxml.rb
361
419
  - lib/ragerender/date_formats.rb
@@ -367,6 +425,7 @@ files:
367
425
  - lib/ragerender/jekyll/chapter.rb
368
426
  - lib/ragerender/jekyll/comics.rb
369
427
  - lib/ragerender/jekyll/error.rb
428
+ - lib/ragerender/jekyll/image.rb
370
429
  - lib/ragerender/jekyll/overview.rb
371
430
  - lib/ragerender/jekyll/pagination.rb
372
431
  - lib/ragerender/jekyll/pipettes.rb