Skip to content

Pass CLI arguments through to executable documents #101

Description

@taras

Problem

Executable documents cannot receive CLI arguments. xmd run doc.md exposes
no way to pass values into the document, so parameterized tooling cannot be
written as executable markdown — deno task bump <version> had to be a
TypeScript script (scripts/bump-version.ts) instead of a document, breaking
the pattern set by scripts/gen-publish-workflow.md.

Proposal

Forward arguments to the document, e.g. xmd run doc.md -- 0.3.1 --dry-run,
exposed to eval blocks as a binding (args). Design questions: binding name
and shape, frontmatter declaration/validation of expected arguments (the
component inputs schema is a natural fit), and interpolation support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions