-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Set page titles in OC app (#2182)
* Add SEO data to the team page * Add SEO metadata to the About page * Add SEO metadata to the challenge profile page * Set SEO metadata to the challenge profile page * Add SEO metadata to the challenge search page * Add SEO metadata to the org search page
- Loading branch information
1 parent
8395cb1
commit 31b4941
Showing
12 changed files
with
97 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { getDefaultSeoData } from '@sagebionetworks/openchallenges/util'; | ||
import { SeoData } from '@sagebionetworks/shared/util'; | ||
|
||
export const getSeoData = (): SeoData => { | ||
// shallow merge | ||
return Object.assign(getDefaultSeoData(), { | ||
title: 'About OpenChallenges', | ||
} as SeoData); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
libs/openchallenges/challenge-search/src/lib/challenge-search-seo-data.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { getDefaultSeoData } from '@sagebionetworks/openchallenges/util'; | ||
import { SeoData } from '@sagebionetworks/shared/util'; | ||
|
||
export const getSeoData = (): SeoData => { | ||
// shallow merge | ||
return Object.assign(getDefaultSeoData(), { | ||
title: 'Explore Challenges | OpenChallenges', | ||
} as SeoData); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
libs/openchallenges/challenge/src/lib/challenge-seo-data.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Challenge } from '@sagebionetworks/openchallenges/api-client-angular'; | ||
import { SeoData } from '@sagebionetworks/shared/util'; | ||
import { getDefaultSeoData } from '@sagebionetworks/openchallenges/util'; | ||
|
||
export const getSeoData = (challenge: Challenge): SeoData => { | ||
const defaultSeoData = getDefaultSeoData(); | ||
// shallow merge | ||
return Object.assign(defaultSeoData, { | ||
title: `${challenge.name} | OpenChallenges`, | ||
description: challenge.description, | ||
} as SeoData); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
libs/openchallenges/org-search/src/lib/org-search-seo-data.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { getDefaultSeoData } from '@sagebionetworks/openchallenges/util'; | ||
import { SeoData } from '@sagebionetworks/shared/util'; | ||
|
||
export const getSeoData = (): SeoData => { | ||
// shallow merge | ||
return Object.assign(getDefaultSeoData(), { | ||
title: 'Discover Organizations | OpenChallenges', | ||
} as SeoData); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { getDefaultSeoData } from '@sagebionetworks/openchallenges/util'; | ||
import { SeoData } from '@sagebionetworks/shared/util'; | ||
|
||
export const getSeoData = (): SeoData => { | ||
// shallow merge | ||
return Object.assign(getDefaultSeoData(), { | ||
title: 'The OpenChallenges Team', | ||
description: | ||
"We're smart, we're hard-working, and we love a good challenge.", | ||
} as SeoData); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters