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

Add extension parameter type #47

Merged
merged 13 commits into from Feb 24, 2022
Merged

Add extension parameter type #47

merged 13 commits into from Feb 24, 2022

Conversation

ahopkins
Copy link
Member

@ahopkins ahopkins commented Aug 1, 2021

Resolves #27

This PR adds file extension routing.

definition example filename extension
<file:ext> page.txt "page" "txt"
<file:ext=jpg> cat.jpg "cat" "jpg"
<file:ext=jpg|png|gif|svg> cat.jpg "cat" "jpg"
<file=int:ext> 123.txt 123 "txt"
<file=int:ext=jpg|png|gif|svg> 123.svg 123 "svg"
<file=float:ext=tar.gz> 3.14.tar.gz 3.14 "tar.gz"

This implementation will not support the path parameter type: <file=path:ext>. That is a whole different beast and should be handled in its own PR. This feature will be released as "beta", so we can work on getting support for path in the future, or to decide that we will not support it.

@ahopkins ahopkins marked this pull request as draft December 20, 2021 00:24
@ahopkins ahopkins marked this pull request as ready for review January 16, 2022 09:28
@ahopkins ahopkins merged commit 35facf6 into main Feb 24, 2022
@ahopkins ahopkins deleted the ext-type branch February 24, 2022 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Routes with extension
1 participant