-
Notifications
You must be signed in to change notification settings - Fork 50
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
create site.pages with globs #186
Conversation
Signed-off-by: karthik2804 <[email protected]>
99178cc
to
418f36c
Compare
The authoring experience here relies on the assumption that each template is interested in only one glob. Consider a page with both an "upcoming events" and a "featured articles" section. Is the expectation that such a page would get broken down into three templates, one for each "area of interest" section and one for the overall page? Is that a reasonable way for an author/designer to approach such a page? Is that how we've traditionally done things? |
Only the Top template controls what is passed down to its children, we could possibly switch to globwalk and support specifying multiple globs. thoughts @itowlson? or even something like where the
|
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.
I can't really comment on functionality, but it looks like this is pretty much existing code with a different file picker strapped on the front, so I'm sure that's fine - my comments are style only.
Sorry missed your reply to the authoring/scope question. That sounds a bit unlovely - naively, it would be nice for each loop to only have to inspect the things in its glob - but if that's how we have to do it then that's how we have to do it - I'll take your advice on what's practical. |
Unfortunately the way things are laid out as is we can't make the inspecting thing per loop without it breaking. I think the array of strings is the easiest thing to do in a non breaking manner. |
Signed-off-by: karthik2804 <[email protected]>
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.
I'm afraid I still have significant stylistic concerns, but I appreciate we need this quickly and I trust you on the functionality, so I'm okay with revisiting those in a follow-up PR if that works better for you. Thanks for the quick turnaround on this!
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.
Thank you. The new functions really help.
Signed-off-by: karthik2804 <[email protected]>
8909f5b
to
b50dcd0
Compare
Signed-off-by: karthik2804 <[email protected]>
Allows to add optional frontmatter to templates to allow for reading only files specified by globs instead of all the files in the content folder.