Keats / kickstart

A scaffolding tool to get new projects up and running quickly
MIT License
354 stars 24 forks source link

Windows doesn't allow parentheses in path #40

Open Arteneko opened 4 years ago

Arteneko commented 4 years ago

Following #39, I tried to use the date thingy to auto-date my articles, but it seems like () isn't a windows-compatible path character.

auto-date

Keats commented 4 years ago

Hmm I don't think calling functions in filenames was meant to be allowed, it's extremely niche.

Arteneko commented 4 years ago

So uh, what about, as an alternative, aliases?

Like, you could define an alias for a given template in your template.toml and reuse that alias?

That would effectively fix every character problem that currently exists, and would be a fairly simple first-step treatment.

What do you think of that?

Keats commented 4 years ago

Hmm I'm not sure about that, it seems that it would make the content/configuration way more complex for some very nich usecases: templates are not rendered from what you see, you need to check the config file to know what it's going to be.

Arteneko commented 4 years ago

I just thought about something.

Can we use Tera in defaults?

That would allow to execute the function / filter combo, and I'd just need to skip the question.

Keats commented 4 years ago

I thought it was a great idea initially but I've changed my mind a bit. This opens people expecting to be able to use other variables in default expressions which might be amazing but I can't really of a usecase where I wouldn't just put the filters/fn in the files directly. That only leaves filenames/directories which we cover for basic filters without arguments not more complex/functions. I don't know if it's worth the complexity