Skip to content

Consider expanding substitutions to include nested substitutions #761

@firasm

Description

@firasm

Context

As of v0.18 it seems the MyST substitution syntax has been changed and now substitutions must be of type (<class 'str'>, <class 'int'>, <class 'float'>)

Proposal

Would you consider adding nested items to that list?

For example, this no longer works as params is not of type str, int, float

myst:
  substitutions:
    params:
      vars:
        name: Ximena
        title: Smudge

I want to be able to access that variable like this: {{ params.vars.name }}

The reason for this is because that substitution is auto-generated from a dictionary:

{"params": {"vars": {"name": "Ximena", "title": "Smudge}}}

Tasks and updates

Other suggestions on how to get around this issue are welcome, I'll trouble shoot and poke around to see if there's a good resolution with the existing codebase.

Potentially related to #747

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions