Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #570 from B77Mills/AddLabelsToContext
Browse files Browse the repository at this point in the history
Add content.labels to content context.
  • Loading branch information
brandonbk authored Feb 15, 2023
2 parents 5d37bcc + 119137a commit 8d2b425
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/marko-web-gtm/components/context/content.marko
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ fragment ContentContextFragment on Content {
id
type
name
labels
siteContext {
path
}
Expand Down
1 change: 1 addition & 0 deletions packages/marko-web-gtm/context/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = ({ obj, req }) => {
type: content.type,
name: content.name,
published: content.published ? new Date(content.published).toISOString() : undefined,
labels: getAsArray(content, 'labels'),
},
created_by: {
id: createdBy.id,
Expand Down

0 comments on commit 8d2b425

Please sign in to comment.