Closed AxelTerizaki closed 4 years ago
Hi there, could you send me your configuration file, to understand where the problem is?
Never mind, I observed the behavior when trying to reproduce issue 54. "Upgrading" it to bug
This can be fixed by changing Jekyll.configuration({})['page_gen-dirs']
into @context.registers[:site].config['page_gen-dirs']
.
I'm also seeing this problem in Jekyll 3.5.2. (actually, looks like in my case the same error msg is coming from a different plugin.)
I'm guessing the fix that @kencoenen suggests would go here?
Just wanted to say big thanks to @kencoenen for creating and naming this issue so that it was easy to find a year later :)
The code substitution works just as ken and @jeremydouglass say, within the definition of datapage_url()
in data_page_generator.rb
def datapage_url(input, dir)
# OLD extension = Jekyll.configuration({})['page_gen-dirs'] ? '/' : '.html'
# NEW change via: https://github.com/avillafiorita/jekyll-datapage_gen/issues/50#issuecomment-523383573
extension = @context.registers[:site].config['page_gen-dirs'] ? '/' : '.html'
"#{dir}/#{sanitize_filename(input)}#{extension}"
end
end
I have finally introduced the changed suggested by @kencoenen.
49 chars changed in 240 days: this estimates my productivity at 4 days per char... it does not include the time to delete the old line, though ;-)
Thanks to everyone for their patience and to @kencoenen for providing the solution!
When generating a website using this plugin, my console gets flooded with this message (I removed the full path from it)
I'm not too sure what triggers it, wether it's the collection itself, or if it's the
datapage_url
liquid filter provided by the plugin (BTW I discovered it by chance, it's not in the docs IIRC). I use the filter a lot due to how it allows me to link generated pages from other pages.You can take a look at the jekyll site in question if you want to try it out : https://lab.shelter.moe/karaokemugen/sites/mugen-site
This is not a particularly big bug but it's kind of annoying :)