fix: move the website URL to the environment variable

This commit is contained in:
Dorian Niemiec 2024-09-08 13:16:43 +02:00
parent 7c58ed45b3
commit 7327a586bb
21 changed files with 66 additions and 64 deletions

View file

@ -10,6 +10,8 @@ ADMIN_PASSWORD=
NEXTAUTH_SECRET= NEXTAUTH_SECRET=
NEXTAUTH_URL= NEXTAUTH_URL=
NEXT_PUBLIC_WEBSITE_URL=
EMAIL_SERVER= EMAIL_SERVER=
EMAIL_PORT= EMAIL_PORT=
EMAIL_SECURE= EMAIL_SECURE=

View file

@ -67,13 +67,13 @@ export async function generateMetadata({
openGraph: { openGraph: {
title: `${data.title} - SVR.JS`, title: `${data.title} - SVR.JS`,
description: data.smallDescription, description: data.smallDescription,
url: `https://svrjs.org/blog/${data.currentSlug}`, url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog/${data.currentSlug}`,
type: "website", type: "website",
images: [ images: [
{ {
url: data.titleImage url: data.titleImage
? urlFor(data.titleImage).url() ? urlFor(data.titleImage).url()
: "https://svrjs.vercel.app/blog-missing.png", : `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog-missing.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: `${data.title} - SVR.JS` alt: `${data.title} - SVR.JS`
@ -88,7 +88,7 @@ export async function generateMetadata({
images: [ images: [
data.titleImage data.titleImage
? urlFor(data.titleImage).url() ? urlFor(data.titleImage).url()
: "https://svrjs.vercel.app/blog-missing.png" : `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog-missing.png`
], ],
creator: "@SVR_JS" creator: "@SVR_JS"
} }

View file

@ -15,11 +15,11 @@ export const metadata: Metadata = {
title: "Blog - SVR.JS", title: "Blog - SVR.JS",
description: 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.", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "Blog - SVR.JS" alt: "Blog - SVR.JS"
@ -32,7 +32,7 @@ export const metadata: Metadata = {
title: "Blog - SVR.JS", title: "Blog - SVR.JS",
description: 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.", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -16,11 +16,11 @@ export const metadata: Metadata = {
title: "Blog - SVR.JS", title: "Blog - SVR.JS",
description: 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.", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "Blog - SVR.JS" alt: "Blog - SVR.JS"
@ -33,7 +33,7 @@ export const metadata: Metadata = {
title: "Blog - SVR.JS", title: "Blog - SVR.JS",
description: 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.", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -50,11 +50,11 @@ export async function generateMetadata({
openGraph: { openGraph: {
title: `${page.title} change log - 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.`, 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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: `${page.title} change log - SVR.JS` alt: `${page.title} change log - SVR.JS`
@ -66,7 +66,9 @@ export async function generateMetadata({
site: "@SVR_JS", site: "@SVR_JS",
title: `${page.title} change log - 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.`, 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" creator: "@SVR_JS"
} }
}; };

View file

@ -9,11 +9,11 @@ export const metadata: Metadata = {
title: "SVR.JS change log - SVR.JS", title: "SVR.JS change log - SVR.JS",
description: 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.", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "SVR.JS change log - SVR.JS" alt: "SVR.JS change log - SVR.JS"
@ -26,7 +26,7 @@ export const metadata: Metadata = {
title: "SVR.JS change log - SVR.JS", title: "SVR.JS change log - SVR.JS",
description: 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.", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -9,11 +9,11 @@ export const metadata: Metadata = {
title: "Contact Us - SVR.JS", title: "Contact Us - SVR.JS",
description: 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.", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "Contact Us - SVR.JS" alt: "Contact Us - SVR.JS"
@ -26,7 +26,7 @@ export const metadata: Metadata = {
title: "Contact Us - SVR.JS", title: "Contact Us - SVR.JS",
description: 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.", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -11,11 +11,11 @@ export const metadata: Metadata = {
title: "Contribute - SVR.JS", title: "Contribute - SVR.JS",
description: 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.", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "Contribute - SVR.JS" alt: "Contribute - SVR.JS"
@ -28,7 +28,7 @@ export const metadata: Metadata = {
title: "Contribute - SVR.JS", title: "Contribute - SVR.JS",
description: 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.", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -9,11 +9,11 @@ export const metadata: Metadata = {
title: "Downloads - SVR.JS", title: "Downloads - SVR.JS",
description: 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!", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "Downloads - SVR.JS" alt: "Downloads - SVR.JS"
@ -26,7 +26,7 @@ export const metadata: Metadata = {
title: "Downloads - SVR.JS", title: "Downloads - SVR.JS",
description: 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!", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -14,11 +14,11 @@ export const metadata: Metadata = {
title: "SVR.JS - a web server running on Node.JS", title: "SVR.JS - a web server running on Node.JS",
description: 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).", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "SVR.JS - a web server running on Node.JS" 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", title: "SVR.JS - a web server running on Node.JS",
description: 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).", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -9,11 +9,11 @@ export const metadata: Metadata = {
title: "Mods - SVR.JS", title: "Mods - SVR.JS",
description: 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.", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "Mods - SVR.JS" alt: "Mods - SVR.JS"
@ -26,7 +26,7 @@ export const metadata: Metadata = {
title: "Mods - SVR.JS", title: "Mods - SVR.JS",
description: 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.", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -10,11 +10,11 @@ export const metadata: Metadata = {
title: "Newsletter - SVR.JS", title: "Newsletter - SVR.JS",
description: description:
"Subscribe to our newsletter for updates. We promise no spam emails will be sent.", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "Newsletter - SVR.JS" alt: "Newsletter - SVR.JS"
@ -27,7 +27,7 @@ export const metadata: Metadata = {
title: "Newsletter - SVR.JS", title: "Newsletter - SVR.JS",
description: description:
"Subscribe to our newsletter for updates. We promise no spam emails will be sent.", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -13,11 +13,11 @@ export const metadata: Metadata = {
title: "Privacy Policy - SVR.JS", title: "Privacy Policy - SVR.JS",
description: 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.", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "Privacy Policy - SVR.JS" alt: "Privacy Policy - SVR.JS"
@ -30,7 +30,7 @@ export const metadata: Metadata = {
title: "Privacy Policy - SVR.JS", title: "Privacy Policy - SVR.JS",
description: 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.", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -11,11 +11,11 @@ export const metadata: Metadata = {
title: "Terms of Service - SVR.JS", title: "Terms of Service - SVR.JS",
description: 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.", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "Terms of Service - SVR.JS" alt: "Terms of Service - SVR.JS"
@ -28,7 +28,7 @@ export const metadata: Metadata = {
title: "Terms of Service - SVR.JS", title: "Terms of Service - SVR.JS",
description: 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.", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -10,11 +10,11 @@ export async function generateMetadata({
openGraph: { openGraph: {
title: "Unsubscribe - SVR.JS", title: "Unsubscribe - SVR.JS",
description: "Unsubscribe from our newsletter.", 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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "Unsubscribe - SVR.JS" alt: "Unsubscribe - SVR.JS"
@ -26,7 +26,9 @@ export async function generateMetadata({
site: "@SVR_JS", site: "@SVR_JS",
title: "Unsubscribe - SVR.JS", title: "Unsubscribe - SVR.JS",
description: "Unsubscribe from our newsletter.", 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" creator: "@SVR_JS"
} }
}; };

View file

@ -9,11 +9,11 @@ export const metadata: Metadata = {
title: "Vulnerabilities - SVR.JS", title: "Vulnerabilities - SVR.JS",
description: 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.", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "Vulnerabilities - SVR.JS" alt: "Vulnerabilities - SVR.JS"
@ -26,7 +26,7 @@ export const metadata: Metadata = {
title: "Vulnerabilities - SVR.JS", title: "Vulnerabilities - SVR.JS",
description: 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.", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -17,11 +17,11 @@ export const metadata: Metadata = {
title: "SVR.JS - a web server running on Node.JS", title: "SVR.JS - a web server running on Node.JS",
description: 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).", "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", type: "website",
images: [ images: [
{ {
url: "https://svrjs.vercel.app/metadata/svrjs-cover.png", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "SVR.JS - a web server running on Node.JS" 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", title: "SVR.JS - a web server running on Node.JS",
description: 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).", "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" creator: "@SVR_JS"
} }
}; };

View file

@ -9,7 +9,7 @@ export async function GET() {
// Define the site URL based on the environment // Define the site URL based on the environment
const SITE_URL = const SITE_URL =
process.env.NODE_ENV === "production" process.env.NODE_ENV === "production"
? "https://svrjs.vercel.app" ? `${process.env.WEBSITE_URL}`
: "http://localhost:3000"; : "http://localhost:3000";
const postsQuery = `*[_type == 'blog'] | order(_createdAt desc) { const postsQuery = `*[_type == 'blog'] | order(_createdAt desc) {

View file

@ -17,12 +17,12 @@ export default async function sitemap() {
"/vulnerabilities", "/vulnerabilities",
"/newsletter" "/newsletter"
].map((route) => ({ ].map((route) => ({
url: `https://svrjs.vercel.app${route}`, url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}${route}`,
lastModified: new Date().toISOString().split("T")[0] lastModified: new Date().toISOString().split("T")[0]
})); }));
const blogRoutes = blogPostSlugs.map((slug) => ({ 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] 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 db = client.db(process.env.MONGODB_DB);
const slugs = await db.collection("pages").find().toArray(); const slugs = await db.collection("pages").find().toArray();
changelogRoutes = slugs.map((slug) => ({ 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] lastModified: new Date().toISOString().split("T")[0]
})); }));
} catch (err) {} } catch (err) {}

View file

@ -167,7 +167,7 @@ export const FOOTERLINKS = {
label: "Privacy Policy" label: "Privacy Policy"
}, },
rightsReserved: { rightsReserved: {
href: "https://svrjs.org/", href: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/`,
label: "SVR.JS" label: "SVR.JS"
} }
} }
@ -316,17 +316,17 @@ export const EXAMPLE_A1 = `<!DOCTYPE html>
</style> </style>
</head> </head>
<body> <body>
<img class="logo" src="https://svrjs.org/logo-wide.png"> <img class="logo" src="${process.env.NEXT_PUBLIC_WEBSITE_URL}/logo-wide.png">
<main> <main>
<div class="content"> <div class="content">
<h1>Title</h1> <h1>Title</h1>
</div> </div>
<img class="thumbnail" src="https://svrjs.org/blog-missing.png" alt="Thumbnail"> <img class="thumbnail" src="${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog-missing.png" alt="Thumbnail">
<div class="content"> <div class="content">
Put contents of the newsletter email here. Put contents of the newsletter email here.
<p><a href="https://svrjs.org">Go to SVR.JS website</a></p> <p><a href="${process.env.NEXT_PUBLIC_WEBSITE_URL}">Go to SVR.JS website</a></p>
</div> </div>
</main> </main>
<p class="unsubscribe">You can unsubscribe from the newsletter <a href="https://svrjs.org/unsubscribe?id={unsubscribeId}">here</a>.</p> <p class="unsubscribe">You can unsubscribe from the newsletter <a href="${process.env.NEXT_PUBLIC_WEBSITE_URL}/unsubscribe?id={unsubscribeId}">here</a>.</p>
</body> </body>
</html>`; </html>`;

View file

@ -6,7 +6,7 @@ export default {
head: function Head() { head: function Head() {
const { asPath, defaultLocale, locale } = useRouter(); const { asPath, defaultLocale, locale } = useRouter();
const { frontMatter } = useConfig(); const { frontMatter } = useConfig();
const url = `https://svrjs.org/${asPath}`; const url = `${process.env.NEXT_PUBLIC_WEBSITE_URL}/${asPath}`;
return ( return (
<> <>
@ -28,7 +28,7 @@ export default {
<meta property="og:url" content={url} /> <meta property="og:url" content={url} />
<meta <meta
property="og:image" property="og:image"
content="https://svrjs.vercel.app/metadata/svrjs-cover.png" content={`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`}
/> />
<title>{(frontMatter.title || "Documentation") + " - SVR.JS"}</title> <title>{(frontMatter.title || "Documentation") + " - SVR.JS"}</title>
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
@ -42,7 +42,7 @@ export default {
/> />
<meta <meta
name="twitter:image" name="twitter:image"
content="https://svrjs.vercel.app/metadata/svrjs-cover.png" content={`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`}
/> />
</> </>
); );
@ -84,8 +84,4 @@ export default {
}, },
primaryHue: 136, primaryHue: 136,
primarySaturation: 75 primarySaturation: 75
// banner: {
// key: "svrjs",
// text: <a href="https://svrjs.org">🎉 Check out SVR.JS Now. Read more →</a>,
// },
}; };