Closed white-gecko closed 5 years ago
Why is the instance_template_mapping
important? I've defined the layout for the post already in its front matter.
Also is the path calculation really as stable as page.instance_variable_get(:@base)
? E.g. if I execute jekyll from within a different directory?
your restriction lets jekyll-rdf render a resource. This resource needs a template. The rendering of the post and the rendering of a resource are two different things. They just might get merged in the end.
Ok I understand this part. What do you think about the path?
the path part should be stable, but we should test this by loading posts from a theme (if that is even possible). Then we know for certain.
I've tested it with the jod theme and it does not work. The system does not find the prefix file because it is looking for it in the local directory and not in the jekyll base path.
turns out document hooks are always called for each kind of documents (page, posts). I don't think we should implement a prefix hook for all documents, since we can only be sure about specifics if the document is a page or post.
Fix #256