Page names case not reflected in filenames
weaversam8 opened this issue · 8 comments
Right now, page names are normalized to lowercase in Git and automatically raised to title case in the UI. The user should have the option to preserve case, so wikis written with other systems (that don't have all lowercase page names) can be imported seamlessly.
Related to #61.
Thank you for reaching out!
In the filesystem all files are lowercase. Thats correct. Is this what is the issue that you are running into?
As mention in #61 an otter wiki can display other pagenames than just title: The upper- and lower-casing of the page names is decided by the first heading. For example a page with the title # Mathjax
would be rendered as Mathjax, while # MathJax
will be rendered as MathJax.
I've read this issue again. One question: Is the problem you are having importing markdown files from another wiki? If so, surely you have considered simply renaming the files. Does that not solve the problem?
Renaming the files would solve the problem, but may break other integrations with the wiki repo. One great thing about storing files in Markdown is that they can be used by different tools (e.g. a docs website generator.) Enforcing a particular naming scheme to use OtterWiki limits what types of Markdown repos OtterWiki can interact with.
I'm happy to do the work on this and make it configurable - are you open to a PR?
OK, I understand the problem. I never thought you could use the files for multiple purposes.
I put on my list to check if there is a nice way to make the page loading "fuzzy", as in check if the file exists with lowercase first. If that doesn't find a file, then see if it can find a file with the same name in any combination of upper and lower case.
A PR is very welcome. Please make sure all the tests pass, maybe add some ^^, and above all make sure you do not break backwards compatibility.
+1 - Just a vote that I think Otter could explode if it were built to work as a hub with some of the local markdown-based editors that are exploding right now, like Obsidian.
@redimp - PR opened. Let me know what you think.