Skip to content

Commit

Permalink
Add SITE_DESCRIPTION
Browse files Browse the repository at this point in the history
  • Loading branch information
5ma committed Jul 31, 2024
1 parent 6d6b0bf commit 5551660
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ export const SITE_TITLE = 'SHIFTBRAIN Playground'
export const SITE_LANG = 'ja'
export const SITE_REGION = 'JP'
export const SITE_TWITTER_ID = 'SHIFTBRAIN'
export const SITE_DESCRIPTION =
'SHIFTBRAIN Playgroundは、技術力向上のために日々行われている実験や試作を公開するサイトです。'

export const authors = ['kaminaly', 'heo', 'ikurumi', 'sato', 'kiyose', 'komakine'] as const
6 changes: 3 additions & 3 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import defaultOpenGraphImage from '../assets/opengraph-image.png'
import { SITE_LANG, SITE_REGION, SITE_TITLE, SITE_TWITTER_ID } from '../consts'
import { SITE_LANG, SITE_REGION, SITE_TITLE, SITE_TWITTER_ID, SITE_DESCRIPTION } from '../consts'
import Header from './Header.astro'
interface Props {
Expand Down Expand Up @@ -42,7 +42,7 @@ const canonicalURL: URL = new URL(Astro.url.pathname, Astro.site)
gtag('config', 'G-NZ6C341T6V')
</script>

{description && <meta name="description" content={description} />}
<meta name="description" content={description || SITE_DESCRIPTION} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content={`@${SITE_TWITTER_ID}`} />
<meta name="twitter:title" content={pageTitle} />
Expand All @@ -51,7 +51,7 @@ const canonicalURL: URL = new URL(Astro.url.pathname, Astro.site)
<meta property="og:type" content="website" />
<meta property="og:image" content={resolvedOgImage} />
{canonicalURL && <meta property="og:url" content={canonicalURL} />}
{description && <meta property="og:description" content={description} />}
<meta property="og:description" content={description || SITE_DESCRIPTION} />
<meta property="og:site_name" content={SITE_TITLE} />
<meta property="og:locale" content={`${SITE_LANG}_${SITE_REGION}`} />

Expand Down

0 comments on commit 5551660

Please sign in to comment.