-
Notifications
You must be signed in to change notification settings - Fork 96
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 include option to config #226
Conversation
@@ -22,6 +22,7 @@ pub struct Config { | |||
pub description: Option<String>, | |||
pub link: Option<String>, | |||
pub ignore: Vec<Pattern>, | |||
pub include: Vec<Pattern>, |
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.
Please give more detail on this change in your commit message. They are an important place to communicate.
For example, some useful things to include
- Link to Propose not skipping hidden folders/files #221 to help give context since sometimes designs are worked out in issues
- Especially if the user-facing design isn't fleshed out in the issue, describe it (the What?). For example "To allow overriding cobalt's default ignore behavior, this adds a new
include
field to cobalt.yml that ...". - On related note, be sure to include how this feature interacts with other features. How do
ignore
andinclude
interact? Should it be defined or undefined behavior? What should it be defined to? Why? - "Why?" on your implementation, if any is needed, is also important. This is a simple enough change, I don't expect much of a "Why?" regarding the implementation.
Notice that I separate out user-facing design / workflow separate from implementation. "How?" with implementation isn't as important; the code covers that.
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.
Fleshed out the commit message.
Override usually ignored folders/files to be included. Such as those prefixed with `.` or `_`. Related to #221. Sometimes hidden folders or files need to be included for example when verifying keybase identities, or when getting Let's Encrypt certificates, which have files in a `.well-known` folder. To include specific directories or files add something like the following to .cobalt.yml include: - .well-known This will include the `.well-known` directory in the build `exclude` will take precedence over `include`. Having matching entries in either list will exclude over include. It is however possible to do something like this: include: - .adirectory exclude: - .adirectory/afile to include the `.adirectory` without `afile` in it
So while I said I was focusing on liquid and wasn't working on this, that changed over the weekend and I found my very first step towards a generalized collection/section feature was refactoring how we find files. In working on it, I had an idea that would solve several implementation problems on my side and address this issue. While my change is still in progress, I'm curious what you think of my idea on how to solve this See epage@f307346 |
Note: I planned to force push to the branch :) |
I'd be for this. Having a single file where you can black and whitelist items is ideal, and gitignore is a known format. +1 from me |
FYI I've written the iterator and have some basic tests in place. Now it just needs to be integrated into the rest of cobalt. I realized I should probably stop rewriting commits until I have this ready to submit as a PR in case you want to add anything to it. |
Closing since we agreed to go with #227 |
Override usually ignored folders/files to be included. Such as those prefixed with
.
or_