Skip to content

Commit

Permalink
Merge pull request #38 from tatsutakein-jp/feature/GH-37
Browse files Browse the repository at this point in the history
feat: ogp などの情報を追加
  • Loading branch information
tatsutakein authored Jul 4, 2024
2 parents 32f7d5b + d08cf7f commit a20ed60
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
Binary file added public/ogp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Allow: /

Sitemap: https://asis.quest/sitemap-index.xml
14 changes: 13 additions & 1 deletion src/components/MainHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,28 @@ interface Props {
}
const { title = 'ASIS', description = 'The quest to live life as it is' } = Astro.props
const canonicalURL = new URL(Astro.url.pathname, Astro.site)
const socialImageURL = new URL('/ogp.png', Astro.url)
---

<meta charset="UTF-8"/>
<meta name="description" property="og:description" content={description}/>
<meta name="description" content={description}/>
<meta name="viewport" content="width=device-width"/>
<link rel="sitemap" href="/sitemap-index.xml" />
<meta name="generator" content={Astro.generator}/>
<title>{title}</title>

<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
<link rel="canonical" href={canonicalURL} />
<meta property="og:title" content={title} />
<meta property="og:type" content="website" />
<meta property="og:image" content={socialImageURL} />
<meta property="og:url" content={canonicalURL} />
<meta property="og:description" content={description} />
<meta property="og:site_name" content="ASIS" />
<meta name="twitter:card" content="summary_large_image" />

<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
<link
Expand Down

0 comments on commit a20ed60

Please sign in to comment.