Open nixjdm opened 5 years ago
Hi @nixjdm :-)!
I'm thinking at least the trailing slash should be optional.
I would fix this in core?
And maybe here we could make it just work in case leading is missing?
Thanks @nixjdm, that was very helpful. It's indeed pretty fragile. This worked for me:
source_path = /blog
url_path = /blog/feed.xml
and deleting filename
. It seems to still generate a feed.xml
in addition to blog/feed.xml
, but I'll worry about that later - blog/feed.xml
works now.
Fixing only the trailing slash here makes sense to me.
I noticed this looking at #20 (note @rgommers, @goanpeca ). As of 0.3 this plugin / virtual path resolver is not resilient against different formats of supplying source_path (at least) url fragments in the config file.
In my testing with this site and a simplified config and template fragment of
The jinja only correctly resolved with
source_path = /blog
./blog/
,blog/
, andblog
all failed, resulting in a broken rendered template path ofblog@atom/feed
. This shouldn't be so picky. I'm thinking at least the trailing slash should be optional. There may be a good reason to have to pick the presence of a leading slash though (relative v. absolute).At the moment I'm not sure where this should to be addressed; here, core, or partially in both.