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'
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'

View file

@ -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