Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page names case not reflected in filenames #85

Closed
weaversam8 opened this issue Feb 15, 2024 · 8 comments
Closed

Page names case not reflected in filenames #85

weaversam8 opened this issue Feb 15, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@weaversam8
Copy link
Contributor

weaversam8 commented Feb 15, 2024

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.

@redimp
Copy link
Owner

redimp commented Feb 15, 2024

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.

@redimp
Copy link
Owner

redimp commented Feb 16, 2024

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?

@weaversam8
Copy link
Contributor Author

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?

@redimp
Copy link
Owner

redimp commented Feb 16, 2024

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.

@redimp redimp changed the title Page names do not preserve case Page names case not reflected in filenames Feb 18, 2024
@ReessKennedy
Copy link

+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.

weaversam8 added a commit to Phonebooth/otterwiki that referenced this issue Feb 21, 2024
weaversam8 added a commit to Phonebooth/otterwiki that referenced this issue Feb 21, 2024
@weaversam8
Copy link
Contributor Author

@redimp - PR opened. Let me know what you think.

@redimp redimp added the enhancement New feature or request label Feb 21, 2024
@redimp
Copy link
Owner

redimp commented Feb 24, 2024

Picked up the PR #88 and worked on it.

See feature/retain-page-name-case

@redimp redimp closed this as completed in 8304302 Feb 26, 2024
@redimp
Copy link
Owner

redimp commented Mar 3, 2024

Feature released in 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants