I am trying to attach an image to Pelican by following the documentation here . Here is the markdown:

and pelicanconf.py:
PATH = 'content' STATIC_PATHS = ['images', 'pdfs'] ARTICLE_URL = 'blog/{date:%Y}/{date:%m}/{slug}.html' ARTICLE_SAVE_AS = 'blog/{date:%Y}/{date:%m}/{slug}.html'
.Html files are written to the output/YYYY/MM/
directory, where markdown is interpreted as:
<img alt="energy" src="{filename}/images/energy.png"/>
in .html
, while images are written to the output/images
folder.
Therefore, HTML files cannot find images. How to fix it? Ideally, I would like to save the images in the same folder as the .html
files (I think this is what {attach}
does).
Any help would be appreciated.
source share