Add image attachments with root
If a markdown post is created from email with attachments, the file will come in like this:
---
title: "with some attachments, ok."
published: true
attachments:
multi_channelled_architecture: blogfuyutubecom/2021_11_3_2174278_0.png
configurable_algorithm: blogfuyutubecom/2021_11_3_2174278_1.png
---
See some inlined attachments
<img src={attachments.configurable_algorithm}/>
**OK.**
<img src={attachments.multi_channelled_architecture}/>
_Italics._
This svelte preprocessor will augment those image tags with the image root found in the _config.yml file, or use https://files.extrastatic.dev/attachments
if not found.
To turn off this, add this to your _config.yml
:
attachments:
root:
Leaving root empty will mean you will need to store those images locally (and the yarn build
command will fail if they are not found). You can always host them somewhere else and put the correct root URL there if you prefer.
See #14