jekyll-octopod 0.18.1 → 0.20.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9da6ebdac9915e6402bcda7c71a9c944ece4c004bd031220c733f49c3dfb47ec
4
- data.tar.gz: b7052cf7e51011da39291849d35b14bedfa27caca156dd09a97c7957dee1ad3c
3
+ metadata.gz: af7f39feb92cfb4b4615bc3d7c4122cb463814e37bf8991c3c553784cfa06268
4
+ data.tar.gz: b0d6ebb6e48e8c476526dfb21934efc0ac773e528c48ce23464ee1afeade4e25
5
5
  SHA512:
6
- metadata.gz: 2a054d404659a2434861da157840782ba71175259f8d5bd864da5f2369e599ad3fe69ae8aae7b6b547fa80d91d24de0682d9bf925b0329e19b3abdd849c5af78
7
- data.tar.gz: 031da38de9086d544004abf870553125926d839186c6873cda4a00cab5e83161bdb973f95c3adcb1bc0798785d990bd79eb6bd1496db9bb5635ce7b371caaf2a
6
+ metadata.gz: 2ae85cc983a4661b5a6cf201cae6bd7c9708ee8c3a15d15134db3947b77ac3af65c0ca584523242f791706852bc3534a087f8eefc9b636543b9dede351a5baaf
7
+ data.tar.gz: 771baf577a1ed85e15db658bfa7c87e01890a5bffaf67708b2d4e5bbda029257cb9faa17421d7ef88627226b75328d329f844ade168b33c87839c3d6ad894dc6
@@ -0,0 +1,47 @@
1
+ # You have to configure this ###################################################
2
+ title: Octopod
3
+ # You should configure this ####################################################
4
+ url: http://localhost:4000
5
+ subtitle: Static Site Podcast Publishing for Geeks
6
+ description: My super duper cool podcast.
7
+ author: Uncle Octopod
8
+ email: octopod@example.com
9
+ keywords: [octopod, podcast, magic]
10
+ itunes_categories: [Technology]
11
+ # additional_feeds:
12
+ # itunes: http://itunes.apple.com/de/podcast/podcast_name/id42424242
13
+ # torrent_m4a: http://bitlove.org/example_user/example_podcast_m4a/feed
14
+ # torrent_mp3: http://bitlove.org/example_user/example_podcast_mp3/feed
15
+ episodes_per_feed_page: 100
16
+ ## Rsync Deploy config #########################################################
17
+ ### Be sure your public key is listed in your server's ~/.ssh/authorized_keys
18
+ ### file.
19
+ ssh_host: user@host.org
20
+ ssh_port: 22
21
+ document_root: /path/to/your/htdocs/
22
+ rsync_delete: true
23
+ # You can configure this #######################################################
24
+ twitter_nick: my_twitter_handle
25
+ language: en
26
+ explicit: 'no' # 'yes'/'no'/clean
27
+ license: CC BY 4.0
28
+ license_url: https://creativecommons.org/licenses/by/4.0/
29
+ license_image_url: https://i.creativecommons.org/l/by/4.0/88x31.png
30
+ ## Flattr ######################################################################
31
+ flattr_uid: # Flattr will not be used unless this is set
32
+ flattr_button: compact # compact | default
33
+ flattr_mode: auto # auto | manual(default)
34
+ flattr_popout: 1 # 1 | 0 (show popout when hovering mouse over button)
35
+ flattr_language: en_GB # available languages - https://api.flattr.com/rest/v2/languages.txt
36
+ flattr_category: audio # available categories - https://api.flattr.com/rest/v2/categories.txt
37
+ ## Disqus comments #############################################################
38
+ disqus_shortname: # Disqus will not be used unless this is set
39
+ disqus_developer: 0 # 1 / 0
40
+ ## Feed links ###########################################################
41
+ itunes_url: https://itunes.apple.com/at/podcast/myname/id#myid#
42
+ bitlove_url: https://bitlove.org/myaccount
43
+ fyyd_url: https://fyyd.de/podcast/myaccount/myid
44
+ gpodder_url: https://gpodder.net/podcast/mypodcast
45
+
46
+ gems: [jekyll-octopod]
47
+ theme: jekyll-bootflat
@@ -9,9 +9,6 @@ subtitle: Static Site Podcast Publishing for Geeks
9
9
  description: My super duper cool podcast.
10
10
  author: Uncle Octopod
11
11
 
12
- ### author_url: This is the URL of a site owned by the author (see https://jsonfeed.org/version/1)
13
- author_url: "http://your.fancy.hosting/"
14
-
15
12
  email: octopod@example.com
16
13
  keywords: [octopod, podcast, magic]
17
14
  itunes_categories: [Technology]
@@ -49,10 +46,6 @@ itunes_url: https://itunes.apple.com/at/podcast/myname/id232323
49
46
  # torrent_m4a: http://bitlove.org/example_user/example_podcast_m4a/feed
50
47
  # torrent_mp3: http://bitlove.org/example_user/example_podcast_mp3/feed
51
48
 
52
- ### Disqus comments
53
- disqus_shortname: # Disqus will not be used unless this is set
54
- disqus_developer: 0 # 1 | 0
55
-
56
49
  ### Isso comments
57
50
  use_isso: "no" # "no" | "yes"
58
51
 
data/bin/octopod CHANGED
@@ -120,7 +120,40 @@ def remove_theme_served_path(path)
120
120
  FileUtils.rmdir(path, verbose: true) if Dir.exist?(path) && Dir.empty?(path)
121
121
  elsif !path.end_with?('.md')
122
122
  FileUtils.rm(path, verbose: true)
123
+ # Clean up now-empty parent directories this file leaves behind (e.g. img/logo/ once every
124
+ # generic favicon file under it is gone), but never touch PWD itself and never remove a
125
+ # directory that still holds real, unrelated content (a site's own photos alongside the
126
+ # generic ones, say) - Dir.empty? guards that.
127
+ parent = File.dirname(path)
128
+ while parent != PWD && Dir.exist?(parent) && Dir.empty?(parent)
129
+ FileUtils.rmdir(parent, verbose: true)
130
+ parent = File.dirname(parent)
131
+ end
132
+ end
133
+ end
134
+
135
+ # 'now_theme_served' used to list '_layouts' and 'img' wholesale, on the assumption that a legacy
136
+ # site's copies of those directories were 100% gem output. That's wrong whenever a site added its
137
+ # own files alongside them - a custom '_layouts/presentation.html' with no gem equivalent, or real
138
+ # content photos dropped into 'img/' - since a whole-directory delete has no way to tell those apart
139
+ # from the generic files it's supposed to clean up. This instead lists the theme gem's *actual*
140
+ # shipped filenames in those two directories, read from the installed jekyll-octopod-bulma gem
141
+ # itself (same reasoning as the version-constraint lookup in update_gemfile_and_theme_config: read
142
+ # from the gem so this can't drift out of sync as its shipped file list changes) - so 'update' only
143
+ # ever removes a file that's actually theme content, and leaves anything else in place.
144
+ def theme_shipped_generic_files
145
+ theme_gem_dir = begin
146
+ Gem::Specification.find_by_name('jekyll-octopod-bulma').gem_dir
147
+ rescue Gem::MissingSpecError
148
+ nil
123
149
  end
150
+ return [] unless theme_gem_dir
151
+
152
+ layouts = Dir.glob(File.join(theme_gem_dir, '_layouts', '*')).map { |f| "_layouts/#{File.basename(f)}" }
153
+ img = Dir.glob(File.join(theme_gem_dir, 'assets', 'img', '**', '*'), File::FNM_DOTMATCH)
154
+ .reject { |f| File.directory?(f) }
155
+ .map { |f| f.sub("#{theme_gem_dir}/assets/", '') }
156
+ layouts + img
124
157
  end
125
158
 
126
159
  # Points a site's Gemfile and _config.yml at jekyll-octopod-bulma instead of the old direct
@@ -371,8 +404,8 @@ if ARGV.size > 0 && (ARGV[0] == 'episode' || ARGV[0] == 'deploy' || ARGV[0] == '
371
404
  # point at it - so 'update' removes them outright, same "trust git diff, don't special-case"
372
405
  # philosophy as the rest of this command. Any '.md' file is kept no matter where it's found,
373
406
  # since that's real content, never theme boilerplate.
374
- now_theme_served = %w[
375
- _layouts podlove-player subscribe-button img favicon.ico apple-touch-icon-precomposed.png
407
+ now_theme_served = theme_shipped_generic_files + %w[
408
+ podlove-player subscribe-button favicon.ico apple-touch-icon-precomposed.png
376
409
  _includes/sidebar.html _includes/post_header.html _includes/post.html _includes/post_line.html
377
410
  _includes/disqus_thread.html _includes/disqus_count.html _includes/isso_thread.html
378
411
  ]
@@ -387,6 +420,19 @@ if ARGV.size > 0 && (ARGV[0] == 'episode' || ARGV[0] == 'deploy' || ARGV[0] == '
387
420
  puts "===== ... done ===== ", ""
388
421
  end
389
422
 
423
+ # As of jekyll-octopod 0.19.0, JSON Feed support is gone outright - not moved to the theme
424
+ # gem, just removed (no real podcast client ever consumed it, and a since-fixed bug in this
425
+ # gem's own :after_init hook meant it silently never even built). Any 'feed.*.json' marker
426
+ # file left over from an older site is now genuinely dead: nothing generates its content, and
427
+ # jekyll-octopod-bulma's sidebar no longer links to it. Removed the same way theme-served
428
+ # files are removed above.
429
+ found_json_feeds = Dir.glob(File.join(PWD, 'feed.*.json'))
430
+ unless found_json_feeds.empty?
431
+ puts "", "===== Removing feed.*.json marker files (JSON Feed support was removed) ====="
432
+ found_json_feeds.each { |path| remove_theme_served_path(path) }
433
+ puts "===== ... done ===== ", ""
434
+ end
435
+
390
436
  puts "", "===== Pointing Gemfile/_config.yml at jekyll-octopod-bulma ... ====="
391
437
  update_gemfile_and_theme_config
392
438
  puts "===== ... done ===== ", ""
@@ -222,31 +222,6 @@ module Jekyll
222
222
  "@#{user}@#{uri.host}"
223
223
  end
224
224
 
225
- # Generates the config for disqus integration
226
- # If a page object is given, it generates the config variables only for this
227
- # page. Otherwise it generate only the global config variables.
228
- #
229
- # {{ site | disqus_config }}
230
- # {{ site | disqus_config:page }}
231
- def disqus_config(site, page = nil)
232
- if page
233
- disqus_vars = {
234
- 'disqus_identifier' => page['url'],
235
- 'disqus_url' => "#{site['url']}#{page['url']}",
236
- 'disqus_category_id' => page['disqus_category_id'] || site['disqus_category_id'],
237
- 'disqus_title' => j(page['title'] || site['site'])
238
- }
239
- else
240
- disqus_vars = {
241
- 'disqus_developer' => site['disqus_developer'],
242
- 'disqus_shortname' => site['disqus_shortname']
243
- }
244
- end
245
-
246
- disqus_vars.delete_if { |_, v| v.nil? }
247
- disqus_vars.map { |k, v| "var #{k} = '#{v}';" }.compact.join("\n")
248
- end
249
-
250
225
  # Returns the hex-encoded hash value of a given string. The optional
251
226
  # second argument defines the length of the returned string.
252
227
  #
@@ -5,19 +5,14 @@ module Jekyll
5
5
  site.config.update(
6
6
  'episode_feed_formats' => feeds.map { |f| f.match(/episodes\.(\w{3,4})\.rss/)[1] }
7
7
  )
8
- jsonfeeds = Dir["feed.{???,????}.json"]
9
- site.config.update(
10
- 'json_feed_formats' => jsonfeeds.map { |f| f.match(/feed\.(\w{3,4})\.json/)[1] }
11
- )
12
8
 
13
- # These marker files exist only so the scan above can detect which
14
- # formats to generate; PagedFeedPageGenerator creates the actual pages
15
- # at these exact paths. Excluding them here keeps Jekyll's normal
16
- # reader from also turning them into pages, which would otherwise
9
+ # This marker file exists only so the scan above can detect which formats to generate;
10
+ # PagedFeedPageGenerator creates the actual pages at these exact paths. Excluding it here
11
+ # keeps Jekyll's normal reader from also turning it into a page, which would otherwise
17
12
  # collide with the generator's output at the same destination.
18
- # site.exclude (not site.config['exclude']) is what Reader actually
19
- # consults, and it's copied from config before this hook runs.
20
- site.exclude += feeds + jsonfeeds
13
+ # site.exclude (not site.config['exclude']) is what Reader actually consults, and it's
14
+ # copied from config before this hook runs.
15
+ site.exclude += feeds
21
16
  end
22
17
  end
23
18
  end
@@ -2,8 +2,8 @@ module Jekyll
2
2
  class Octopod
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
- MINOR = 18
6
- TINY = 1
5
+ MINOR = 20
6
+ TINY = 0
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-octopod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Eilermann
@@ -105,6 +105,7 @@ extra_rdoc_files: []
105
105
  files:
106
106
  - README.md
107
107
  - Rakefile
108
+ - assets/_config.yml
108
109
  - assets/_config.yml.sample
109
110
  - assets/_posts/2016-03-22-episode0.md
110
111
  - assets/_sass/_overrides.scss
@@ -114,9 +115,6 @@ files:
114
115
  - assets/episodes/episode0.m4a
115
116
  - assets/episodes/episode0.mp3
116
117
  - assets/episodes/episode0.ogg
117
- - assets/feed.m4a.json
118
- - assets/feed.mp3.json
119
- - assets/feed.ogg.json
120
118
  - assets/general_feed.xml
121
119
  - assets/imprint.md
122
120
  - assets/index.md
data/assets/feed.m4a.json DELETED
@@ -1,5 +0,0 @@
1
- ---
2
- layout: jsonfeed
3
- format: m4a
4
- ---
5
- {{ content }}
data/assets/feed.mp3.json DELETED
@@ -1,5 +0,0 @@
1
- ---
2
- layout: jsonfeed
3
- format: mp3
4
- ---
5
- {{ content }}
data/assets/feed.ogg.json DELETED
@@ -1,5 +0,0 @@
1
- ---
2
- layout: jsonfeed
3
- format: ogg
4
- ---
5
- {{ content }}