From 7327a586bbfdaaa3814fe433532f02cc55325be9 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 8 Sep 2024 13:16:43 +0200 Subject: [PATCH] fix: move the website URL to the environment variable --- .env.example | 2 ++ app/(root)/blog/[slug]/page.tsx | 6 +++--- app/(root)/blog/page.tsx | 6 +++--- app/(root)/blog/page/[id]/page.tsx | 6 +++--- app/(root)/changelog/[slug]/layout.tsx | 8 +++++--- app/(root)/changelog/layout.tsx | 6 +++--- app/(root)/contact/layout.tsx | 6 +++--- app/(root)/contribute/page.tsx | 6 +++--- app/(root)/downloads/layout.tsx | 6 +++--- app/(root)/layout.tsx | 6 +++--- app/(root)/mods/layout.tsx | 6 +++--- app/(root)/newsletter/page.tsx | 6 +++--- app/(root)/privacy/page.tsx | 6 +++--- app/(root)/tos/page.tsx | 6 +++--- app/(root)/unsubscribe/layout.tsx | 8 +++++--- app/(root)/vulnerabilities/layout.tsx | 6 +++--- app/layout.tsx | 6 +++--- app/rss.xml/route.ts | 2 +- app/sitemap.ts | 6 +++--- constants/index.tsx | 10 +++++----- theme.config.tsx | 10 +++------- 21 files changed, 66 insertions(+), 64 deletions(-) diff --git a/.env.example b/.env.example index f7dd156..ae082d2 100644 --- a/.env.example +++ b/.env.example @@ -10,6 +10,8 @@ ADMIN_PASSWORD= NEXTAUTH_SECRET= NEXTAUTH_URL= +NEXT_PUBLIC_WEBSITE_URL= + EMAIL_SERVER= EMAIL_PORT= EMAIL_SECURE= diff --git a/app/(root)/blog/[slug]/page.tsx b/app/(root)/blog/[slug]/page.tsx index 8efad0e..1e35969 100644 --- a/app/(root)/blog/[slug]/page.tsx +++ b/app/(root)/blog/[slug]/page.tsx @@ -67,13 +67,13 @@ export async function generateMetadata({ openGraph: { title: `${data.title} - SVR.JS`, description: data.smallDescription, - url: `https://svrjs.org/blog/${data.currentSlug}`, + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog/${data.currentSlug}`, type: "website", images: [ { url: data.titleImage ? urlFor(data.titleImage).url() - : "https://svrjs.vercel.app/blog-missing.png", + : `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog-missing.png`, width: 800, height: 600, alt: `${data.title} - SVR.JS` @@ -88,7 +88,7 @@ export async function generateMetadata({ images: [ data.titleImage ? urlFor(data.titleImage).url() - : "https://svrjs.vercel.app/blog-missing.png" + : `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog-missing.png` ], creator: "@SVR_JS" } diff --git a/app/(root)/blog/page.tsx b/app/(root)/blog/page.tsx index bbde05d..7801942 100644 --- a/app/(root)/blog/page.tsx +++ b/app/(root)/blog/page.tsx @@ -15,11 +15,11 @@ export const metadata: Metadata = { title: "Blog - SVR.JS", description: "Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.", - url: "https://svrjs.org/blog", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "Blog - SVR.JS" @@ -32,7 +32,7 @@ export const metadata: Metadata = { title: "Blog - SVR.JS", description: "Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/(root)/blog/page/[id]/page.tsx b/app/(root)/blog/page/[id]/page.tsx index 9c3008f..2c02dc4 100644 --- a/app/(root)/blog/page/[id]/page.tsx +++ b/app/(root)/blog/page/[id]/page.tsx @@ -16,11 +16,11 @@ export const metadata: Metadata = { title: "Blog - SVR.JS", description: "Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.", - url: "https://svrjs.org/blog", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "Blog - SVR.JS" @@ -33,7 +33,7 @@ export const metadata: Metadata = { title: "Blog - SVR.JS", description: "Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/(root)/changelog/[slug]/layout.tsx b/app/(root)/changelog/[slug]/layout.tsx index 469349c..d0a343d 100644 --- a/app/(root)/changelog/[slug]/layout.tsx +++ b/app/(root)/changelog/[slug]/layout.tsx @@ -50,11 +50,11 @@ export async function generateMetadata({ openGraph: { title: `${page.title} change log - SVR.JS`, description: `Keep track of the latest updates and improvements for ${page.title} with our comprehensive change log. Discover new features, bug fixes, and enhancements for each release of this SVR.JS mod.`, - url: `https://svrjs.org/changelog/${params.slug}`, + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/changelog/${params.slug}`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: `${page.title} change log - SVR.JS` @@ -66,7 +66,9 @@ export async function generateMetadata({ site: "@SVR_JS", title: `${page.title} change log - SVR.JS`, description: `Keep track of the latest updates and improvements for ${page.title} with our comprehensive change log. Discover new features, bug fixes, and enhancements for each release of this SVR.JS mod.`, - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [ + `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png` + ], creator: "@SVR_JS" } }; diff --git a/app/(root)/changelog/layout.tsx b/app/(root)/changelog/layout.tsx index 6ce1968..c45caa0 100644 --- a/app/(root)/changelog/layout.tsx +++ b/app/(root)/changelog/layout.tsx @@ -9,11 +9,11 @@ export const metadata: Metadata = { title: "SVR.JS change log - SVR.JS", description: "Stay up-to-date with the latest improvements and updates to SVR.JS web server. Our change log page provides a comprehensive list of new features, bug fixes, and enhancements for each release.", - url: "https://svrjs.org/changelogs", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/changelog`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "SVR.JS change log - SVR.JS" @@ -26,7 +26,7 @@ export const metadata: Metadata = { title: "SVR.JS change log - SVR.JS", description: "Stay up-to-date with the latest improvements and updates to SVR.JS web server. Our change log page provides a comprehensive list of new features, bug fixes, and enhancements for each release.", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/(root)/contact/layout.tsx b/app/(root)/contact/layout.tsx index b2846c6..e954b5b 100644 --- a/app/(root)/contact/layout.tsx +++ b/app/(root)/contact/layout.tsx @@ -9,11 +9,11 @@ export const metadata: Metadata = { title: "Contact Us - SVR.JS", description: "Have questions about SVR.JS? Need technical support? Visit our Contact Us page to find various ways to get in touch with our team, including email, forums, and our official support channel.", - url: "https://svrjs.org/contact", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/contact`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "Contact Us - SVR.JS" @@ -26,7 +26,7 @@ export const metadata: Metadata = { title: "Contact Us - SVR.JS", description: "Have questions about SVR.JS? Need technical support? Visit our Contact Us page to find various ways to get in touch with our team, including email, forums, and our official support channel.", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/(root)/contribute/page.tsx b/app/(root)/contribute/page.tsx index 6ef55e7..6322511 100644 --- a/app/(root)/contribute/page.tsx +++ b/app/(root)/contribute/page.tsx @@ -11,11 +11,11 @@ export const metadata: Metadata = { title: "Contribute - SVR.JS", description: "Contribute to SVR.JS and be part of an exciting open-source project. Follow the step-by-step guidelines to make your code contributions.", - url: "https://svrjs.org/contribute", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/contribute`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "Contribute - SVR.JS" @@ -28,7 +28,7 @@ export const metadata: Metadata = { title: "Contribute - SVR.JS", description: "Contribute to SVR.JS and be part of an exciting open-source project. Follow the step-by-step guidelines to make your code contributions.", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/(root)/downloads/layout.tsx b/app/(root)/downloads/layout.tsx index 60ff009..aaa55b3 100644 --- a/app/(root)/downloads/layout.tsx +++ b/app/(root)/downloads/layout.tsx @@ -9,11 +9,11 @@ export const metadata: Metadata = { title: "Downloads - SVR.JS", description: "Ready to get started with SVR.JS? Visit our downloads page to access the latest stable releases, nightly builds, and archived versions. Find the right fit for your needs today!", - url: "https://svrjs.org/downloads", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/downloads`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "Downloads - SVR.JS" @@ -26,7 +26,7 @@ export const metadata: Metadata = { title: "Downloads - SVR.JS", description: "Ready to get started with SVR.JS? Visit our downloads page to access the latest stable releases, nightly builds, and archived versions. Find the right fit for your needs today!", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/(root)/layout.tsx b/app/(root)/layout.tsx index 3283309..b23ccd9 100644 --- a/app/(root)/layout.tsx +++ b/app/(root)/layout.tsx @@ -14,11 +14,11 @@ export const metadata: Metadata = { title: "SVR.JS - a web server running on Node.JS", description: "Experience unparalleled flexibility with SVR.JS - the ultimate web server for Node.JS. Host web pages, run server-side JavaScript, utilize mods for extended functionality, and more. Integrated log viewer and user management tools included. Also supports Bun (experimental).", - url: "https://svrjs.org", + url: `${process.env.WEBSITE_URL}`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "SVR.JS - a web server running on Node.JS" @@ -31,7 +31,7 @@ export const metadata: Metadata = { title: "SVR.JS - a web server running on Node.JS", description: "Experience unparalleled flexibility with SVR.JS - the ultimate web server for Node.JS. Host web pages, run server-side JavaScript, utilize mods for extended functionality, and more. Integrated log viewer and user management tools included. Also supports Bun (experimental).", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/(root)/mods/layout.tsx b/app/(root)/mods/layout.tsx index 679854d..2c19d03 100644 --- a/app/(root)/mods/layout.tsx +++ b/app/(root)/mods/layout.tsx @@ -9,11 +9,11 @@ export const metadata: Metadata = { title: "Mods - SVR.JS", description: "Expand the functionality of SVR.JS with our collection of mods! Visit the mod downloads page to explore, download, and install a wide range of mods tailored to enhance your web server experience.", - url: "https://svrjs.org/mods", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/mods`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "Mods - SVR.JS" @@ -26,7 +26,7 @@ export const metadata: Metadata = { title: "Mods - SVR.JS", description: "Expand the functionality of SVR.JS with our collection of mods! Visit the mod downloads page to explore, download, and install a wide range of mods tailored to enhance your web server experience.", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/(root)/newsletter/page.tsx b/app/(root)/newsletter/page.tsx index d350552..030a55a 100644 --- a/app/(root)/newsletter/page.tsx +++ b/app/(root)/newsletter/page.tsx @@ -10,11 +10,11 @@ export const metadata: Metadata = { title: "Newsletter - SVR.JS", description: "Subscribe to our newsletter for updates. We promise no spam emails will be sent.", - url: "https://svrjs.org/newsletter", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/newsletter`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "Newsletter - SVR.JS" @@ -27,7 +27,7 @@ export const metadata: Metadata = { title: "Newsletter - SVR.JS", description: "Subscribe to our newsletter for updates. We promise no spam emails will be sent.", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/(root)/privacy/page.tsx b/app/(root)/privacy/page.tsx index f7782b8..5d65471 100644 --- a/app/(root)/privacy/page.tsx +++ b/app/(root)/privacy/page.tsx @@ -13,11 +13,11 @@ export const metadata: Metadata = { title: "Privacy Policy - SVR.JS", description: "Learn how we collect, use, and protect your data. Our Privacy Policy outlines our commitment to your privacy and the measures we take to safeguard your information when visiting our website.", - url: "https://svrjs.org/privacy", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/privacy`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "Privacy Policy - SVR.JS" @@ -30,7 +30,7 @@ export const metadata: Metadata = { title: "Privacy Policy - SVR.JS", description: "Learn how we collect, use, and protect your data. Our Privacy Policy outlines our commitment to your privacy and the measures we take to safeguard your information when visiting our website.", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/(root)/tos/page.tsx b/app/(root)/tos/page.tsx index c987a11..2a0fef4 100644 --- a/app/(root)/tos/page.tsx +++ b/app/(root)/tos/page.tsx @@ -11,11 +11,11 @@ export const metadata: Metadata = { title: "Terms of Service - SVR.JS", description: "Understand your rights and responsibilities when using SVR.JS. Our Terms of Service page outlines the conditions for visiting our website, ensuring a transparent and fair experience for all users.", - url: "https://svrjs.org/tos", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/tos`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "Terms of Service - SVR.JS" @@ -28,7 +28,7 @@ export const metadata: Metadata = { title: "Terms of Service - SVR.JS", description: "Understand your rights and responsibilities when using SVR.JS. Our Terms of Service page outlines the conditions for visiting our website, ensuring a transparent and fair experience for all users.", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/(root)/unsubscribe/layout.tsx b/app/(root)/unsubscribe/layout.tsx index fa7b4f1..eb3111e 100644 --- a/app/(root)/unsubscribe/layout.tsx +++ b/app/(root)/unsubscribe/layout.tsx @@ -10,11 +10,11 @@ export async function generateMetadata({ openGraph: { title: "Unsubscribe - SVR.JS", description: "Unsubscribe from our newsletter.", - url: `https://svrjs.org/unsubscribe/?id=${encodeURIComponent(searchParams ? searchParams.id : "")}`, + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/unsubscribe/?id=${encodeURIComponent(searchParams ? searchParams.id : "")}`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "Unsubscribe - SVR.JS" @@ -26,7 +26,9 @@ export async function generateMetadata({ site: "@SVR_JS", title: "Unsubscribe - SVR.JS", description: "Unsubscribe from our newsletter.", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [ + `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png` + ], creator: "@SVR_JS" } }; diff --git a/app/(root)/vulnerabilities/layout.tsx b/app/(root)/vulnerabilities/layout.tsx index 1a84d45..6e43348 100644 --- a/app/(root)/vulnerabilities/layout.tsx +++ b/app/(root)/vulnerabilities/layout.tsx @@ -9,11 +9,11 @@ export const metadata: Metadata = { title: "Vulnerabilities - SVR.JS", description: "Learn about potential security risks associated with outdated SVR.JS web server versions. Stay informed and safeguard your web applications from potential threats with timely updates.", - url: "https://svrjs.org/vulnerabilities", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/vulnerabilities`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "Vulnerabilities - SVR.JS" @@ -26,7 +26,7 @@ export const metadata: Metadata = { title: "Vulnerabilities - SVR.JS", description: "Learn about potential security risks associated with outdated SVR.JS web server versions. Stay informed and safeguard your web applications from potential threats with timely updates.", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/layout.tsx b/app/layout.tsx index 17a0de8..b2dc836 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -17,11 +17,11 @@ export const metadata: Metadata = { title: "SVR.JS - a web server running on Node.JS", description: "Experience unparalleled flexibility with SVR.JS - the ultimate web server for Node.JS. Host web pages, run server-side JavaScript, utilize mods for extended functionality, and more. Integrated log viewer and user management tools included. Also supports Bun (experimental).", - url: "https://svrjs.org", + url: `${process.env.WEBSITE_URL}`, type: "website", images: [ { - url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, alt: "SVR.JS - a web server running on Node.JS" @@ -34,7 +34,7 @@ export const metadata: Metadata = { title: "SVR.JS - a web server running on Node.JS", description: "Experience unparalleled flexibility with SVR.JS - the ultimate web server for Node.JS. Host web pages, run server-side JavaScript, utilize mods for extended functionality, and more. Integrated log viewer and user management tools included. Also supports Bun (experimental).", - images: ["https://svrjs.vercel.app/metadata/svrjs-cover.png"], + images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } }; diff --git a/app/rss.xml/route.ts b/app/rss.xml/route.ts index 33e2150..818c146 100644 --- a/app/rss.xml/route.ts +++ b/app/rss.xml/route.ts @@ -9,7 +9,7 @@ export async function GET() { // Define the site URL based on the environment const SITE_URL = process.env.NODE_ENV === "production" - ? "https://svrjs.vercel.app" + ? `${process.env.WEBSITE_URL}` : "http://localhost:3000"; const postsQuery = `*[_type == 'blog'] | order(_createdAt desc) { diff --git a/app/sitemap.ts b/app/sitemap.ts index eb8c283..99961b3 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -17,12 +17,12 @@ export default async function sitemap() { "/vulnerabilities", "/newsletter" ].map((route) => ({ - url: `https://svrjs.vercel.app${route}`, + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}${route}`, lastModified: new Date().toISOString().split("T")[0] })); const blogRoutes = blogPostSlugs.map((slug) => ({ - url: `https://svrjs.vercel.app/blog/${slug.slug}`, + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog/${slug.slug}`, lastModified: new Date().toISOString().split("T")[0] })); @@ -32,7 +32,7 @@ export default async function sitemap() { const db = client.db(process.env.MONGODB_DB); const slugs = await db.collection("pages").find().toArray(); changelogRoutes = slugs.map((slug) => ({ - url: `https://svrjs.vercel.app/changelog/${slug.slug}`, + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/changelog/${slug.slug}`, lastModified: new Date().toISOString().split("T")[0] })); } catch (err) {} diff --git a/constants/index.tsx b/constants/index.tsx index 81323cc..2b67cc5 100644 --- a/constants/index.tsx +++ b/constants/index.tsx @@ -167,7 +167,7 @@ export const FOOTERLINKS = { label: "Privacy Policy" }, rightsReserved: { - href: "https://svrjs.org/", + href: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/`, label: "SVR.JS" } } @@ -316,17 +316,17 @@ export const EXAMPLE_A1 = ` - +

Title

- Thumbnail + Thumbnail
Put contents of the newsletter email here. -

Go to SVR.JS website

+

Go to SVR.JS website

-

You can unsubscribe from the newsletter here.

+

You can unsubscribe from the newsletter here.

`; diff --git a/theme.config.tsx b/theme.config.tsx index 40e5c05..e01e208 100644 --- a/theme.config.tsx +++ b/theme.config.tsx @@ -6,7 +6,7 @@ export default { head: function Head() { const { asPath, defaultLocale, locale } = useRouter(); const { frontMatter } = useConfig(); - const url = `https://svrjs.org/${asPath}`; + const url = `${process.env.NEXT_PUBLIC_WEBSITE_URL}/${asPath}`; return ( <> @@ -28,7 +28,7 @@ export default { {(frontMatter.title || "Documentation") + " - SVR.JS"} @@ -42,7 +42,7 @@ export default { /> ); @@ -84,8 +84,4 @@ export default { }, primaryHue: 136, primarySaturation: 75 - // banner: { - // key: "svrjs", - // text: 🎉 Check out SVR.JS Now. Read more →, - // }, };