Skip to content

Commit

Permalink
Fix meta descriptions (#9399)
Browse files Browse the repository at this point in the history
* Fix meta desc for cert pages and update meta desc for release note pages

* Apply Prettier formatting

* use node.excerpt

* pull excerpt from gatsby and use that to create meta description

- adds `excerpt` to the GraphQL query
- uses this excerpt to create a contextual meta description
- falls back to "A summary of changes to the Pantheon Platform" if excerpt could not be extracted.

* Apply Prettier formatting

* Update source/content/certification/study-guide-cms/10-custom-upstreams.md

Co-authored-by: Steve Persch <[email protected]>

* Update source/content/certification/study-guide-cms/09-automate.md

Co-authored-by: Steve Persch <[email protected]>

* Update source/content/certification/study-guide-cms/07-people.md

Co-authored-by: Steve Persch <[email protected]>

* Update source/content/certification/study-guide-cms/08-extend.md

Co-authored-by: Steve Persch <[email protected]>

* Update source/content/certification/study-guide-cms/06-deploy.md

Co-authored-by: Steve Persch <[email protected]>

* Update source/content/certification/study-guide-cms/05-cms.md

Co-authored-by: Steve Persch <[email protected]>

* Update source/content/certification/study-guide-cms/04-cdn.md

Co-authored-by: Steve Persch <[email protected]>

* Update source/content/certification/study-guide-cms/03-create.md

Co-authored-by: Steve Persch <[email protected]>

---------

Co-authored-by: Chris Reynolds <[email protected]>
Co-authored-by: Steve Persch <[email protected]>
  • Loading branch information
3 people authored Feb 4, 2025
1 parent 9d3e33a commit 225d855
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions source/content/certification/study-guide-cms/00-intro.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: WebOps Certification
subtitle: Study Guide Introduction
description: Learn about the three failure modes of website operations.
certificationpage: true
type: certificationpage
layout: certificationpage
Expand Down
1 change: 1 addition & 0 deletions source/content/certification/study-guide-cms/01-webops.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: WebOps Certification
subtitle: "Chapter 1: WebOps"
description: Learn about the principles and benefits of WebOps.
certificationpage: true
showtoc: true
type: certificationpage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: WebOps Certification
subtitle: "Chapter 2: Pantheon Platform"
description: Understand the layers of Pantheon's platform and how it can be used to solve problems using WebOps best practicies.
certificationpage: true
showtoc: true
type: certificationpage
Expand Down
1 change: 1 addition & 0 deletions source/content/certification/study-guide-cms/03-create.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: WebOps Certification
subtitle: "Chapter 3: Site Creation"
description: Learn how to create a site on Pantheon.
certificationpage: true
showtoc: true
type: certificationpage
Expand Down
1 change: 1 addition & 0 deletions source/content/certification/study-guide-cms/04-cdn.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: WebOps Certification
subtitle: "Chapter 4: Content Delivery Network"
description: Pantheon's edge layer increases the speed and scalability of all sites on the platform. The Advanced Global CDN can be customized for tailored usage.
certificationpage: true
type: certificationpage
layout: certificationpage
Expand Down
1 change: 1 addition & 0 deletions source/content/certification/study-guide-cms/05-cms.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: WebOps Certification
subtitle: "Chapter 5: CMS Infrastructure"
description: Pantheon's containerized infrastructure makes CMS applications faster, more scalable, and more secure.
certificationpage: true
type: certificationpage
layout: certificationpage
Expand Down
1 change: 1 addition & 0 deletions source/content/certification/study-guide-cms/06-deploy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: WebOps Certification
subtitle: "Chapter 6: The Deployment Pipeline"
description: Learn about the deployment pipeline for CMS Sites on Pantheon as it relates to code, files, and databases.
certificationpage: true
type: certificationpage
layout: certificationpage
Expand Down
1 change: 1 addition & 0 deletions source/content/certification/study-guide-cms/07-people.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: WebOps Certification
subtitle: "Chapter 7: Connecting People"
description: Learn how to manage teams, workspaces and permissions before connecting DNS.
certificationpage: true
type: certificationpage
layout: certificationpage
Expand Down
1 change: 1 addition & 0 deletions source/content/certification/study-guide-cms/08-extend.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: WebOps Certification
subtitle: "Chapter 8: Extend with CLI and Hooks"
description: "Terminus and Quicksilver can work together to help facilitate complex WebOps workflows"
certificationpage: true
type: certificationpage
layout: certificationpage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: WebOps Certification
subtitle: "Chapter 9: Additional Automation"
description: "Learn how to leverage Integrated Composer and Autopilot"
certificationpage: true
type: certificationpage
layout: certificationpage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: WebOps Certification
subtitle: "Chapter 10: Custom Upstreams"
description: "Understand the relationship between Pantheon’s Core Upstreams, Custom Upstreams, and individual site repositories."
certificationpage: true
type: certificationpage
layout: certificationpage
Expand Down
4 changes: 3 additions & 1 deletion src/templates/certificationpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class CertificationTemplate extends React.Component {
<SEO
slot="seo"
title={node.frontmatter.subtitle + ' | ' + node.frontmatter.title}
description={node.frontmatter.description || node.excerpt}
description={
node.frontmatter.description || node.frontmatter.subtitle
}
authors={node.frontmatter.contributors}
image={'/images/default-thumb-cert.png'}
reviewed={ifCommandsISO}
Expand Down
7 changes: 6 additions & 1 deletion src/templates/releaseNotePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ const containerWidth = 'standard';
class ReleaseNoteTemplate extends React.Component {
render() {
const node = this.props.data.mdx;
const excerptRaw = this.props.data.mdx.excerpt;
const excerpt =
excerptRaw.substring(0, 200).trim() ||
'A summary of changes to the Pantheon Platform';

return (
<Layout containerWidth={containerWidth} excludeSearch footerBorder>
<SEO
title={node.frontmatter.title}
description={node.frontmatter.description || node.excerpt}
description={excerpt}
authors={node.frontmatter.contributors}
image={'/images/default-thumb-changelog.png'}
/>
Expand Down Expand Up @@ -94,6 +98,7 @@ export const pageQuery = graphql`
query ReleaseNoteBySlug($slug: String!) {
mdx(fields: { slug: { eq: $slug } }) {
...theReleaseNoteFields
excerpt
}
}
`;

0 comments on commit 225d855

Please sign in to comment.