Skip to content

Front matter scripts #24

@kmcgrath

Description

@kmcgrath

Allows scripts to be referenced in front matter that set template variables.

For instance, get a list of availability zones to loop through to create a maximum number of subnets.

---
subnets:  
  script: subnets
  args:
    - allAZ 
---

subnets.js would live in a particle directory and would be run when frontmatter is read.

Later in the template

{{#each subnets}}
{{!-- will loop over all available AZs for the region being deployed to --}}
{{/each}}

Things to decide:

How should the frontmatter be formatted for these scripts?

What should the particle name be for these scripts?

How should arguments be passed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions