Motivation
The current gen-apidocs markdown backend emits API reference pages as HTML tables. This works, but couples presentation to content.
A shortcode-based approach would separate structured data (field metadata) from presentation (template rendering):
{{< api-reference-subfield >}}
---
apiKind: Deployment
topLevelFieldName: spec
childFieldName: selector
fieldType: LabelSelector
fieldRequired: true
---
Field description here.
{{< /api-reference-subfield >}}
Benefits:
- Structured data accessible to Hugo templates (enables different rendering modes from the same source)
- Presentation changes via one template, not N pages
- Responsive layouts per device via Hugo template logic
Prerequisites
- New shortcodes defined in k/website: api-reference-toplevel, api-reference-description, api-reference-subfield,
- gen-apidocs markdown backend updated to emit these instead of
- Cross-repo coordination (design RFC → shortcodes land in k/website → gen-apidocs output updated)
Related
Motivation
The current gen-apidocs markdown backend emits API reference pages as HTML tables. This works, but couples presentation to content.
A shortcode-based approach would separate structured data (field metadata) from presentation (template rendering):
Benefits:
Prerequisites
Related