After couple of hours poking around I now know how to embed #typst markup from yaml to a typst document :-)
I’m working on resume made with typst (as I’m looking to find a new job by end of September), and in that I’m using #yaml file to separate presentation from the content. Job descriptions can involve links, and thus those entries need to be evaluated.
First observation was:
#eval(job.description, mode: "markup")
If mode-parameter is not defined, typst will try to parse the string as an expression (i.e. mode: "code"
is the efault, which is feasible in this case.
Another problem was the use of the hash character for tags, which is used for comments in yaml.
I sorted that out by putting every description into double quotes after trying a few different approaches:
description:
"I first worked on Keystone Security Monitor for RISC-V by enabling it
for CVA6 running on FPGA. This work was part of the EU funded
#link(\"https://www.spirs-project.eu/\")[SPIRS project].
It involved
tuning the
#link(\"https://buildroot.org/\")[BuildRoot]
based embedded stack, and
fixing various
#link(\"https://github.com/keystone-enclave/keystone/issues/378\")[issues].
in the OpenSBI firmware.
For the second half of my contract I'm enabling Linux for the new SoC's
developed by
#link(\"https://sochub.fi/\")[SocHub project]."
The screenshot shows the end result.
Nothing too complicated but took some time to find working patterns so putting here as a #note for myself :-)