Skip to content

Commit

Permalink
fix: meta 4
Browse files Browse the repository at this point in the history
  • Loading branch information
mrskiro committed Dec 31, 2023
1 parent 49e1cfa commit 09ad94a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Binary file added public/assets/mrskiro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 9 additions & 8 deletions src/lib/meta/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ type Props = {
}

export const Meta = (props: Props) => {
const og = `https://og-image-eta-sable.vercel.app/${encodeURIComponent(
props.title
)}`
// const og = `https://og-image-eta-sable.vercel.app/${encodeURIComponent(
// props.title
// )}`

const og = "https://mrskiro.dev/assets/mrskiro.png"

const router = useRouter()
const url = `https://mrskiro.dev${router.asPath}`
Expand All @@ -22,25 +24,24 @@ export const Meta = (props: Props) => {
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text x=%2250%%22 y=%2250%%22 style=%22dominant-baseline:central;text-anchor:middle;font-size:90px;%22>🟣</text></svg>"
/>
<link rel="canonical" href={url} />

{/* TODO: envに移動 */}
<title>{`${props.title} | mrskiro.dev`}</title>

{props.description && (
<meta name="description" content={props.description} />
)}

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={props.title} />
<meta name="twitter:image" content={og} />
<meta name="twitter:card" content="summary" />

<meta property="og:url" content={url} />
<meta property="og:title" content={props.title} />
<meta property="og:type" content={props.ogType} />
<meta property="og:site_name" content="mrskiro.dev" />

<meta property="og:image" content={og} />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
{/* <meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" /> */}
</Head>
)
}

1 comment on commit 09ad94a

@vercel
Copy link

@vercel vercel bot commented on 09ad94a Dec 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mrskiro – ./

mrskiro-git-main-mrskiro.vercel.app
mrskiro-mrskiro.vercel.app
www.mrskiro.dev
mrskiro.dev

Please sign in to comment.