From ad0ec6549ef57a5a71a20ed6858eea17380ec070 Mon Sep 17 00:00:00 2001 From: lynxx-st Date: Mon, 16 Mar 2026 09:42:31 +0545 Subject: [PATCH 1/4] Improve FlagForge SEO strategy --- app/(footer)/about/page.tsx | 137 +++++++--------- app/(footer)/contact/page.tsx | 49 +++--- app/(footer)/cookie-consent/page.tsx | 2 +- app/(footer)/licensing/page.tsx | 2 +- app/(footer)/privacy-policy/page.tsx | 2 +- app/(footer)/terms-of-service/page.tsx | 2 +- app/(main)/blogs/[id]/page.tsx | 20 +-- app/(main)/blogs/layout.tsx | 21 ++- app/(main)/blogs/page.tsx | 8 +- app/(main)/profile/page.tsx | 2 +- app/(main)/resources/layout.tsx | 19 ++- app/api/forgeacademy/route.ts | 2 +- app/api/problems/route.ts | 2 +- app/globals.css | 1 + app/layout.tsx | 102 +++--------- app/page.tsx | 192 +++++++++++++++------- app/robots.ts | 26 +++ app/sitemap.ts | 77 +++++++++ app/user/[username]/layout.tsx | 22 ++- app/user/[username]/page.tsx | 2 +- components/Footer.tsx | 35 ++-- components/HomepageRedirect.tsx | 18 ++ components/Navbar.tsx | 12 +- lib/seo.ts | 24 +++ middleware.ts | 30 ---- next-sitemap.config.js | 218 ------------------------- next.config.mjs | 36 +++- package.json | 5 +- proxy.ts | 29 ++++ public/llms.txt | 20 +-- scripts/copy-sitemap.js | 27 --- tsconfig.json | 2 +- utils/data.ts | 7 +- 33 files changed, 533 insertions(+), 620 deletions(-) create mode 100644 app/robots.ts create mode 100644 app/sitemap.ts create mode 100644 components/HomepageRedirect.tsx create mode 100644 lib/seo.ts delete mode 100644 middleware.ts delete mode 100644 next-sitemap.config.js create mode 100644 proxy.ts delete mode 100644 scripts/copy-sitemap.js diff --git a/app/(footer)/about/page.tsx b/app/(footer)/about/page.tsx index e1e708d..cd2f8b5 100644 --- a/app/(footer)/about/page.tsx +++ b/app/(footer)/about/page.tsx @@ -13,8 +13,6 @@ import { Zap, Scale, CheckCircle2, - BookOpen, - Cpu, Network, Binary, Search, @@ -22,35 +20,42 @@ import { TrendingUp, Heart } from "lucide-react"; +import { siteConfig } from "@/lib/seo"; export const metadata: Metadata = { title: "About FlagForge | CTF Platform for Cybersecurity Learning", - description: "FlagForge is a dynamic CTF platform promoting cybersecurity awareness and hands-on coding challenges. Join our global community of learners.", + description: + "Learn what FlagForge is, how the platform teaches capture the flag skills, and why the community focuses on practical cybersecurity learning.", keywords: [ - "CTF", - "cybersecurity", - "capture the flag", - "coding challenges", - "hacking", - "security learning", - "FlagForge", + "About FlagForge", + "FlagForge CTF platform", + "cybersecurity learning", + "capture the flag training", "Nepal cybersecurity community", ], authors: [{ name: "FlagForge Team" }], + alternates: { + canonical: "/about", + }, + robots: { + index: true, + follow: true, + }, openGraph: { - title: "About FlagForge | CTF Platform", - description: "Where curiosity meets cybersecurity. Learn, compete, and grow with our global community.", + title: "About FlagForge | CTF Platform for Cybersecurity Learning", + description: + "See how FlagForge helps learners practice cybersecurity skills through hands-on capture the flag challenges.", type: "website", - siteName: "FlagForge", - url: "https://flagforge.xyz/about", + siteName: siteConfig.name, + url: `${siteConfig.url}/about`, + images: [{ url: siteConfig.ogImage, alt: "About FlagForge" }], }, twitter: { card: "summary_large_image", - title: "About FlagForge | CTF Platform", - description: "Where curiosity meets cybersecurity. Learn, compete, and grow with our global community.", - }, - alternates: { - canonical: "/about", + title: "About FlagForge | CTF Platform for Cybersecurity Learning", + description: + "See how FlagForge helps learners practice cybersecurity skills through hands-on capture the flag challenges.", + images: [siteConfig.ogImage], }, }; @@ -58,27 +63,26 @@ export default function About() { const breadcrumbData = { "@context": "https://schema.org", "@type": "BreadcrumbList", - "itemListElement": [ + itemListElement: [ { "@type": "ListItem", - "position": 1, - "name": "Home", - "item": "https://flagforge.xyz/" + position: 1, + name: "Home", + item: `${siteConfig.url}/`, }, { "@type": "ListItem", - "position": 2, - "name": "About", - "item": "https://flagforge.xyz/about" - } - ] + position: 2, + name: "About", + item: `${siteConfig.url}/about`, + }, + ], }; return (
- {/* Background Effects */}
@@ -86,8 +90,6 @@ export default function About() {
- - {/* Header Section */}
@@ -98,22 +100,17 @@ export default function About() { About FlagForge

- "Where curiosity meets cybersecurity." + Capture the flag training built for real cybersecurity growth.

FlagForge is a dynamic and engaging CTF platform dedicated to promoting{" "} - - Cybersecurity - {" "} - awareness and fostering a passion for coding among participants. + Cybersecurity{" "} + awareness and helping learners build practical security skills through hands-on challenge solving.

- {/* Main Content Dashboard */}
- - {/* Platform & Features Card */}
@@ -125,12 +122,10 @@ export default function About() {

Our Platform

- Our platform features a clean, responsive interface and an easy-to-use - experience. Flags are securely submitted and efficiently validated for - fair play. Participants can track scores on a real-time leaderboard. - With Google Authentication, users can sign in instantly and start - solving. Challenges can be filtered by category and difficulty, - helping participants find content that fits their skills and interests. + FlagForge combines guided learning resources, practical CTF challenges, and a community-focused + interface so learners can study cybersecurity by doing. Participants can sign in quickly, filter + challenges by category, track progress, and move from beginner-friendly puzzles into deeper + problem-solving across web, crypto, forensics, and binary analysis.

@@ -141,9 +136,8 @@ export default function About() {

Our Mission

- To make cybersecurity learning accessible and engaging through practical - challenges, collaboration, and gamified experiences that empower learners - worldwide. + To make cybersecurity learning accessible and engaging through practical challenges, + collaboration, and gamified experiences that empower learners worldwide.

@@ -152,8 +146,8 @@ export default function About() {

Our Vision

- To build a global community where future cybersecurity experts and developers - learn, compete, and grow together. + To build a trusted capture the flag community where future security engineers learn, compete, + and grow together.

@@ -161,10 +155,10 @@ export default function About() {
{[ - { icon: Lock, title: "Secure", desc: "End-to-end encrypted communication" }, - { icon: Users, title: "Collaborative", desc: "Direct participant-organizer communication" }, - { icon: Globe, title: "Global", desc: "Worldwide network of participants" }, - { icon: ShieldAlert, title: "Private", desc: "Responsible disclosure practices" }, + { icon: Lock, title: "Secure", desc: "Practice in a controlled learning environment" }, + { icon: Users, title: "Collaborative", desc: "Built for students, teams, and communities" }, + { icon: Globe, title: "Open", desc: "Rooted in Nepal and accessible to global learners" }, + { icon: ShieldAlert, title: "Responsible", desc: "Focused on ethical hacking and safe skill-building" }, ].map((feature, i) => (
- {/* Ethical Hacking Disclosure Card */}
@@ -196,7 +189,7 @@ export default function About() {

- Educational Purpose & Ethical Hacking + Educational Purpose and Ethical Hacking

@@ -205,9 +198,7 @@ export default function About() {

All challenges and activities on FlagForge are intended to teach responsible security practices. We strictly prohibit the use of knowledge gained on our platform for any illegal activities, unauthorized access to systems, or malicious purposes.

-

- By participating in FlagForge challenges, users agree to: -

+

By participating in FlagForge challenges, users agree to:

    {[ "Use their skills only for legal and ethical purposes", @@ -231,45 +222,44 @@ export default function About() {
- {/* Learning Categories Grid */}

- What You'll Learn + What You'll Learn

-

Comprehensive cybersecurity skills development

+

Core challenge areas available across the FlagForge learning experience

{[ { title: "Web Security", icon: Globe, - skills: ["XSS Prevention", "SQL Injection Defense", "CSRF Protection", "Secure Authentication"] + skills: ["XSS prevention", "SQL injection defense", "CSRF protection", "Secure authentication"] }, { title: "Cryptography", icon: Lock, - skills: ["Encryption Basics", "Hash Functions", "Digital Signatures", "Secure Communication"] + skills: ["Encryption basics", "Hash functions", "Digital signatures", "Secure communication"] }, { title: "Network Security", icon: Network, - skills: ["Protocol Analysis", "Packet Inspection", "Firewall Configuration", "Intrusion Detection"] + skills: ["Protocol analysis", "Packet inspection", "Firewall concepts", "Intrusion detection"] }, { title: "Reverse Engineering", icon: Binary, - skills: ["Binary Analysis", "Debugging Techniques", "Code Decompilation", "Malware Analysis"] + skills: ["Binary analysis", "Debugging techniques", "Code decompilation", "Malware analysis"] }, { title: "Forensics", icon: Search, - skills: ["Data Recovery", "Log Analysis", "Memory Forensics", "Evidence Collection"] + skills: ["Data recovery", "Log analysis", "Memory forensics", "Evidence collection"] }, { title: "Problem Solving", icon: Puzzle, - skills: ["Critical Thinking", "Pattern Recognition", "Logical Reasoning", "Creative Solutions"] + skills: ["Critical thinking", "Pattern recognition", "Logical reasoning", "Creative solutions"] } ].map((category, i) => (
- {/* Stats & Community Card */}
@@ -302,15 +291,15 @@ export default function About() {

Join Our Growing Community

- Built by passionate developers and cybersecurity enthusiasts, FlagForge is more than just a platformβ€”it's a community dedicated to helping others learn, grow, and forge their own path in technology and cybersecurity. + Built by passionate developers and cybersecurity enthusiasts, FlagForge is more than just a platform. It is a community dedicated to helping others learn, grow, and build practical security confidence.

{[ - { label: "Active Users", value: "1000+", icon: Users }, - { label: "Challenges Solved", value: "500+", icon: TrendingUp }, - { label: "Learning Support", value: "24/7", icon: Heart } + { label: "Active users", value: "1000+", icon: Users }, + { label: "Challenges solved", value: "500+", icon: TrendingUp }, + { label: "Learning support", value: "24/7", icon: Heart } ].map((stat, i) => (
@@ -326,7 +315,6 @@ export default function About() {
- {/* Call to Action */}
-
diff --git a/app/(footer)/contact/page.tsx b/app/(footer)/contact/page.tsx index 6ad7a8d..17952bb 100644 --- a/app/(footer)/contact/page.tsx +++ b/app/(footer)/contact/page.tsx @@ -7,33 +7,35 @@ import { Send, Home } from "lucide-react"; +import { siteConfig } from "@/lib/seo"; export const metadata: Metadata = { - title: "Contact Us - FlagForge CTF Platform", + title: "Contact FlagForge | CTF Support and Cybersecurity Collaboration", description: - "Contact FlagForge for CTF support and cybersecurity inquiries via email, phone, or our Lalitpur office.", + "Contact FlagForge for platform support, partnerships, CTF collaboration, or general cybersecurity learning inquiries.", keywords: [ "contact FlagForge", - "CTF support", - "cybersecurity help", - "FlagForge team", - "Nepal cybersecurity support", - "Nepal CTF community", + "FlagForge support", + "CTF platform contact", + "cybersecurity collaboration", + "Nepal cybersecurity community", ], authors: [{ name: "FlagForge Team" }], openGraph: { - title: "Contact FlagForge - Get in Touch", + title: "Contact FlagForge | CTF Support and Cybersecurity Collaboration", description: - "Contact the FlagForge team for inquiries, support, or collaboration opportunities.", - url: "https://flagforge.xyz/contact", + "Contact the FlagForge team for platform support, partnerships, or cybersecurity collaboration.", + url: `${siteConfig.url}/contact`, type: "website", - siteName: "FlagForge", + siteName: siteConfig.name, locale: "en_US", + images: [{ url: siteConfig.ogImage, alt: "Contact FlagForge" }], }, twitter: { - card: "summary", - title: "Contact FlagForge - Get in Touch", + card: "summary_large_image", + title: "Contact FlagForge | CTF Support and Cybersecurity Collaboration", description: "Reach out to the FlagForge team for support, inquiries, or collaboration.", + images: [siteConfig.ogImage], }, alternates: { canonical: "/contact", @@ -47,31 +49,24 @@ export const metadata: Metadata = { export default function Contact() { return (
- - {/* Background Effects */}
-
+
+
- - {/* Compact Glass Dashboard */}
-
- - {/* Left Column: Header & Info */}
-

- Contact Us + Contact FlagForge

- Get in touch with us. We'd love to hear from you! + Reach the team for platform support, partnership conversations, and CTF or cybersecurity learning inquiries.

-

FlagForge Contact Details

+

FlagForge contact details

Email, phone, and office location

@@ -108,10 +103,9 @@ export default function Contact() {
- {/* Right Column: Contact Form */}

- Send us a Message + Send Us a Message

@@ -155,7 +149,6 @@ export default function Contact() {
-
diff --git a/app/(footer)/cookie-consent/page.tsx b/app/(footer)/cookie-consent/page.tsx index 3c7fe16..f9f0a68 100644 --- a/app/(footer)/cookie-consent/page.tsx +++ b/app/(footer)/cookie-consent/page.tsx @@ -19,7 +19,7 @@ export const metadata: Metadata = { title: "FlagForge Cookie Policy", description: "Understand how FlagForge uses cookies to improve your experience and protect your privacy.", - url: "https://flagforge.xyz/cookie-consent", + url: "https://flagforgectf.com/cookie-consent", type: "website", siteName: "FlagForge", locale: "en_US", diff --git a/app/(footer)/licensing/page.tsx b/app/(footer)/licensing/page.tsx index d333d0f..535a760 100644 --- a/app/(footer)/licensing/page.tsx +++ b/app/(footer)/licensing/page.tsx @@ -31,7 +31,7 @@ export const metadata: Metadata = { title: "FlagForge Licensing - GPL-3.0 Open Source", description: "FlagForge is open source under GPL-3.0. Free to use, modify, and distribute with full source code access on GitHub.", - url: "https://flagforge.xyz/licensing", + url: "https://flagforgectf.com/licensing", type: "website", siteName: "FlagForge", locale: "en_US", diff --git a/app/(footer)/privacy-policy/page.tsx b/app/(footer)/privacy-policy/page.tsx index 07322d7..f78f656 100644 --- a/app/(footer)/privacy-policy/page.tsx +++ b/app/(footer)/privacy-policy/page.tsx @@ -34,7 +34,7 @@ export const metadata: Metadata = { title: "FlagForge Privacy Policy", description: "Understand how FlagForge handles your data with transparency and security. Your privacy is our priority.", - url: "https://flagforge.xyz/privacy-policy", + url: "https://flagforgectf.com/privacy-policy", type: "website", siteName: "FlagForge", locale: "en_US", diff --git a/app/(footer)/terms-of-service/page.tsx b/app/(footer)/terms-of-service/page.tsx index f0225c5..9324243 100644 --- a/app/(footer)/terms-of-service/page.tsx +++ b/app/(footer)/terms-of-service/page.tsx @@ -32,7 +32,7 @@ export const metadata: Metadata = { title: "FlagForge Terms of Service", description: "Review the terms and conditions for using FlagForge CTF platform. Clear guidelines for fair and secure participation.", - url: "https://flagforge.xyz/terms-of-service", + url: "https://flagforgectf.com/terms-of-service", type: "website", siteName: "FlagForge", locale: "en_US", diff --git a/app/(main)/blogs/[id]/page.tsx b/app/(main)/blogs/[id]/page.tsx index 2ea50b6..a85c03f 100644 --- a/app/(main)/blogs/[id]/page.tsx +++ b/app/(main)/blogs/[id]/page.tsx @@ -6,6 +6,7 @@ import type { PartialBlockObjectResponse, } from "@notionhq/client/build/src/api-endpoints"; import JsonLd from "@/components/JsonLd"; +import { siteConfig } from "@/lib/seo"; import BlogPostClient from "./BlogPostClient"; export const revalidate = 300; @@ -228,13 +229,13 @@ export async function generateMetadata({ description, keywords, alternates: { - canonical: `/blogs/${canonicalSlug}`, + canonical: `${siteConfig.blogUrl}/${canonicalSlug}`, }, openGraph: { title: post.title, description, type: "article", - url: `/blogs/${canonicalSlug}`, + url: `${siteConfig.blogUrl}/${canonicalSlug}`, images: imageUrl ? [{ url: imageUrl, alt: post.title }] : [], }, twitter: { @@ -254,8 +255,7 @@ export default async function BlogPostPage({ const { id } = await params; const post = await fetchBlogPost(id); const postSlug = post?.slug || id; - const seoImage = - post?.cover || post?.thumbnail || post?.image || "https://flagforge.xyz/flagforge-logo.png"; + const seoImage = post?.cover || post?.thumbnail || post?.image || siteConfig.ogImage; const wordCount = post?.content ? post.content.split(/\s+/).filter(Boolean).length : undefined; @@ -286,18 +286,18 @@ export default async function BlogPostPage({ name: "FlagForge", logo: { "@type": "ImageObject", - url: "https://flagforge.xyz/flagforge-logo.png", + url: siteConfig.ogImage, }, }, mainEntityOfPage: { "@type": "WebPage", - "@id": `https://flagforge.xyz/blogs/${postSlug}`, + "@id": `${siteConfig.blogUrl}/${postSlug}`, }, keywords: post.tags?.join(", ") || "", isPartOf: { "@type": "Blog", name: "FlagForge Blog", - url: "https://flagforge.xyz/blogs", + url: siteConfig.blogUrl, }, }} /> @@ -310,19 +310,19 @@ export default async function BlogPostPage({ "@type": "ListItem", position: 1, name: "Home", - item: "https://flagforge.xyz/", + item: `${siteConfig.url}/`, }, { "@type": "ListItem", position: 2, name: "Blogs", - item: "https://flagforge.xyz/blogs", + item: siteConfig.blogUrl, }, { "@type": "ListItem", position: 3, name: post.title, - item: `https://flagforge.xyz/blogs/${postSlug}`, + item: `${siteConfig.blogUrl}/${postSlug}`, }, ], }} diff --git a/app/(main)/blogs/layout.tsx b/app/(main)/blogs/layout.tsx index 5ff9b44..0a33b42 100644 --- a/app/(main)/blogs/layout.tsx +++ b/app/(main)/blogs/layout.tsx @@ -1,26 +1,29 @@ import type { Metadata } from "next"; import type { ReactNode } from "react"; +import { siteConfig } from "@/lib/seo"; export const metadata: Metadata = { - title: "FlagForge Blog", + title: "FlagForge Blog | CTF Guides and Cybersecurity Tutorials", description: - "Read FlagForge blog posts on CTF challenges, cybersecurity tutorials, and competition guides.", + "Read FlagForge blog posts covering capture the flag walkthroughs, cybersecurity tutorials, learning paths, and community updates.", alternates: { - canonical: "/blogs", + canonical: siteConfig.blogUrl, }, openGraph: { - title: "FlagForge Blog", + title: "FlagForge Blog | CTF Guides and Cybersecurity Tutorials", description: - "Read FlagForge blog posts on CTF challenges, cybersecurity tutorials, and competition guides.", - url: "https://flagforge.xyz/blogs", + "Read FlagForge blog posts covering capture the flag walkthroughs, cybersecurity tutorials, learning paths, and community updates.", + url: siteConfig.blogUrl, type: "website", - siteName: "FlagForge", + siteName: siteConfig.name, + images: [{ url: siteConfig.ogImage, alt: "FlagForge Blog" }], }, twitter: { card: "summary_large_image", - title: "FlagForge Blog", + title: "FlagForge Blog | CTF Guides and Cybersecurity Tutorials", description: - "Read FlagForge blog posts on CTF challenges, cybersecurity tutorials, and competition guides.", + "Read FlagForge blog posts covering capture the flag walkthroughs, cybersecurity tutorials, learning paths, and community updates.", + images: [siteConfig.ogImage], }, }; diff --git a/app/(main)/blogs/page.tsx b/app/(main)/blogs/page.tsx index 44074b1..8110dcd 100644 --- a/app/(main)/blogs/page.tsx +++ b/app/(main)/blogs/page.tsx @@ -32,13 +32,13 @@ export default function BlogsPage() { "@type": "ListItem", "position": 1, "name": "Home", - "item": "https://flagforge.xyz/" + "item": "https://flagforgectf.com/" }, { "@type": "ListItem", "position": 2, "name": "Blogs", - "item": "https://flagforge.xyz/blogs" + "item": "https://blogs.flagforgectf.com" } ] }; @@ -135,11 +135,11 @@ export default function BlogsPage() { "@type": "Blog", name: "FlagForge Blog", description: "Discover insights, tutorials, and stories from our team at FlagForge.", - url: "https://flagforge.xyz/blogs", + url: "https://blogs.flagforgectf.com", blogPost: posts.map((post) => ({ "@type": "BlogPosting", headline: post.title, - url: `https://flagforge.xyz/blogs/${post.slug || post.id}`, + url: `https://blogs.flagforgectf.com/${post.slug || post.id}`, datePublished: post.created, description: post.excerpt, })), diff --git a/app/(main)/profile/page.tsx b/app/(main)/profile/page.tsx index 6f55e5e..54e6551 100644 --- a/app/(main)/profile/page.tsx +++ b/app/(main)/profile/page.tsx @@ -1187,7 +1187,7 @@ const ProfilePage = () => {
{(() => { - const currentDomain = typeof window !== 'undefined' ? window.location.origin : 'https://flagforge.xyz'; + const currentDomain = typeof window !== 'undefined' ? window.location.origin : 'https://flagforgectf.com'; const slug = (profileData?.name || "").replace(/\s+/g, "-"); const profileUrl = `${currentDomain}/user/${encodeURIComponent(slug)}`; const badgeSvgUrl = `${currentDomain}/api/badge/${encodeURIComponent(slug)}/svg`; diff --git a/app/(main)/resources/layout.tsx b/app/(main)/resources/layout.tsx index 2d24c54..e5b8f04 100644 --- a/app/(main)/resources/layout.tsx +++ b/app/(main)/resources/layout.tsx @@ -1,26 +1,29 @@ import type { Metadata } from "next"; import type { ReactNode } from "react"; +import { siteConfig } from "@/lib/seo"; export const metadata: Metadata = { - title: "Learning Resources", + title: "FlagForge Resources | CTF Learning Materials and Security Study Guides", description: - "Explore FlagForge learning resources and CTF training materials organized by category to build cybersecurity skills.", + "Explore FlagForge resources for capture the flag preparation, cybersecurity study paths, curated tools, and practical learning materials.", alternates: { canonical: "/resources", }, openGraph: { - title: "Learning Resources - FlagForge", + title: "FlagForge Resources | CTF Learning Materials and Security Study Guides", description: - "Explore FlagForge learning resources and CTF training materials organized by category to build cybersecurity skills.", - url: "https://flagforge.xyz/resources", + "Explore FlagForge resources for capture the flag preparation, cybersecurity study paths, curated tools, and practical learning materials.", + url: `${siteConfig.url}/resources`, type: "website", - siteName: "FlagForge", + siteName: siteConfig.name, + images: [{ url: siteConfig.ogImage, alt: "FlagForge Resources" }], }, twitter: { card: "summary_large_image", - title: "Learning Resources - FlagForge", + title: "FlagForge Resources | CTF Learning Materials and Security Study Guides", description: - "Explore FlagForge learning resources and CTF training materials organized by category to build cybersecurity skills.", + "Explore FlagForge resources for capture the flag preparation, cybersecurity study paths, curated tools, and practical learning materials.", + images: [siteConfig.ogImage], }, }; diff --git a/app/api/forgeacademy/route.ts b/app/api/forgeacademy/route.ts index 8056d2c..b9d5cba 100644 --- a/app/api/forgeacademy/route.ts +++ b/app/api/forgeacademy/route.ts @@ -105,7 +105,7 @@ Return only JSON. if (bestChallenge) { const challengeId = bestChallenge.id || bestChallenge._id?.toString(); const challengeTitle = bestChallenge.title || "Untitled Challenge"; - const challengeLink = `https://flagforge.xyz/challenges/${challengeId}`; + const challengeLink = `https://flagforgectf.com/challenges/${challengeId}`; // Inject challenge link into lesson lesson.challenge_meta = { diff --git a/app/api/problems/route.ts b/app/api/problems/route.ts index 95db099..34f79db 100644 --- a/app/api/problems/route.ts +++ b/app/api/problems/route.ts @@ -43,7 +43,7 @@ export async function POST(req: NextRequest) { ) { const product = await QuestionModel.create(body); await product.save(); - const challengeLink = `https://flagforge.xyz/problems/${product._id}`; + const challengeLink = `https://flagforgectf.com/problems/${product._id}`; // Send Discord notification await sendDiscordNotification( diff --git a/app/globals.css b/app/globals.css index f9010ef..ddad2f5 100644 --- a/app/globals.css +++ b/app/globals.css @@ -65,6 +65,7 @@ body { @apply bg-background text-foreground; + font-family: "Segoe UI", "Aptos", "Helvetica Neue", Arial, sans-serif; } /* Custom dark mode styles */ diff --git a/app/layout.tsx b/app/layout.tsx index 4a89b2f..8ae81d0 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,5 +1,4 @@ import type { Metadata, Viewport } from "next"; -import { DM_Sans } from "next/font/google"; import Script from "next/script"; import "./globals.css"; import Navbar from "@/components/Navbar"; @@ -8,40 +7,20 @@ import CookieConsent from "@/components/CookieConsent"; import Authprovider from "@/providers/auth-provider"; import { ThemeProvider } from "@/context/ThemeContext"; import { Analytics } from "@vercel/analytics/react"; - -const dmSans = DM_Sans({ - subsets: ["latin"], - display: "swap", - preload: true, -}); +import { defaultKeywords, siteConfig } from "@/lib/seo"; export const metadata: Metadata = { + metadataBase: new URL(siteConfig.url), title: { - default: "FlagForge - The Ultimate CTF Platform", + default: "FlagForge | Capture the Flag Platform for Cybersecurity Training", template: "%s | FlagForge", }, - description: - "Join FlagForge, the premier CTF platform to hone your cybersecurity skills with engaging challenges. Compete, learn, and grow your hacking expertise.", - metadataBase: new URL("https://flagforge.xyz"), - applicationName: "FlagForge CTF", + description: siteConfig.description, + applicationName: siteConfig.name, referrer: "origin-when-cross-origin", - keywords: [ - "CTF", - "Capture The Flag", - "Cybersecurity", - "Ethical Hacking", - "FlagForge", - "CTF Challenges", - "Cybersecurity Platform", - "Online CTF Competitions", - "Nepal cybersecurity", - "Nepal CTF platform", - ], - authors: [{ name: "@Aryanstha", url: "https://github.com/aryan4859" }], - publisher: "FlagForge", - alternates: { - canonical: "/", - }, + keywords: defaultKeywords, + authors: [{ name: "FlagForge Team", url: "https://github.com/FlagForgeCTF/" }], + publisher: siteConfig.name, robots: { index: true, follow: true, @@ -57,17 +36,16 @@ export const metadata: Metadata = { "google-adsense-account": "ca-pub-2506540900080142", }, openGraph: { - title: "FlagForge - The Ultimate CTF Platform", - description: - "FlagForge is the go-to platform for Capture The Flag (CTF) competitions. Test your hacking skills with thrilling challenges in cybersecurity.", - url: "https://flagforge.xyz", - siteName: "FlagForge", + title: "FlagForge | Capture the Flag Platform for Cybersecurity Training", + description: siteConfig.description, + url: siteConfig.url, + siteName: siteConfig.name, images: [ { - url: "/flagforge.gif", + url: siteConfig.ogImage, width: 1200, height: 630, - alt: "FlagForge - Capture The Flag Platform", + alt: "FlagForge CTF Platform", }, ], locale: "en_US", @@ -75,11 +53,9 @@ export const metadata: Metadata = { }, twitter: { card: "summary_large_image", - site: "@Aryanstha", - title: "FlagForge - The Ultimate CTF Platform", - description: - "Join FlagForge, the leading Capture The Flag platform to enhance your cybersecurity skills. Compete and learn with exciting CTF challenges.", - images: ["/flagforge.gif"], + title: "FlagForge | Capture the Flag Platform for Cybersecurity Training", + description: siteConfig.description, + images: [siteConfig.ogImage], }, icons: { icon: "/favicon.ico", @@ -95,37 +71,6 @@ export const viewport: Viewport = { userScalable: true, }; -const structuredData = { - "@context": "https://schema.org", - "@graph": [ - { - "@type": "WebSite", - "@id": "https://flagforge.xyz/#website", - url: "https://flagforge.xyz", - name: "FlagForge", - alternateName: "FlagForge CTF Platform", - potentialAction: { - "@type": "SearchAction", - target: "https://flagforge.xyz/search?q={search_term_string}", - "query-input": "required name=search_term_string", - }, - publisher: { - "@id": "https://flagforge.xyz/#organization", - }, - }, - { - "@type": "Organization", - "@id": "https://flagforge.xyz/#organization", - name: "FlagForge", - url: "https://flagforge.xyz", - logo: { - "@type": "ImageObject", - url: "https://flagforge.xyz/flagforge-logo.png", - }, - }, - ], -}; - export default function RootLayout({ children, }: { @@ -133,22 +78,13 @@ export default function RootLayout({ }) { return ( - -