-
Notifications
You must be signed in to change notification settings - Fork 1
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 file system route #72
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
func (ds *FileSystemDataSource) Iterator(ctx models.RenderContext, renderer models.Renderer) (errCount int) { | ||
|
||
// special case - only render the implicit root route if this is the default language context | ||
// these files will not be rendered for every language |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this does what the comment says then any site with multiple languages is not going to have different versions of any jet file that isn't a template right?
For example:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct - just a small amount of magic. the "root" named route is a special case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how it currently works, /en/signin.html might be actually what we want though @PeculiarGoat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we do want those (sign in, register, forgot password, etc) to be available in all languages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stajs @gscragg @PeculiarGoat
Okay so this is not the current behaviour, but this is a good time to make this change.
I propose that by default we will render the directories of jet templates to all languages. You can opt out of this by naming the route "defaultLangOnly". A good example being the .well-known
directory. Or shall we do something that is more language aware?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay in discussion with @gscragg I have added defaultLanguageOnly
flag to the route
Provides a FileSystem route for rendering static files #71