Skip to content

Commit

Permalink
Merge pull request #11445 from wellcomecollection/add-explore-link
Browse files Browse the repository at this point in the history
Add explore more document link on stories
  • Loading branch information
rcantin-w authored Dec 17, 2024
2 parents 12386dd + 32d8e4e commit 5d7d3fb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
8 changes: 8 additions & 0 deletions common/customtypes/articles/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@
}
},
"Content relationships": {
"exploreMoreDocument": {
"type": "Link",
"config": {
"label": "\"Explore more\" document",
"select": "document",
"customtypes": ["articles", "exhibitions"]
}
},
"series": {
"type": "Group",
"fieldset": "Series",
Expand Down
15 changes: 14 additions & 1 deletion common/prismicio-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,27 @@ interface ArticlesDocumentData {
* - **Documentation**: https://prismic.io/docs/field#rich-text-title
*/;
metadataDescription: prismic.RichTextField /**
* "Explore more" document field in *Story*
*
* - **Field Type**: Content Relationship
* - **Placeholder**: *None*
* - **API ID Path**: articles.exploreMoreDocument
* - **Tab**: Content relationships
* - **Documentation**: https://prismic.io/docs/field#link-content-relationship
*/;
exploreMoreDocument: prismic.ContentRelationshipField<
'articles' | 'exhibitions'
>;

/**
* Series field in *Story*
*
* - **Field Type**: Group
* - **Placeholder**: *None*
* - **API ID Path**: articles.series[]
* - **Tab**: Content relationships
* - **Documentation**: https://prismic.io/docs/field#group
*/;
*/
series: prismic.GroupField<Simplify<ArticlesDocumentDataSeriesItem>>;

/**
Expand Down
1 change: 1 addition & 0 deletions playwright/test/mocks/one-schedule-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ export const oneScheduleItem: prismic.Query<RawArticlesDocument> = {
},
},
],
exploreMoreDocument: { link_type: 'Document' },
seasons: [
{
season: {
Expand Down

0 comments on commit 5d7d3fb

Please sign in to comment.