Skip to content

Commit c788447

Browse files
updates
1 parent 9b8b12c commit c788447

18 files changed

Lines changed: 607 additions & 57 deletions

File tree

app/[slug]/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
2626
const canonical = getCanonicalUrlForPost(post);
2727
const title = `${post.title} | Proxy Tech Support`;
2828
const published = post.date ? `${post.date}T12:00:00.000Z` : undefined;
29+
const modified = post.lastmod ?? published;
2930

3031
return {
3132
title,
@@ -41,7 +42,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
4142
siteName: 'Proxy Tech Support',
4243
locale: 'en_US',
4344
publishedTime: published,
44-
modifiedTime: published,
45+
modifiedTime: modified,
4546
images: [defaultOgImage],
4647
},
4748
twitter: {
@@ -79,6 +80,7 @@ export default async function SlugPage({ params }: Props) {
7980
headline={post.title}
8081
description={post.description}
8182
datePublished={post.date}
83+
dateModified={post.lastmod}
8284
url={url}
8385
type={isJobSupportSlug(slug) ? 'TechArticle' : 'BlogPosting'}
8486
about={post.about}

app/blog/[slug]/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
3232
const canonical = getCanonicalUrlForPost(post);
3333
const title = `${post.title} | Proxy Tech Support`;
3434
const published = post.date ? `${post.date}T12:00:00.000Z` : undefined;
35+
const modified = post.lastmod ?? published;
3536

3637
return {
3738
title,
@@ -47,7 +48,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
4748
siteName: 'Proxy Tech Support',
4849
locale: 'en_US',
4950
publishedTime: published,
50-
modifiedTime: published,
51+
modifiedTime: modified,
5152
images: [defaultOgImage],
5253
},
5354
twitter: {
@@ -79,6 +80,7 @@ export default async function BlogArticlePage({ params }: Props) {
7980
headline={post.title}
8081
description={post.description}
8182
datePublished={post.date}
83+
dateModified={post.lastmod}
8284
url={url}
8385
type={isJobSupportSlug(slug) ? 'TechArticle' : 'BlogPosting'}
8486
about={post.about}

app/globals.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,17 @@ a:hover {
411411
font-style: italic;
412412
}
413413

414+
.post-content p.callout-urgent {
415+
margin: 1.25rem 0;
416+
padding: 1rem 1.15rem;
417+
border-radius: var(--pts-card-radius);
418+
border: 1px solid rgba(180, 83, 9, 0.35);
419+
background: linear-gradient(135deg, #fff8f0 0%, #fff3e6 100%);
420+
color: var(--pts-text);
421+
font-weight: 600;
422+
line-height: 1.55;
423+
}
424+
414425
.post-content code {
415426
background: rgba(0, 223, 130, 0.12);
416427
color: var(--pts-forest);

app/sitemap.ts

Lines changed: 32 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -10,76 +10,60 @@ export const dynamic = 'force-static';
1010

1111
const BASE = 'https://proxytechsupport.com';
1212

13-
/** Map legacy string priorities to MetadataRoute numeric 0–1 */
14-
function prio(p: string): number {
15-
const n = Number.parseFloat(p);
16-
return Number.isFinite(n) ? Math.min(1, Math.max(0, n)) : 0.7;
17-
}
18-
1913
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
2014
const today = new Date().toISOString().split('T')[0];
2115

2216
const [posts, interviews] = await Promise.all([getAllPosts(), getAllInterviews()]);
2317

2418
const getInterviewScheduledRoutes: MetadataRoute.Sitemap = [
25-
{ url: `${BASE}/get-interview-scheduled/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.9') },
26-
{ url: `${BASE}/get-interview-scheduled-usa/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.9') },
27-
{ url: `${BASE}/get-interview-scheduled-uk/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.9') },
28-
{ url: `${BASE}/get-interview-scheduled-canada/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.9') },
29-
{ url: `${BASE}/get-interview-scheduled-australia/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.9') },
30-
{ url: `${BASE}/get-interview-scheduled-ireland/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
31-
{ url: `${BASE}/get-interview-scheduled-germany/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
32-
{ url: `${BASE}/get-interview-scheduled-netherlands/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
33-
{ url: `${BASE}/get-interview-scheduled-sweden/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
34-
{ url: `${BASE}/get-interview-scheduled-denmark/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
35-
{ url: `${BASE}/get-interview-scheduled-finland/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
36-
{ url: `${BASE}/get-interview-scheduled-norway/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
37-
{ url: `${BASE}/get-interview-scheduled-switzerland/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
38-
{ url: `${BASE}/get-interview-scheduled-austria/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
39-
{ url: `${BASE}/get-interview-scheduled-belgium/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
40-
{ url: `${BASE}/get-interview-scheduled-spain/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
41-
{ url: `${BASE}/get-interview-scheduled-portugal/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
42-
{ url: `${BASE}/get-interview-scheduled-new-zealand/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
43-
{ url: `${BASE}/get-interview-scheduled-singapore/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
44-
{ url: `${BASE}/get-interview-scheduled-hong-kong/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
19+
{ url: `${BASE}/get-interview-scheduled/`, lastModified: today },
20+
{ url: `${BASE}/get-interview-scheduled-usa/`, lastModified: today },
21+
{ url: `${BASE}/get-interview-scheduled-uk/`, lastModified: today },
22+
{ url: `${BASE}/get-interview-scheduled-canada/`, lastModified: today },
23+
{ url: `${BASE}/get-interview-scheduled-australia/`, lastModified: today },
24+
{ url: `${BASE}/get-interview-scheduled-ireland/`, lastModified: today },
25+
{ url: `${BASE}/get-interview-scheduled-germany/`, lastModified: today },
26+
{ url: `${BASE}/get-interview-scheduled-netherlands/`, lastModified: today },
27+
{ url: `${BASE}/get-interview-scheduled-sweden/`, lastModified: today },
28+
{ url: `${BASE}/get-interview-scheduled-denmark/`, lastModified: today },
29+
{ url: `${BASE}/get-interview-scheduled-finland/`, lastModified: today },
30+
{ url: `${BASE}/get-interview-scheduled-norway/`, lastModified: today },
31+
{ url: `${BASE}/get-interview-scheduled-switzerland/`, lastModified: today },
32+
{ url: `${BASE}/get-interview-scheduled-austria/`, lastModified: today },
33+
{ url: `${BASE}/get-interview-scheduled-belgium/`, lastModified: today },
34+
{ url: `${BASE}/get-interview-scheduled-spain/`, lastModified: today },
35+
{ url: `${BASE}/get-interview-scheduled-portugal/`, lastModified: today },
36+
{ url: `${BASE}/get-interview-scheduled-new-zealand/`, lastModified: today },
37+
{ url: `${BASE}/get-interview-scheduled-singapore/`, lastModified: today },
38+
{ url: `${BASE}/get-interview-scheduled-hong-kong/`, lastModified: today },
4539
];
4640

4741
const staticRoutes: MetadataRoute.Sitemap = [
48-
{ url: `${BASE}/`, lastModified: today, changeFrequency: 'weekly', priority: prio('1.0') },
49-
{ url: `${BASE}/blog/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
50-
{ url: `${BASE}/interviews/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
51-
{ url: `${BASE}/interview-questions/`, lastModified: today, changeFrequency: 'weekly', priority: prio('0.8') },
52-
{ url: `${BASE}/technologies/`, lastModified: today, changeFrequency: 'monthly', priority: prio('0.3') },
42+
{ url: `${BASE}/`, lastModified: today },
43+
{ url: `${BASE}/blog/`, lastModified: today },
44+
{ url: `${BASE}/interviews/`, lastModified: today },
45+
{ url: `${BASE}/interview-questions/`, lastModified: today },
46+
{ url: `${BASE}/technologies/`, lastModified: today },
5347
...getInterviewScheduledRoutes,
5448
...allLandingPages.map((p) => ({
5549
url: p.canonical,
5650
lastModified: today,
57-
changeFrequency: 'weekly' as const,
58-
priority: prio('0.9'),
5951
})),
6052
];
6153

6254
const postRoutes: MetadataRoute.Sitemap = posts.map((post) => {
63-
const url = getCanonicalUrlForPost(post);
6455
const last =
65-
post.date && post.date.length >= 10 ? post.date : today;
56+
post.lastmod?.trim() ? new Date(post.lastmod) : post.date ? new Date(`${post.date}T12:00:00Z`) : new Date(today);
6657
return {
67-
url,
68-
lastModified: last,
69-
changeFrequency: 'weekly' as const,
70-
priority: prio('0.7'),
58+
url: getCanonicalUrlForPost(post),
59+
lastModified: Number.isNaN(last.getTime()) ? today : last.toISOString().split('T')[0],
7160
};
7261
});
7362

74-
const interviewRoutes: MetadataRoute.Sitemap = interviews.map((i) => {
75-
const last = i.date && i.date.length >= 10 ? i.date : today;
76-
return {
77-
url: getCanonicalInterviewUrl(i.slug),
78-
lastModified: last,
79-
changeFrequency: 'weekly' as const,
80-
priority: prio('0.7'),
81-
};
82-
});
63+
const interviewRoutes: MetadataRoute.Sitemap = interviews.map((i) => ({
64+
url: getCanonicalInterviewUrl(i.slug),
65+
lastModified: today,
66+
}));
8367

8468
return [...staticRoutes, ...postRoutes, ...interviewRoutes];
8569
}

0 commit comments

Comments
 (0)