hugo/resource
Bjørn Erik Pedersen 5a0819b9b5 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
2018-01-23 17:11:38 +01:00
..
testdata resource: Fix handling of very long image file names 2018-01-15 20:22:14 +01:00
image.go resource: Add front matter metadata to Resource 2018-01-17 16:22:33 +01:00
image_cache.go resource: Add front matter metadata to Resource 2018-01-17 16:22:33 +01:00
image_test.go resource: Add front matter metadata to Resource 2018-01-17 16:22:33 +01:00
resource.go Merge matching resources params maps 2018-01-23 17:11:38 +01:00
resource_test.go Merge matching resources params maps 2018-01-23 17:11:38 +01:00
testhelpers_test.go resource: Fix handling of very long image file names 2018-01-15 20:22:14 +01:00