Skip to content

Commit

Permalink
Dashboard articles template + query + rewrite (#997)
Browse files Browse the repository at this point in the history
* create MSCAD articles query

* create MSCAD article template

* setup MSCAD article path rewrites

* fix query in MSCAD articles getStaticPaths
  • Loading branch information
will0684 authored Apr 17, 2024
1 parent f36b214 commit 818707e
Show file tree
Hide file tree
Showing 3 changed files with 481 additions and 0 deletions.
342 changes: 342 additions & 0 deletions graphql/queries/getMSCADashboardArticles.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,342 @@
query getMSCADashboardArticles {
sclabsPageV1List(
filter: {
scContentType: {
_expressions: [
{
value: "gc:content-types/promotional-material-featured-articles"
_operator: EQUALS
}
]
}
_path: {
_expressions: [
{
value: "/content/dam/decd-endc/content-fragments/sclabs/pages/projects/client-hub/project-updates/"
_operator: STARTS_WITH
}
]
}
}
) {
items {
_path
scId
scPageNameEn
scPageNameFr
scTitleEn
scTitleFr
scShortTitleEn
scShortTitleFr
scBreadcrumbParentPages {
... on SclabsPageV1Model {
scTitleEn
scTitleFr
scPageNameEn
scPageNameFr
}
}
scSubject
scKeywordsEn
scKeywordsFr
scContentType
scOwner
scDateModifiedOverwrite
scAudience
scRegion
scSocialMediaImageEn {
... on ImageRef {
_path
_publishUrl
width
height
}
... on DocumentRef {
_path
_publishUrl
}
}
scSocialMediaImageFr {
... on ImageRef {
_path
_publishUrl
width
height
}
... on DocumentRef {
_path
_publishUrl
}
}
scSocialMediaImageAltTextEn
scSocialMediaImageAltTextFr
scNoIndex
scNoFollow
scFragments {
... on SclabsCompContentV1Model {
_model {
... on ModelInfo {
title
}
}
scId
scLabContent {
... on SclabsContentV1Model {
scContentEn {
json
}
scContentFr {
json
}
}
}
scLabLayout
}
... on SclabsCompContentImageV1Model {
_model {
... on ModelInfo {
title
}
}
scId
scLabContent {
scId
scContentEn {
json
}
scContentFr {
json
}
}
scLabImage {
... on SclabsImageV1Model {
scId
scImageEn {
... on ImageRef {
_publishUrl
width
height
}
... on DocumentRef {
_publishUrl
}
}
scImageFr {
... on ImageRef {
_publishUrl
width
height
}
... on DocumentRef {
_publishUrl
}
}
scImageMobileEn {
... on ImageRef {
_publishUrl
width
height
}
... on DocumentRef {
_publishUrl
}
}
scImageMobileFr {
... on ImageRef {
_publishUrl
width
height
}
... on DocumentRef {
_publishUrl
}
}
scImageAltTextEn
scImageAltTextFr
scImageCaptionEn {
json
}
scImageCaptionFr {
json
}
}
}
scLabLayout
}
... on SclabsContentV1Model {
_model {
... on ModelInfo {
title
}
}
_path
scId
scContentEn {
json
}
scContentFr {
json
}
}
... on SclabsImageV1Model {
_model {
... on ModelInfo {
title
}
}
_path
scId
scImageEn {
... on ImageRef {
_publishUrl
width
height
}
... on DocumentRef {
_publishUrl
}
}
scImageFr {
... on ImageRef {
_publishUrl
width
height
}
... on DocumentRef {
_publishUrl
}
}
scImageMobileEn {
... on ImageRef {
_publishUrl
width
height
}
... on DocumentRef {
_publishUrl
}
}
scImageMobileFr {
... on ImageRef {
_publishUrl
width
height
}
... on DocumentRef {
_publishUrl
}
}
scImageAltTextEn
scImageAltTextFr
scImageCaptionEn {
json
}
scImageCaptionFr {
json
}
scLongDescHeadingEn
scLongDescHeadingFr
scLongDescEn {
json
}
scLongDescFr {
json
}
}
... on SclabsButtonV1Model {
_model {
... on ModelInfo {
title
}
}
scId
scTitleEn
scTitleFr
scDestinationURLEn
scDestinationURLFr
scButtonType
}
... on SclabsFeatureV1Model {
_model {
... on ModelInfo {
title
}
}
scId
scTitleEn
scTitleFr
scContentEn {
json
}
scContentFr {
json
}
scImageEn {
... on ImageRef {
_publishUrl
width
height
}
... on DocumentRef {
_publishUrl
}
}
scImageAltTextEn
scImageFr {
... on ImageRef {
_publishUrl
width
height
}
... on DocumentRef {
_publishUrl
}
}
scImageAltTextFr
scFragments {
... on SclabsAlertV1Model {
_path
scId
scTitleEn
scTitleFr
scContentEn {
json
}
scContentFr {
json
}
scAlertType
}
}
scImageAltTextEn
scImageAltTextFr
scLabsButton {
scId
scTitleEn
scTitleFr
scDestinationURLEn
scDestinationURLFr
scButtonType
}
}
... on TooltipV1Model {
_model {
... on ModelInfo {
title
}
}
_path
scId
scTitleEn
scTitleFr
scContentEn {
json
}
scContentFr {
json
}
}
}
}
}
}
4 changes: 4 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ const REWRITES = [
source: "/projets/tableau-de-bord",
destination: "/projects/dashboard",
},
{
source: "/projets/tableau-de-bord/:slug",
destination: "/projects/dashboard/:slug",
},
{
source: "/projets/navigateur-prestations",
destination: "/projects/benefits-navigator",
Expand Down
Loading

0 comments on commit 818707e

Please sign in to comment.