avillafiorita / jekyll-datapage_gen

Generate one page per yaml record in Jekyll sites.
369 stars 80 forks source link

Elements ending with a period generate folders instead of pages #48

Closed AxelTerizaki closed 5 years ago

AxelTerizaki commented 6 years ago

Hello.

First, thank you for this wonderful plugin, it allowed me to create a nicely linked web of data on our site (http://mugen.karaokes.moe/en/karas.html)

I have an issue though with some of that data.

When an element ends with a period, like "5pb." instead of creating "5pb..html" it creates a folder called "5pb" and a "html.html" file inside.

See for yourself :

Here's a directory of links : I use the datapage_url liquid tag (I don't think it's mentionned in your README, I found it by looking into the code and it's very useful!)

http://mugen.karaokes.moe/en/creators.html Try to click on 5pb. there, it redirects to a 404. The URL there seems good to me, the page generated at runtime does not :

Here's the link to the page Jekyll created : http://mugen.karaokes.moe/en/tags/creator/5pb/html.html

Do you think this is easily fixable?

Thanks in advance

AxelTerizaki commented 6 years ago

Forgot to mention my config looks like that :

  - index_files: false
    data: tags_karas.tags
    template: tag_en
    name: NORM_name
    dir: en/tags/creator/
    extension: html
    filter_condition: "record['tagtype'] == 4"
avillafiorita commented 5 years ago

Hello there, the behavior seems to be with Jekyll and not with the plugin.

In other words, Jekyll maps a static file named pb5..md (note the double dots) to _site/pb5/html.html. I am not sure whether this is an intended behavior of Jekyll or a bug.

There is not much I can do with the plugin, however.

I'll push an example to demonstrate the behavior and, if ok with you, I'll close the bug.

AxelTerizaki commented 5 years ago

I see. Thanks for the reply :)

I don't see a problem with closing this issue, but maybe we should mention this to the Jekyll team somehow? Could you perhaps create an issue there for this? I'm not familiar enough with how the internals work to post it myself.

If you can't due to lack of time or such I can try though.

avillafiorita commented 5 years ago

Yes, you are right I will file an issue with them!

AxelTerizaki commented 5 years ago

Saw that, thank you :)

avillafiorita commented 5 years ago

Thank you for finding out in the first place! Cheers -a

On 13 September 2018 16:15:53 CEST, Axel Terizaki notifications@github.com wrote:

Saw that, thank you :)

-- You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub: https://github.com/avillafiorita/jekyll-datapage_gen/issues/48#issuecomment-421022884

-- Sent from my Android device with K-9 Mail. Please excuse my brevity. --

Le informazioni contenute nella presente comunicazione sono di natura  privata e come tali sono da considerarsi riservate ed indirizzate  esclusivamente ai destinatari indicati e per le finalità strettamente  legate al relativo contenuto. Se avete ricevuto questo messaggio per  errore, vi preghiamo di eliminarlo e di inviare una comunicazione  all’indirizzo e-mail del mittente.

-- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you received this in error, please contact the sender and delete the material.