How do you reference the origen environment within an Origen 2 document?

24 views Asked by At

In the Origen 2 documentation system, how do you reference things like the dut and origen when building a web document?

For example, I currently have an example code block like this where the version is hardcoded:

$ origen -v
Origen: 2.0.0-pre0

I would like to make the version a reference to origen.version, how would I do that?

1

There are 1 answers

0
coreyeng On BEST ANSWER

This can be done using Jinja and some of the context provided by default. The entire origen module is available, so {{ origen.version }} in any RST file, but is also not in a .. raw block, should do it.

You can stick this in a code block as well: ``{{ origen.version }}`` to get something like:

enter image description here

(this is still using the old styling. It'll update with the new styling when available)

I realize the Jinja context is omitted in the documentation. I opened an ticket on O2 to acknowledge some of the documentation lapses.

Thanks!