Closed svandragt closed 12 months ago
Creating lektor_tags_default_template.html under templates
fixed this for me.
Cheers Phil how did you figure that out?
The readme says that the plugin ships with a default template.
Moreover, this template is included in the wheel package, but:
/home/louis/.cache/lektor/packages/62cf2206d7ac8eab5a919bd7c9e83b0e/templates/tag.html
: weird: it is not installed in the lektor-tags
directory;tag.html
(althought lektor-tag
looks for a default template named lektor_tags_default_template.html
);lektor_tags
does not want to use it because: ValueError: The given value ('/home/louis/.cache/lektor/packages/62cf2206d7ac8eab5a919bd7c9e83b0e/templates/lektor_tags_default_template.html') is not below the source folder ('/home/louis/tmp/lektor-mwe')
.I think the issue is that shipping package data in a Python distribution requires that the data files live within a package's directory. As things stand, we do not have a package in which to include any package data: lektor_tags
is a module (its source code is in a top-level file named lektor_tags.py
), rather than a package (in which its code would be in lektor_tags/__init__.py
).
(Currently, at least, it appears as if the default template is not included in the wheel at all. When lektor_tags
is installed from source in editable mode, the default template can be found, however, if installed from the wheel, the template doesn't exist.)
It's not clear from the setting up instructions that a
/templates/tags.html
template is required. The readme says that the plugin ships with a default template. I've not checked this, but it definatelly does not get called correctly:ValueError: The given value (u'~/Library/Caches/Lektor/packages/c2c6742dbf0a90d60bcba133cf9f3d16/templates/tags.html') is not below the source folder (u~/Dropbox/Lektor/vandragt.com')