-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge matching resources params maps
This allows setting default params values in the more general resource matchers. I also allows override with more specific values if needed. ```toml [[resources]] src = "documents/photo_specs.pdf" title = "Photo Specifications" [resources.params] ref = 90564687 icon = "photo" [[resources]] src = "documents/guide.pdf" title = "Instruction Guide" [resources.params] ref = 90564568 [[resources]] src = "documents/checklist.pdf" title = "Document Checklist" [resources.params] ref = 90564572 [[resources]] src = "documents/payment.docx" title = "Proof of Payment" [[resources]] src = "documents/*.pdf" title = "PDF file" [resources.params] icon = "pdf" [[resources]] src = "documents/*.docx" title = "Word document" [resources.params] icon = "word" ``` In the above `TOML` example, `photo_specs.pdf` will get the `photo` icon, the other pdf files will get the default `pdf` icon. Note that in the example above, the order matters: It will take the first value for a given params key, title or name that it finds. Fixes #4315
- Loading branch information
Showing
2 changed files
with
37 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters