Skip to content

Support global variables in nunjucks format #319

@damithc

Description

@damithc

v1.8.4

Current: markbind variables are declared in the variables.md as the body of a div element and can be accessed globally. This has some downsides:

  • Certain html fragments cannot be used as a variable value. e.g., <div class="indented"> cannot be used as a variable value because it will break the nested div structure of the page due to missing </div> tag.
  • Only flat string values can be a variable value. It may be useful to have more structured data values e.g., arrays of strings

Suggested: provide a way to declare variables in an alternate syntax that allows the above. We can use nunjucks variables syntax. However, markbind should raise such variables into the global scope, similar to normal markbind variables.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions