Adding tags in the sense of categories?
#39
Open
opened 5 years ago by Macavirus
·
2 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
One common use that I couldn’t find easily described in the tutorials is
creating tags for content such as are present in e.g. WordPress. (Meaning, not
XML tags or tag functions, but tags like metadata applying to multiple items in a
hierarchy).
E.g., you might tag a document “legal”, “update”, “technology”, etc.
I realize this is probably very basic Racket that I’m misunderstanding.
The best way I could guess to do this would be to add
◊(define-meta)
at thetop of a document and give it a list.
Then in a
template.html.pm
, use something likeThis doesn’t work because something about the syntax is incorrect, but is it on
the right track?
You should use
because the RHS of
define-meta
is auto-quoted.For
template.html.p
, you probably should have something like:@sorawee It works! Thank you.
I also found out you can do it with
for/splice
something like:I found it odd that the auto-quoting of
define-metas
was not documented. Thanks for the tip.