Skip to content

Commit

Permalink
Add opengraph meta tags
Browse files Browse the repository at this point in the history
  • Loading branch information
sukso96100 authored Jan 4, 2025
1 parent 9e0775b commit e79a171
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Binary file added src/assets/ogimage.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PashupatinathTempleImage from '@assets/pashupatinath_temple.jpg'
import UbuConAsiaCommitteeLogo from "@assets/UbuConAsiaCommittee.svg"
import OSCollectiveLogo from "@assets/oscollective.webp";
import GNOMENepal from "@assets/gnomenepal.svg";

import PreviewImage from "@assets/ogimage.jpeg";
export interface SubMenuItem {
link: string;
label: string;
Expand All @@ -13,6 +13,9 @@ export const WebsiteConfig = {
siteTitle: "UbuCon Asia 2025",
siteDescription: "Kathmandu, Nepal | August 30-31",
faviconPath: UCALogo.src,
openGraph:{
imagePath: PreviewImage.src
},
navigation: [
{
label: "About",
Expand Down
3 changes: 3 additions & 0 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ const { title, description } = Astro.props;
<link rel="icon" type="image/svg" href={WebsiteConfig.faviconPath} />
<meta name="generator" content={Astro.generator} />
<title>{title ? `${title} | ${WebsiteConfig.siteTitle}` : WebsiteConfig.siteTitle}</title>
<meta property="og:title" content={title ? `${title} | ${WebsiteConfig.siteTitle}` : WebsiteConfig.siteTitle} />
<meta property="og:description" content={description ? description : WebsiteConfig.siteDescription}/>
<meta property="og:image" content={WebsiteConfig.openGraph.imagePath} />
</head>
<body>
<slot />
Expand Down

0 comments on commit e79a171

Please sign in to comment.