define-meta template issue?
I can't seem to figure out how to use
◊(define-meta template "...") correctly.
Whatever I do, it seems to default to using
"template.<extension>.p", even if I try to use a different template file.
I tried to print
◊(get-template-for ◊mp-get-meta['here-path]) (where mp-get-meta is a custom function that accesses the metas) and it always prints the same file, irrespective of the template meta, even if
◊(mp-get-meta 'template) reports a different file.
Specifically, I would like to have the templates in a separate templates/ folder, and possibly allow choosing between different templates for different types of pages.
More information is needed to pinpoint the problem. For instance, suppose I create
index.html.pm like so:
#lang pollen ◊(define-meta template "foobar.html") hello world
foobar.html like so:
I am FOOBAR
If I open
index.html.pm in DrRacket and do this at the REPL:
(get-template-for (path->complete-path "index.html.pm"))
The result is:
Which is what I expect. If I go to the command line and do
raco pollen render index.html, the resulting file
I am FOOBAR
Which is also correct.
I just realized that my DrRacket can't even run my 'pollen.rkt' file (but compilation of documents still appears to work "correctly"... weird).
I will try to fix that first. If I do and this issue persists, I'll re-comment here.
Deleting a branch is permanent. It CANNOT be undone. Continue?