Skip to content

Commit eaa1356

Browse files
committed
update: header hero & SEO web
1 parent ed1e321 commit eaa1356

File tree

12 files changed

+38
-30
lines changed

12 files changed

+38
-30
lines changed

website/next-seo.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ const defaultSEOConfig = {
33
titleTemplate: '%s - Tech Notes Hub',
44
defaultTitle: 'Tech Notes Hub',
55
description: 'A collection of tech notes, code snippets, and technical guides for developers',
6-
canonical: 'https://technotes.example.com',
6+
canonical: 'https://tech-notes-hub.vercel.app',
77
openGraph: {
88
type: 'website',
99
locale: 'vi_VN',
10-
url: 'https://technotes.example.com',
10+
url: 'https://tech-notes-hub.vercel.app',
1111
siteName: 'Tech Notes Hub',
1212
title: 'Tech Notes Hub',
1313
description: 'A collection of tech notes, code snippets, and technical guides for developers',
1414
images: [
1515
{
16-
url: 'https://technotes.example.com/og-image.jpg',
16+
url: 'https://tech-notes-hub.vercel.app/og-image.jpg',
1717
width: 1200,
1818
height: 630,
1919
alt: 'Tech Notes Hub',

website/pages/sitemap.xml.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getContentAsBlogPosts } from '@/lib/content-mapper';
22

3-
const WEBSITE_URL = 'https://technotes.example.com';
3+
const WEBSITE_URL = 'https://tech-notes-hub.vercel.app';
44
const LOCALES = ['en', 'vi'];
55

66
function generateSiteMap(posts) {

website/public/robots.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ User-agent: *
33
Allow: /
44

55
# Sitemap location
6-
Sitemap: https://technotes.example.com/sitemap.xml
6+
Sitemap: https://tech-notes-hub.vercel.app/sitemap.xml
77

88
# Disallow admin paths
99
User-agent: *

website/public/sitemap.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
https://technotes.example.com/en
2-
https://technotes.example.com/vi
3-
https://technotes.example.com/en/about
4-
https://technotes.example.com/vi/about
5-
https://technotes.example.com/en/blog
6-
https://technotes.example.com/vi/blog
7-
https://technotes.example.com/en/privacy
8-
https://technotes.example.com/vi/privacy
9-
https://technotes.example.com/en/terms
10-
https://technotes.example.com/vi/terms
1+
https://tech-notes-hub.vercel.app/en
2+
https://tech-notes-hub.vercel.app/vi
3+
https://tech-notes-hub.vercel.app/en/about
4+
https://tech-notes-hub.vercel.app/vi/about
5+
https://tech-notes-hub.vercel.app/en/blog
6+
https://tech-notes-hub.vercel.app/vi/blog
7+
https://tech-notes-hub.vercel.app/en/privacy
8+
https://tech-notes-hub.vercel.app/vi/privacy
9+
https://tech-notes-hub.vercel.app/en/terms
10+
https://tech-notes-hub.vercel.app/vi/terms

website/src/app/[locale]/layout.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ export async function generateMetadata({ params }: { params: { locale: string }
3737
openGraph: {
3838
title: 'Tech Notes Hub',
3939
description: description,
40-
url: `https://technotes.example.com/${locale}`,
40+
url: `https://tech-notes-hub.vercel.app/${locale}`,
4141
siteName: 'Tech Notes Hub',
4242
locale: locale,
4343
type: 'website',
4444
images: [
4545
{
46-
url: 'https://technotes.example.com/og-image.jpg',
46+
url: 'https://tech-notes-hub.vercel.app/og-image.jpg',
4747
width: 1200,
4848
height: 630,
4949
alt: 'Tech Notes Hub',
@@ -57,10 +57,10 @@ export async function generateMetadata({ params }: { params: { locale: string }
5757
creator: '@technotes',
5858
},
5959
alternates: {
60-
canonical: `https://technotes.example.com/${locale}`,
60+
canonical: `https://tech-notes-hub.vercel.app/${locale}`,
6161
languages: {
62-
en: 'https://technotes.example.com/en',
63-
vi: 'https://technotes.example.com/vi',
62+
en: 'https://tech-notes-hub.vercel.app/en',
63+
vi: 'https://tech-notes-hub.vercel.app/vi',
6464
},
6565
},
6666
};

website/src/app/[locale]/page.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/componen
44
import { Locale, getTranslationsFromNamespaces } from "@/lib/i18n/settings";
55
import { Metadata } from "next";
66
import { getContentAsBlogPosts } from "@/lib/content-mapper";
7+
import { Github } from "lucide-react";
78

89
type Params = Promise<{ locale: Locale }>;
910

@@ -47,11 +48,16 @@ export default async function HomePage({ params }: { params: Params }) {
4748
{t.hero.primaryCTA}
4849
</Button>
4950
</Link>
50-
<Link href={`/${locale}/about`} className="cursor-pointer">
51-
<Button variant="outline" size="lg">
52-
{t.hero.secondaryCTA}
51+
<a href="https://github.com/tech-notes-hub/tech-notes" target="_blank" rel="noreferrer" className="cursor-pointer">
52+
<Button
53+
variant="outline"
54+
size="lg"
55+
className="flex items-center gap-2 relative overflow-hidden bg-gradient-to-r from-primary/20 to-primary/10 border-primary/50 animate-pulse hover:animate-none hover:bg-primary/20 transition-all duration-300"
56+
>
57+
<Github className="h-4 w-4" />
58+
{t.hero.contributeCTA}
5359
</Button>
54-
</Link>
60+
</a>
5561
</div>
5662
</div>
5763
</div>

website/src/app/api/robots.txt/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const WEBSITE_URL = 'https://technotes.example.com';
1+
const WEBSITE_URL = 'https://tech-notes-hub.vercel.app';
22

33
export async function GET() {
44
const robotsTxt = `

website/src/app/api/sitemap.xml/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { getContentAsBlogPosts } from '@/lib/content-mapper';
22
import { locales } from '@/lib/i18n/settings';
33

4-
const WEBSITE_URL = 'https://technotes.example.com';
4+
const WEBSITE_URL = 'https://tech-notes-hub.vercel.app';
55

66
export async function GET() {
77
// Fetch all blog posts from all locales

website/src/components/layout/footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function Footer({ translations, locale }: FooterProps) {
1919
return (
2020
<footer className="w-full border-t bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
2121
<div className="w-full flex flex-col sm:flex-row h-auto sm:h-16 md:h-20 items-center px-4 md:px-6 lg:px-8 py-4 sm:py-0">
22-
<div className="flex flex-1 flex-col sm:flex-row items-center sm:items-start sm:justify-between w-full gap-4 sm:gap-0">
22+
<div className="flex flex-1 flex-col sm:flex-row items-center sm:justify-between w-full gap-4 sm:gap-0">
2323
<div className="flex-shrink-0 text-center sm:text-left">
2424
<p className="text-sm text-muted-foreground">
2525
{t.footer?.copyright || ${currentYear} Tech Notes Hub. MIT License.`}

website/src/data/i18n/en/home.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"title": "Tech Notes Hub",
1212
"description": "Discover technical notes, code snippets, and guides to level up your skills",
1313
"primaryCTA": "Browse Articles",
14-
"secondaryCTA": "About Hub"
14+
"secondaryCTA": "About Hub",
15+
"contributeCTA": "Contribute on GitHub"
1516
}
1617
}

website/src/data/i18n/vi/home.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"title": "Tech Notes Hub",
1212
"description": "Khám phá các ghi chú kỹ thuật, đoạn mã nguồn và hướng dẫn để nâng cao kỹ năng của bạn",
1313
"primaryCTA": "Xem bài viết",
14-
"secondaryCTA": "Giới thiệu"
14+
"secondaryCTA": "Giới thiệu",
15+
"contributeCTA": "Đóng góp trên GitHub"
1516
}
1617
}

website/src/lib/metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Metadata } from 'next';
22
import { Locale, locales } from './i18n/settings';
33

4-
const WEBSITE_URL = 'https://technotes.example.com';
4+
const WEBSITE_URL = 'https://tech-notes-hub.vercel.app';
55

66
interface MetadataProps {
77
title?: string;

0 commit comments

Comments
 (0)