Closed anentropic closed 1 year ago
Forgot to say... thanks for this project!
I have been going through all the static site generators for Django and, apart from this minor issue, this is the only one I found that really works for my site without having to start over from scratch.
This looks like a decent addition to me, very happy to have contributions and thanks for the PR. Other than the single comment I've made the rest looks good. This feature needs to be added to the documentation as well but I can do that before the next release.
Glad you find the project useful!
Looks great, thanks for the feature addition!
You're welcome, thank you!
I had urls in my project like:
If I don't specify
distill_file
for the path then distill will output these as above, as files without extensions.If I do specify
distill_file
it can only be a static string (e.g."page.html"
), so all the pages will have same filename and overwrite each other.What is possible currently is if I change my urls to have trailing slash, then distill will treat them as a dir and then I can use
distill_file
to output with a suffix likeblog/page/1/index.html
.But what I really wanted was to output
blog/page/1.html
.This PR allows using a format string as the
distill_file
and then have the url params substituted in when rendering.