Summary
The publish list in .doorstop.yml currently only supports simple attribute names (strings). When a published attribute contains a list of dictionaries (structured attribute), Doorstop dumps the raw Python object representation, which renders incorrectly in HTML output.
Proposed Enhancement
Extend the publish entry format to allow selecting specific sub-attributes of structured attributes, including an option to render them as hyperlinks.
Example of a structured extended attribute:
# Item file (e.g. SRS-001.yml)
spec-refs-from:
- file: specs/login.md
section: "3.1 Login Process"
anchor: 31-login-process
url: https://gitlab.com/group/project/-/blob/main/specs/login.md#31-login-process
Without this feature, publishing spec-refs-from renders as a raw Python object dump. With this feature, specific sub-attributes can be selected for clean output.
New syntax:
attributes:
publish:
- simple-attribute # existing behavior – unchanged
- attr: spec-refs-from # structured attribute
fields:
- url: section # {url_key: label_key} → rendered as hyperlink
Behavior
fields entry |
Result |
{url_key: label_key} |
<a href="{url}">{label}</a> |
fieldname |
plain text value |
Multiple list entries are separated by <br> in the output.
Backward Compatibility
Fully backward compatible. All existing string entries in publish behave exactly as before.
Summary
The
publishlist in.doorstop.ymlcurrently only supports simple attribute names (strings). When a published attribute contains a list of dictionaries (structured attribute), Doorstop dumps the raw Python object representation, which renders incorrectly in HTML output.Proposed Enhancement
Extend the
publishentry format to allow selecting specific sub-attributes of structured attributes, including an option to render them as hyperlinks.Example of a structured extended attribute:
Without this feature, publishing
spec-refs-fromrenders as a raw Python object dump. With this feature, specific sub-attributes can be selected for clean output.New syntax:
Behavior
fieldsentry{url_key: label_key}<a href="{url}">{label}</a>fieldnameMultiple list entries are separated by
<br>in the output.Backward Compatibility
Fully backward compatible. All existing string entries in
publishbehave exactly as before.