Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
Separate head meta tags per page
Browse files Browse the repository at this point in the history
  • Loading branch information
paced committed Sep 28, 2024
1 parent cdef5bf commit 5916e6f
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 17 deletions.
16 changes: 0 additions & 16 deletions pages/+Head.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
import { DEFAULT_DESCRIPTION } from "../data/constants.ts";

export default function Head() {
return (
<>
<meta property="og:title" content="Design Refresh '22" />
<meta name="twitter:title" content="Design Refresh '22" />

<link rel="canonical" href="https://refresh.fiveclawd.com" />
<meta property="og:url" content="https://refresh.fiveclawd.com" />

<meta property="og:image" content="https://refresh.fiveclawd.com/img/meta.png" />
<meta name="twitter:image" content="https://refresh.fiveclawd.com/img/meta.png" />

<meta name="description" content={DEFAULT_DESCRIPTION} />
<meta property="og:description" content={DEFAULT_DESCRIPTION} />
<meta name="twitter:description" content={DEFAULT_DESCRIPTION} />

<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@fiveclawd" />

<meta name="theme-color" content="#7C7CE0" />
</>
);
Expand Down
17 changes: 17 additions & 0 deletions pages/about/+Head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { DEFAULT_DESCRIPTION } from "../../data/constants.ts";

export default function Head() {
return (
<>
<meta property="og:title" content="About | Design Refresh '22" />
<meta name="twitter:title" content="About | Design Refresh '22" />

<meta property="og:image" content="https://refresh.fiveclawd.com/img/meta.png" />
<meta name="twitter:image" content="https://refresh.fiveclawd.com/img/meta.png" />

<meta name="description" content={DEFAULT_DESCRIPTION} />
<meta property="og:description" content={DEFAULT_DESCRIPTION} />
<meta name="twitter:description" content={DEFAULT_DESCRIPTION} />
</>
);
}
17 changes: 17 additions & 0 deletions pages/artists/+Head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { DEFAULT_DESCRIPTION } from "../../data/constants.ts";

export default function Head() {
return (
<>
<meta property="og:title" content="Artists | Design Refresh '22" />
<meta name="twitter:title" content="Artists | Design Refresh '22" />

<meta property="og:image" content="https://refresh.fiveclawd.com/img/meta.png" />
<meta name="twitter:image" content="https://refresh.fiveclawd.com/img/meta.png" />

<meta name="description" content={DEFAULT_DESCRIPTION} />
<meta property="og:description" content={DEFAULT_DESCRIPTION} />
<meta name="twitter:description" content={DEFAULT_DESCRIPTION} />
</>
);
}
17 changes: 17 additions & 0 deletions pages/index/+Head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { DEFAULT_DESCRIPTION } from "../../data/constants.ts";

export default function Head() {
return (
<>
<meta property="og:title" content="Gallery | Design Refresh '22" />
<meta name="twitter:title" content="Gallery | Design Refresh '22" />

<meta property="og:image" content="https://refresh.fiveclawd.com/img/meta.png" />
<meta name="twitter:image" content="https://refresh.fiveclawd.com/img/meta.png" />

<meta name="description" content={DEFAULT_DESCRIPTION} />
<meta property="og:description" content={DEFAULT_DESCRIPTION} />
<meta name="twitter:description" content={DEFAULT_DESCRIPTION} />
</>
);
}
17 changes: 17 additions & 0 deletions pages/privacy/+Head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { DEFAULT_DESCRIPTION } from "../../data/constants.ts";

export default function Head() {
return (
<>
<meta property="og:title" content="Privacy | Design Refresh '22" />
<meta name="twitter:title" content="Privacy | Design Refresh '22" />

<meta property="og:image" content="https://refresh.fiveclawd.com/img/meta.png" />
<meta name="twitter:image" content="https://refresh.fiveclawd.com/img/meta.png" />

<meta name="description" content={DEFAULT_DESCRIPTION} />
<meta property="og:description" content={DEFAULT_DESCRIPTION} />
<meta name="twitter:description" content={DEFAULT_DESCRIPTION} />
</>
);
}
17 changes: 17 additions & 0 deletions pages/terms/+Head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { DEFAULT_DESCRIPTION } from "../../data/constants.ts";

export default function Head() {
return (
<>
<meta property="og:title" content="Terms | Design Refresh '22" />
<meta name="twitter:title" content="Terms | Design Refresh '22" />

<meta property="og:image" content="https://refresh.fiveclawd.com/img/meta.png" />
<meta name="twitter:image" content="https://refresh.fiveclawd.com/img/meta.png" />

<meta name="description" content={DEFAULT_DESCRIPTION} />
<meta property="og:description" content={DEFAULT_DESCRIPTION} />
<meta name="twitter:description" content={DEFAULT_DESCRIPTION} />
</>
);
}
17 changes: 17 additions & 0 deletions pages/weeks/+Head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { DEFAULT_DESCRIPTION } from "../../data/constants.ts";

export default function Head() {
return (
<>
<meta property="og:title" content="Weeks | Design Refresh '22" />
<meta name="twitter:title" content="Weeks | Design Refresh '22" />

<meta property="og:image" content="https://refresh.fiveclawd.com/img/meta.png" />
<meta name="twitter:image" content="https://refresh.fiveclawd.com/img/meta.png" />

<meta name="description" content={DEFAULT_DESCRIPTION} />
<meta property="og:description" content={DEFAULT_DESCRIPTION} />
<meta name="twitter:description" content={DEFAULT_DESCRIPTION} />
</>
);
}
2 changes: 1 addition & 1 deletion pages/works/@id/+Head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function Head() {

const workTitle = work?.title || "Untitled";
const artistName = artist?.name || work?.firstSeenArtistInfo?.name || "Unknown";
const description = `A piece by ${artistName} for the '22 Design Refresh... ${work?.description.replace(/\n/, " ")}.`;
const description = `A piece by ${artistName} for the '22 Design Refresh... ${work?.description.replace(/\n/, " ")}`;

return (
<>
Expand Down

0 comments on commit 5916e6f

Please sign in to comment.