mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-10-03 02:04:31 +10:00
fix(sharing): use neutral social preview image (#3410)
* fix(sharing): use neutral social preview image * fix(sharing): use neutral server social preview
This commit is contained in:
@@ -151,9 +151,9 @@ describe("web app fallback classification", () => {
|
||||
expect(html).toContain('<link rel="canonical" href="https://rxresu.me/jane/resume">');
|
||||
expect(html).toContain('<meta property="og:type" content="profile">');
|
||||
expect(html).toContain('<meta property="og:title" content="Jane Doe — Staff Engineer">');
|
||||
expect(html).toContain('<meta property="og:image" content="https://rxresu.me/templates/jpg/azurill.jpg">');
|
||||
expect(html).toContain('<meta property="og:image" content="https://rxresu.me/opengraph/banner.jpg">');
|
||||
expect(html).toContain('<meta name="twitter:card" content="summary_large_image">');
|
||||
expect(html).toContain('<meta name="twitter:image" content="https://rxresu.me/templates/jpg/azurill.jpg">');
|
||||
expect(html).toContain('<meta name="twitter:image" content="https://rxresu.me/opengraph/banner.jpg">');
|
||||
});
|
||||
|
||||
it("escapes user-authored values so resume content cannot break out of the attribute", async () => {
|
||||
|
||||
@@ -224,7 +224,7 @@ async function createPublicResumeSeoMarkup(pathname: string, origin: string) {
|
||||
if (!meta) return null;
|
||||
|
||||
const canonicalUrl = `${origin}/${username}/${slug}`;
|
||||
const imageUrl = `${origin}/templates/jpg/${meta.template}.jpg`;
|
||||
const imageUrl = `${origin}/opengraph/banner.jpg`;
|
||||
const pageTitle = escapeAttribute(`${meta.name} - Reactive Resume`);
|
||||
const title = escapeAttribute(meta.title);
|
||||
const description = escapeAttribute(meta.description);
|
||||
|
||||
@@ -30,7 +30,7 @@ export const Route = createFileRoute("/$username/$slug")({
|
||||
|
||||
const base = getCanonicalRootUrl(typeof window === "undefined" ? undefined : window.location.origin);
|
||||
const canonicalUrl = `${base}${params.username}/${params.slug}`;
|
||||
const imageUrl = `${base}templates/jpg/${social.template}.jpg`;
|
||||
const imageUrl = `${base}opengraph/banner.jpg`;
|
||||
|
||||
return {
|
||||
meta: [
|
||||
|
||||
Reference in New Issue
Block a user