Case Insensitive Path {{include}}

Is there any way for me to have something like:

<div id="content">
  {{include "templates/myname.html"}}

Then let’s say I have:

 - MyName.html

Any way for it to include a file, in a case insensitive way?

Not if you’re on a case-sensitive filesystem. If you’re on Windows then that would probably work fine, but not on linux/mac.

Hmm alright, I have an easy solution so it’s no problem. It’d just be a tiny bit easier if the case insensitive file loading was possible. But I understand the issue, because what would one do in the case of:

  - MyName.html
  - myName.html
  - myname.html
  - ...

so that’s fair.

I suggest making your tooling ensure that all files are all lowercase, or something.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.