Escape apostrophes and make the gen plugin not spam

This commit is contained in:
Norbi Peti 2019-12-12 23:43:56 +01:00
parent 938073a660
commit 449256d470
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
2 changed files with 6 additions and 3 deletions

View file

@ -329,13 +329,13 @@
- artist: 'Cara Leigh' - artist: 'Cara Leigh'
title: 'Part of Me' title: 'Part of Me'
- artists: ['Tim Schaufert', 'Acacia'] - artists: ['Tim Schaufert', 'Acacia']
title: 'It's Going to Be Alright' title: 'It''s Going to Be Alright'
- artists: ['Electro Light', 'AWR'] - artists: ['Electro Light', 'AWR']
title: 'Under A Minute' title: 'Under A Minute'
- artists: ['Approaching Nirvana', 'TryHardNinja'] - artists: ['Approaching Nirvana', 'TryHardNinja']
title: 'Revenge Remix' title: 'Revenge Remix'
- artists: ['Electro-Light', 'AWR'] - artists: ['Electro-Light', 'AWR']
title: 'Don't Allow' title: 'Don''t Allow'
- artist: 'Sekai' - artist: 'Sekai'
title: 'Cherry' title: 'Cherry'
- artist: 'Faodail' - artist: 'Faodail'

View file

@ -125,7 +125,10 @@ module Jekyll
# Thus, if you use the `extension` feature of this plugin, you # Thus, if you use the `extension` feature of this plugin, you
# need to generate the links by hand # need to generate the links by hand
def datapage_url(input, dir) 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}" "#{dir}/#{sanitize_filename(input)}#{extension}"
end end
end end