Skip to content

audience metadata component - #5

Merged
beforan merged 5 commits into
mainfrom
audiences
Jul 24, 2026
Merged

audience metadata component#5
beforan merged 5 commits into
mainfrom
audiences

Conversation

@beforan

@beforan beforan commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
✨ Feature

PR Description

This PR adds the "Target Audience" component for Doc Metadata:

  • Added to the DocMetadata component
  • Only renders if audiences metadata present in frontmatter with at least one valid audience key

Usage

Valid audience keys are defined in the component in a lookup dictionary. Currently they are:

  • tre-operator
  • federation-operator
  • researcher
  • integrator
  • contributor
  • everyone

These values go in YAML frontmatter as either a single string (for one audience only) or an array:

# string
audiences: tre-operator # valid single audience

# inline array example 1
audiences: [tre-operator] # valid single audience

# inline array example 2
audiences: [tre-operator, researcher]

# array example 1
audiences:
  - tre-operator # valid single audience

# array example 2
audiences:
  - tre-operator
  - researcher

# invalid keys - this metadata will render nothing
audiences: [treoperator, my-made-up-audience]

# invalid keys - this metadata will render only the valid key for Researcher
audiences: [researcher, my-made-up-audience]

Screenshots

image image image

@AndrewThien

Copy link
Copy Markdown
Collaborator

If a page is open to everybody as readers/audience, what tag should I put?

@beforan

beforan commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

If a page is open to everybody as readers/audience, what tag should I put?

do you think we should add everyone, or all as a key, so it renders "Everyone"? seems silly to list all of the audiences, for sure...

@beforan
beforan merged commit e1ed810 into main Jul 24, 2026
1 check passed
@beforan
beforan deleted the audiences branch July 24, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants