Skip to content

Commit

Permalink
Open Graph
Browse files Browse the repository at this point in the history
  • Loading branch information
wilwade committed Feb 29, 2024
1 parent e7946fa commit 8179355
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<link rel="apple-touch-icon" href="%sveltekit.assets%/apple-touch-icon.png" />
<link rel="manifest" href="%sveltekit.assets%/manifest.webmanifest" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="twitter:site" content="@one_frequency" />
<meta property="og:site_name" content="Frequency" />
%sveltekit.head%

<!-- Klaro - make sure the config gets loaded before Klaro -->
Expand Down
23 changes: 23 additions & 0 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { page } from '$app/stores';
import SectionNavigation from '../components/Sections/SectionNavigation.svelte';
import Sections from '../components/Sections/Sections.svelte';
import Section1 from '../components/Sections/Section1.svelte';
Expand Down Expand Up @@ -26,8 +27,30 @@
$: logoHex = logoMap.get(section)?.logo;
$: navColor = logoMap.get(section)?.nav;
$: baseUrl = $page.url.protocol + '//' + $page.url.host;
</script>

<svelte:head>
<meta property="og:title" content="Frequency" />
<meta property="og:url" content={$page.url.toString()} />
<meta
property="og:description"
content="Frequency fuels the Social Web, putting control & data privacy in your hands."
/>
<meta property="og:type" content="website" />
<meta property="og:image" content={`${baseUrl}/og-preview.png`} />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image" content={`${baseUrl}/og-square.png`} />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="1200" />
<meta property="og:image" content={`${baseUrl}/og-thumb.png`} />
<meta property="og:image:width" content="200" />
<meta property="og:image:height" content="200" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content={`${baseUrl}/og-twitter.png`} />
</svelte:head>

<div class="relative lg:max-w-[100vw] xl:max-w-page">
<div class="absolute top-0 z-50 w-full"><Header {logoHex} {navColor} bind:section /></div>
<Sections bind:section sectionCount={5}>
Expand Down
Binary file added static/og-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/og-square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/og-thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/og-twitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8179355

Please sign in to comment.