From 4919f028c884a041da7ff098abb02389b4eac598 Mon Sep 17 00:00:00 2001
From: 简律纯 <hsiangnianian@outlook.com>
Date: Tue, 18 Apr 2023 03:02:17 +0800
Subject: ✨add envshare docs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 envshare/app/head.tsx | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 envshare/app/head.tsx

(limited to 'envshare/app/head.tsx')

diff --git a/envshare/app/head.tsx b/envshare/app/head.tsx
new file mode 100644
index 0000000..aecaa44
--- /dev/null
+++ b/envshare/app/head.tsx
@@ -0,0 +1,42 @@
+export default function Head({ title, subtitle }: { title: string; subtitle: string }) {
+  // Fallback tagline
+  title ??= "Share Environment Variables Securely";
+  subtitle ??= "EnvShare";
+
+  const baseUrl = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : "http://localhost:3000";
+
+  const url = new URL("/api/v1/og", baseUrl);
+  url.searchParams.set("title", title);
+  url.searchParams.set("subtitle", subtitle);
+
+  return (
+    <>
+      <title>EnvShare</title>
+      <meta content="width=device-width, initial-scale=1" name="viewport" />
+      <meta name="description" content={subtitle} />
+      <meta name="theme-color" content="#000000" />
+      <meta name="title" content={title} />
+      <meta name="keywords" content="envshare, secure, secrets, share, environment, variables" />
+      <meta name="language" content="English" />
+      <meta name="revisit-after" content="7 days" />
+      <meta name="robots" content="all" />
+      <meta httpEquiv="Content-Type" content="text/html; charset=utf-8" />
+      
+      {/* Open Graph / Facebook */}
+      <meta property="og:type" content="website" />
+      <meta property="og:url" content={baseUrl} />
+      <meta property='og:image' content={url.toString()} />
+      <meta property='og:title' content={title} />
+      <meta property='og:description' content={subtitle} />
+      <meta property="og:image:width" content="1200" />
+      <meta property="og:image:height" content="630" />
+
+      {/* Twitter */}
+      <meta property="twitter:card" content="summary_large_image" />
+      <meta property="twitter:url" content={baseUrl} />
+      <meta property="twitter:title" content={title} />
+      <meta property="twitter:description" content={subtitle} />
+      <meta property="twitter:image" content={url.toString()} />
+    </>
+  );
+}
-- 
cgit v1.2.3-70-g09d2

