flowershow
flowershow copied to clipboard
Preview and generation is blocked due to special characters in filename
Hello, I'm in the process of replacing my current obsidian publish with flowershow. I will be using https://github.com/danymat/Brain for my ZK directory.
After installing flowershow, i'm trying to start it with npx flowershow preview. It starts the server but it seems to hang out. Is it because of the number of notes ? (+600).
Furthermore, I tried to build it and see if I can host it by myself. I encountered 3 issues:
> @flowershow/[email protected] build
> next build
Error: Found 3 problems in 600 documents.
โโโ Encountered unexpected errors while processing of 2 documents. This is possibly a bug in Contentlayer. Please open an issue.
โ
โ โข "202104020409 k-anonymisation.md": UnexpectedMDXError: Error: Build failed with 1 error:
โ _mdx_bundler_entry_point-ece670b5-bcd3-4a86-95f4-82ab4d1cb044.mdx:34:12: ERROR: [plugin: @mdx-js/esbuild] Unexpected character `=` (U+003D) before name, expected a ch
aracter that can start a name, such as a letter, `$`, or `_`
โ โข "202104180404 Dormir peu rend plus susceptible a la grippe.md": UnexpectedMDXError: Error: Build failed with 1 error:
โ _mdx_bundler_entry_point-56461f33-625d-45bd-bd7c-3f02debc5284.mdx:10:3: ERROR: [plugin: @mdx-js/esbuild] Unexpected character `5` (U+0035) before name, expected a cha
racter that can start a name, such as a letter, `$`, or `_`
โ
โโโ Couldn't determine the document type for 1 documents. (Skipping documents)
Please either define a filePathPattern for the given document type definition or provide a valid value for the type field (i.e. the field "type" needs to be one of th
e following document type names: Blog, Page).
โข index.yaml
Related documents:
- https://github.com/danymat/Brain/blob/main/202104180404%20Dormir%20peu%20rend%20plus%20susceptible%20a%20la%20grippe.md
- https://github.com/danymat/Brain/blob/main/202104020409%20k-anonymisation.md
Hello, I surrounded the <= within code blocks and it passes the warning.
Furthermore, by trying flowershow preview, i get parsing problems:

From what i see, it is related to ' in the file name.
@danymat thanks for reporting. i think you are right re file name. Could you see if removing the ' resulted in ok build. We can then look into what limitations there are on file names in general and try to relax them.
@danymat thank you for reporting this ๐ท
As for the issue related to <= in your markdown, some MDX parser constraints disallow particular character combinations. The reason for it is that MDX format is a mix of markdown and JSX, and MDX parser will try to parse < signs, and their combinations with some other characters, as JSX but it will fail to do so because e.g. <= is obviously not a valid JSX tag ๐
. Here is a list of some of the disallowed character combinations: https://mdxjs.com/docs/troubleshooting-mdx/#unexpected-character-at-expected-expect
We'll look into it, but for now unfortunately you'll need to find some workaround, like your solution of wrapping it in quotes or using โฌ
emoji instead ๐
As for the slow compilation of the site preview, it may be the case that it's due to the number of your markdown files. This has already been reported to us and I've created discussion #330. I've added some more details there related to why this happens, so please take a look if you're interested ๐
Very interesting, thanks @olayway ! (I'm impressed by your both dedication to this project)
Is there a solution that does not require removing all '. If adding it to some whitelist, it can allow french people to write notes :D (example french characters: รฉรจรงร 'ยง
Reference to another project that had to create whitelists: https://github.com/srid/neuron/issues/595. Related (2): https://github.com/EmaApps/emanote/issues/198#issuecomment-979325926. Maybe that can help you fix/provide support for those characters more easily.
@danymat thanks for reporting. i think you are right re file name. Could you see if removing the
'resulted in ok build. We can then look into what limitations there are on file names in general and try to relax them.
I tried to remove ' and it didn't catch the bug. But, i have a lot of files like that, as french language use it a lot. I would prefer having wildcards for common special characters. Any ideas
Is there a solution that does not require removing all '. If adding it to some whitelist, it can allow french people to write notes :D (example french characters: รฉรจรงร 'ยง
@danymat thank you so much for all your input! We'll look into it!
No worries, ! I'm very interested to make flowershow work on my personal + professional vaults. I will surely contribute as soon as I can on this project, as it seem very promising