Skip to content

Content with kind: page cannot have name field #369

@gadenbuie

Description

@gadenbuie

If you try to include a page with a name field, e.g.

quartodoc:
  sections:
    - title: Brand Components
      desc: Individual brand components.
      contents:
        - kind: page
          path: brand-meta
          name: Metadata
          contents: 
            - meta.BrandMeta

You'll get a confusing error

ValueError: Configuration error for YAML:
 - unexpected value; permitted: 'auto': `kind` for element 0 in the list for `contents` located in element 0 in the list for `sections`

The missing context is that the presence of name: Metadata is driving the kind: auto requirement. The correct syntax appears to be

quartodoc:
  sections:
    - title: Brand Components
      desc: Individual brand components.
      contents:
        - kind: page
          path: brand-meta
          summary:
            name: Metadata
          contents: 
            - meta.BrandMeta

but I didn't see that syntax anywhere on https://machow.github.io/quartodoc/get-started/basic-content.html#documenting-source-files-that-are-not-a-package (I found it by searching GitHub for other kind: page examples).

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