Skip to content

Docs claim app.yaml can define collections — source only processes site.yaml collections #22

@tormnator

Description

@tormnator

configuration.md states that app.yaml can define "Additional collections to site collections" and shows a collections: block as a valid app-level setting.

However, in packages/nuekit/src/asset.js the collection-building step reads only from conf (the site-level config object), not from the merged app config:

const colls = conf.collections   // site-level only
if (colls) {
  Object.assign(ret, await getCollections(toAssets(md_paths), colls))
}

App-level app.yaml files are loaded as plain data (app_data) and merged into the template context, but the getCollections() call never sees them. Collections defined in app.yaml are silently ignored — no error, no warning.

Impact

Any project that defines collections in app.yaml following the documented pattern will get an empty collection in templates with no indication of what went wrong.

Resolution options

  1. Fix the implementation — merge app-level collections config into the collection-building step alongside site-level collections.
  2. Fix the docs — remove the collections: example from the app.yaml section and note that collections must be defined in site.yaml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions