Skip to content

Commit

Permalink
core: include metada & og-image
Browse files Browse the repository at this point in the history
  • Loading branch information
joseglego committed Feb 26, 2024
1 parent 6f268b7 commit 6a6516a
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
Binary file added public/images/og-image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ import { Title } from "@/components/Icons/Title";
import { Link } from "@/components/Link";
import { Particles } from "@/components/Particles";
import { data, footer, links } from "@/lib/data";
import { getMetaData, getViewports } from "@/lib/metadata";
import { theme } from "@/lib/theme";
import { cn } from "@/lib/utils";

export const generateMetadata = getMetaData;

export const generateViewport = getViewports;

export default function Home() {
return (
<>
Expand Down
54 changes: 54 additions & 0 deletions src/lib/metadata.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
export const getMetaData = () => {
const url = "https://jsconf.cl/";
const title = "JSConf Chile | Conferencia de Javascript en Santiago Chile";
const description =
"JSConf Chile | Revive los momentos de JSConf 2023, revisa las fotos y la página. Mantente atento a la próxima edición. Conoce más del equipo organizador.";
const images = ["/images/og-image.jpg"];

return {
metadataBase: new URL(url),
title,
description,

keywords: [
"TechTon",
"JSChile",
"Comunidades",
"Streaming",
"Donación",
"Bomberos de Chile",
],
authors: [{ name: "JSChile", url }],

// OpenGraph
openGraph: {
type: "website",
url,
title,
description,
images,
},

// Twitter
twitter: {
card: "summary_large_image",
title,
description,
images,
},
};
};

export const getViewports = () => {
return {
themeColor: [
{ media: "(prefers-color-scheme: light)", color: "#4ac9b4" },
{ media: "(prefers-color-scheme: dark)", color: "#4ac9b4" },
],
viewport: {
width: "device-width",
initialScale: 1,
maximumScale: 1,
},
};
};

0 comments on commit 6a6516a

Please sign in to comment.