Skip to content

Emit API reference as structured Hugo shortcodes instead of HTML tables #440

@Caesarsage

Description

@Caesarsage

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions