Yaml
questions tagged ‘Yaml’
How can I use markdown in custom metadata?
I'm trying to create a custom metadata field to credit image authors and I want to use Markdown to add links. However, the Markdown is not processed. The output is the contents of the field verbatim. Here's what I have (that doesn't work): Metadata image_credits: - '[Photo #1](https://www.example/1)' - '[Photo 21](https://www.example/2)' Template {{#metadata.image_credits.length}} {{#metadata.image_credits}} {{.}} {{/metadata.image_credits}} {{/metadata.image_credits.length}}
Empty summary metadata is rendered as the text 'null'?
By default, I include a "Summary:" line in post metadata. I don't always add a Summary, but if I leave it empty it renders {{summary}} as null in the template. I tried adding a conditional like so: {{#summary}}{{summary}}{{/summary}} ...but that still renders as null unless I remove the Summary line from the front matter completely. I'd prefer it if I could leave an empty Summary: value in the post metadata without it rendering as null. Possible?
Newsletter
Get updates on Blot’s latest features and changes. Delivered every three months.