From 449256d470d0a82620f04ce0b4d4063d16cb9d0f Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Thu, 12 Dec 2019 23:43:56 +0100 Subject: [PATCH] Escape apostrophes and make the gen plugin not spam --- _data/streams.yml | 4 ++-- _plugins/data_page_generator.rb | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/_data/streams.yml b/_data/streams.yml index 2f08e7b..9058b0d 100644 --- a/_data/streams.yml +++ b/_data/streams.yml @@ -329,13 +329,13 @@ - artist: 'Cara Leigh' title: 'Part of Me' - artists: ['Tim Schaufert', 'Acacia'] - title: 'It's Going to Be Alright' + title: 'It''s Going to Be Alright' - artists: ['Electro Light', 'AWR'] title: 'Under A Minute' - artists: ['Approaching Nirvana', 'TryHardNinja'] title: 'Revenge Remix' - artists: ['Electro-Light', 'AWR'] - title: 'Don't Allow' + title: 'Don''t Allow' - artist: 'Sekai' title: 'Cherry' - artist: 'Faodail' diff --git a/_plugins/data_page_generator.rb b/_plugins/data_page_generator.rb index e93bdcf..886e6de 100644 --- a/_plugins/data_page_generator.rb +++ b/_plugins/data_page_generator.rb @@ -125,7 +125,10 @@ module Jekyll # Thus, if you use the `extension` feature of this plugin, you # need to generate the links by hand def datapage_url(input, dir) - extension = Jekyll.configuration({})['page_gen-dirs'] ? '/' : '.html' + if $config == nil + $config = Jekyll.configuration({}) # Prevent spamming "Configuration file: ..." - NorbiPeti + end + extension = $config['page_gen-dirs'] ? '/' : '.html' "#{dir}/#{sanitize_filename(input)}#{extension}" end end