mirror of
https://github.com/mudabbir-ahmad/Portfolio_V1.git
synced 2026-12-06 19:53:09 +00:00
Add link-preview image and Open Graph/Twitter tags
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d73ea4958f
commit
f7bd7df579
4 files changed
+13
-2
No files matched your search
+3
-1
@@ -199,7 +199,9 @@ let indexHtml = "";
|
||||
try {
|
||||
indexHtml = fs
|
||||
.readFileSync(path.join(distPath, "index.html"), "utf8")
|
||||
.replaceAll("__SITE_NAME__", escapeHtml(publicEnv.VITE_NAME || "Your Name"));
|
||||
.replaceAll("__SITE_NAME__", escapeHtml(publicEnv.VITE_NAME || "Your Name"))
|
||||
// Absolute URLs for link previews (og:image needs one). Set SITE_URL to the public address.
|
||||
.replaceAll("__SITE_URL__", escapeHtml((process.env.SITE_URL || ALLOWED_ORIGIN).replace(/\/$/, "")));
|
||||
} catch {
|
||||
console.warn("dist/index.html not found, run `npm run build` first");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user