// 使用下面模式能否发现 images/sunset.jpg
// Using Match/GetMatch to find this images/sunset.jpg ?
.Resources.Match"images/sun*"✅.Resources.Match"**/sunset.jpg"✅.Resources.Match"images/*.jpg"✅.Resources.Match"**.jpg"✅.Resources.Match"*"🚫.Resources.Match"sunset.jpg"🚫.Resources.Match"*sunset.jpg"🚫
{"date":"2018-01-25","resources":[{"name":"header","src":"images/sunset.jpg"},{"params":{"icon":"photo"},"src":"documents/photo_specs.pdf","title":"Photo Specifications"},{"src":"documents/guide.pdf","title":"Instruction Guide"},{"src":"documents/checklist.pdf","title":"Document Checklist"},{"src":"documents/payment.docx","title":"Proof of Payment"},{"name":"pdf-file-:counter","params":{"icon":"pdf"},"src":"**.pdf"},{"params":{"icon":"word"},"src":"**.docx"}],"title":"Application"}
From the example above:
sunset.jpg will receive a new Name and can now be found with .GetMatch "header".
documents/photo_specs.pdf will get the photo icon.
documents/checklist.pdf, documents/guide.pdf and documents/payment.docx will get Title as set by title.
Every PDF in the bundle except documents/photo_specs.pdf will get the pdf icon.
All PDF files will get a new Name. The name parameter contains a special placeholder :counter, so the Name will be pdf-file-1, pdf-file-2, pdf-file-3.
Every docx in the bundle will receive the word icon.
The :counter placeholder in name and title
The :counter is a special placeholder recognized in name and title parameters resources.
The counter starts at 1 the first time they are used in either name or title.
For example, if a bundle has the resources photo_specs.pdf, other_specs.pdf, guide.pdf and checklist.pdf, and the front matter has specified the resources as: