Closed bedlamzd closed 4 years ago
Hi!
(and sorry for a late reply, was busy elsewhere). Hum, this shouldn't be. I'm having the exact same use case (for example directly on the index page of https://mcss.mosra.cz -- https://github.com/mosra/m.css/blob/master/doc/index.rst#mcss ) and everything works as it should.
I dug a bit and found this, is this where you're trying to use this feature? I forgot most of Pelican internals since last time, but I think to make this work you need to explicitly pass the path to images via STATIC_PATHS
in pelicanconf.py
(here's what I do for the mcss website). Not sure why it works when you reference the image in content tho -- probably some additional automagic I am not aware of.
Hi!
Yes, you found right project. I kind of paused it since then and I am completely new to pelican. So I may use it wrong and it is why it isn't working.
Anyway thanks for help. When I start working on this project again I will try your solution and write back here if it worked for me.
I returned to the project and specified static directory and it didn't work I tried to debug and trace what is going on and found out that in content._context[key] keys (i.e. paths to images) contain 'static' like in 'static/img/cover.png'. But parsed path does not contain 'static'. I think I use something in a wrong way, because it is strange that in your case it does work. static folder supposed to be in content directory? should pelican copy static folder to output or only files inside it?
I finally figured it out. Didn't know that {static} does not imply any path and I should specify full path relative to content directory, not to static directory
Hello! Have been trying out your plugin htmlsanity for expanding links in meta fields to link cover image. Expansion works only when this same image is referenced within content. Otherwise there is a warning "Unable to find file" and it pastes just "{static}path/to/file" instead of a proper path.