-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #684 from AZBL/AZBL/588-improve-social-media-thumb…
…nail-and-title Azbl/588 improve social media thumbnail and title
- Loading branch information
Showing
12 changed files
with
170 additions
and
30 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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,38 @@ | ||
import type { Metadata } from "next"; | ||
import { metadata as globalMetadata } from "../app/layout"; | ||
|
||
//imageUrl and imageAlt included to allow different images to be used for different pages in the future if desired | ||
|
||
export function generateMetadata({ | ||
title, | ||
description, | ||
url, | ||
imageUrl, | ||
imageAlt, | ||
}: { | ||
title: string; | ||
description?: string; | ||
url: string; | ||
imageUrl?: string; | ||
imageAlt?: string; | ||
}): Metadata { | ||
return { | ||
...globalMetadata, | ||
title, | ||
description, | ||
openGraph: { | ||
...globalMetadata.openGraph, | ||
url, | ||
title: `${title} - Clean & Green Philly`, | ||
description, | ||
images: [ | ||
{ | ||
url: imageUrl || "/thumbnail.png", | ||
width: 1200, | ||
height: 630, | ||
alt: imageAlt || "Clean & Green Philly", | ||
}, | ||
], | ||
}, | ||
}; | ||
} |