social share tags

This commit is contained in:
texm
2023-05-13 12:55:39 +08:00
parent 7fb9e78b5e
commit 27d40f5498
4 changed files with 24 additions and 5 deletions

View File

@@ -0,0 +1,13 @@
<script>
export let title = "";
</script>
<svelte:head>
<meta property="og:title" content={title}>
<meta property="og:type" content="website" />
<meta property="og:image" content="https://shokku.dev/share-card.png">
<meta name="twitter:card" content="https://shokku.dev/share-card.png">
<meta property="og:description" content="Free and open source interface for the Dokku PaaS">
<meta name="twitter:image:alt" content="Shokku Logo">
</svelte:head>

View File

@@ -1,4 +1,5 @@
<script>
import SocialShareMeta from "$components/SocialShareMeta.svelte";
import Navbar from "$components/Navbar.svelte";
import Hero from "./Hero.svelte";
import Features from "./Features.svelte";
@@ -8,6 +9,7 @@
<svelte:head>
<title>Shokku</title>
<SocialShareMeta title="Shokku" />
</svelte:head>
<div class="flex flex-col bg-base-300">

View File

@@ -3,6 +3,7 @@
import {page} from "$app/stores";
import Navbar from "$components/Navbar.svelte";
import ProgressButtons from "./ProgressButtons.svelte";
import SocialShareMeta from "$components/SocialShareMeta.svelte";
const sidebarPages = [
{section: "Getting Started", ref: "/docs/intro", label: "Introduction"},
@@ -22,10 +23,13 @@
prevPage = (currentPage > 0) ? sidebarPages[currentPage - 1] : null;
nextPage = (currentPage < sidebarPages.length - 1) ? sidebarPages[currentPage + 1] : null;
}
$: pageTitle = `Shokku Docs - ${sidebarPages[currentPage].label}`;
</script>
<svelte:head>
<title>Shokku Docs - {sidebarPages[currentPage].label}</title>
<title>{pageTitle}</title>
<SocialShareMeta title={pageTitle} />
</svelte:head>
<div class="flex flex-col h-screen">

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB