Skip to content

Support nested attributes #158

@nipafx

Description

@nipafx

Problem

As it stands, to define nested YAML with Asciidoc attributes requires "inline YAML". E.g.:

header:
  color: black
  image: url
:page-header: { color: black, image: url }

This has several disadvantages:

  • the syntax is cumbersome (especially when nested deeper) and easy to get wrong
  • it mixes Asciidoc attributes (with two colons) and YAML hashes (single colon)
  • the parsed attribute replaces any existing value

For the latter consider the case that header/color was already defined (e.g. in _config.yml) and the document contains this:

:page-header: { image: url }

This unsets header/color, which is neither expected nor desired (typically).

Acceptance

A great way to fix this would be a syntax that makes it easy and natural to define nested attributes in pure Asciidoc. That should fix the first two problems and completely circumvent the third.

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