flowershow icon indicating copy to clipboard operation
flowershow copied to clipboard

Links generation from notes with spaces

Open danymat opened this issue 2 years ago • 1 comments

Hello,

I'm still trying to make flowershow work for my digital brain (https://github.com/danymat/Brain), and I almost made it work ! However, I found some configuration issues that needs to be resolved, the main one being generation of url_path and slugs.

As you can see, this is the generated search.json:

Capture d’écran 2022-12-30 à 15 09 36

After running npx flowershow@latest export, the index.md is well recognized. Static files are properly generated. However, url links are not correctly matching file names:

  • For example, this is a link inside index.md: https://danielmathiot.tech/202102241246-§1-Zettelkasten
  • However the static generated file in out directory is 202102241246 §1 Zettelkasten.html.
  • To properly access this file, I have to manually change the url link to https://danielmathiot.tech/202102241246%20§1%20Zettelkasten.html (notice the %20 and .html)

From what I saw, your tests only catch .md files with trailing dashes only. For proper testing, I'm thinking that testing file names that include spaces, and custom characters (all custom characters accepted by obsidian, for example) will make the application more resilient. (related: https://github.com/flowershow/flowershow/issues/333)

Still trying to make it work on my end, but I think the fix should be quite easy to make as it seems to point to. Unfortunately, I would need to spend hours to make it work as I have very limited knowledge on these frameworks:

Capture d’écran 2022-12-30 à 15 19 09

danymat avatar Dec 30 '22 14:12 danymat

@danymat thanks for reporting. Adding a failing test would be a good idea and this general point about file name handling is a good point and deserves its own issue so we can try and systematically solve it.

rufuspollock avatar Jan 02 '23 13:01 rufuspollock