Skip to content

Allow processing global metadata with the keys option #68

@webketje

Description

@webketje

Currently the keys option is an array that will check all file keys.
There are use cases where it is desirable to be able to format global metadata (for example when fetching rich text translations from a third party provider). A flexible implementation could change the keys option to accept both an array and an object. When an array is specified it is remapped to keys.files for backwards-compatibility, and when an object is defined both are allowed. In a future version the current keys: Array signature can be removed

EG.

ms.use(markdown({
  wildcard: true,
  keys: {
    global: ['labels.*'],
    files: ['faq.*',- 'description']
  },
  globalRefs: './global-refs.md'
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions