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
Allow directory names with dot and file names without extension #344
Labels
Comments
IMHO if such field is added, it would be better to define it as an enum field - |
I propose that besides this flag, the "auto"-case heuristic should only consider a limited list of extensions to actually be files (e.g. |
betaveros
added a commit
to betaveros/lektor
that referenced
this issue
Sep 5, 2020
Slug styles specify how slugs are turned into file and directory names in the URL path. This is roughly based off the design in lektor#809 (comment). As is, this PR fixes lektor#344 and deals with the tricky "global" part of doing lektor#809 properly. It also enables pages with dots in their slugs to be paginated and fixes some issues with the dev server resolving descendants of such pages incorrectly. It is still a prototype, though (I have only done some casual manual testing and yet to write any tests). In addition to a sitewide default setting and per-page setting, we would likely also want datamodels to be able to specify the slug style of their pages and/or their child pages. To stay similar to the current way `slug_format` can be configured, it seems we should also allow datamodels to specify the slug styles of their children, but as mentioend in lektor#806 that behavior is a little strange and worth reconsidering, so this PR doesn't try to implement any such behavior.
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While migrating an existing site to Lektor I find myself looking for this. My use case is building a release note page, and using the build numbers as slug. So I would have paths like this
/release/521/
/release/532/
/release/535.1
(!)Although everything “works”, this is really inconsistent.
Proposal: Add a new system boolean field
_leaf
that forces the page to be built into a file (yes
) or directory (no
). The current heuristic is used if the field is not present incontents.lr
.I’m not sure whether this is the best solution toward the problem; if this sounds like a good solution I can create a PR for this.
The text was updated successfully, but these errors were encountered: