feat: dynamic page titles + social media meta tags

Browser tab titles:
- Protocol pages: 'Title · Site Name'
- Collection pages: 'Title · Site Name'
- User pages: '@username · Site Name'
- Resets to site name on library/collections/about

Social media previews (server-side, for crawlers):
- index.php detects /protocols/slug, /collections/slug, /users/username
- Looks up title + description from DB
- Injects og:title, og:description, og:type, og:site_name, og:url
- Injects twitter:card, twitter:title, twitter:description
- Replaces default <title> with enriched version

Frontend:
- Default og/twitter meta tags on homepage
- Path-based URLs (shared links) redirect to hash routes for SPA routing
This commit is contained in:
Protocolbot
2026-07-21 08:24:07 -06:00
parent b2a17eb2b1
commit ceae28609b
3 changed files with 110 additions and 1 deletions
+7
View File
@@ -10,6 +10,13 @@
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="frontend/style.css">
<meta name="theme-color" content="#0a1929">
<meta property="og:title" content="Protocol Droid">
<meta property="og:description" content="A commons of social protocols">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Protocol Droid">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Protocol Droid">
<meta name="twitter:description" content="A commons of social protocols">
</head>
<body>