Update environment variables and improve layout components. Added NEXT_PUBLIC_SITE_URL to docker-compose for site URL configuration. Refined metadata generation in layout files to reflect the new site URL. Enhanced layout structure in professional and main components for better dynamic content handling.
This commit is contained in:
1 parent
58a0d95bb2
commit
27b2c893ea
6 files changed
+12
-5
No files matched your search
@@ -7,6 +7,10 @@ import { getPrograms } from "@/lib/data/programs";
|
||||
import { getCampaignBanners } from "@/lib/data/site";
|
||||
import { homeNav, siteShortName } from "@/lib/site-config";
|
||||
|
||||
// Public CMS pages must read Postgres at request time — static bake at Docker
|
||||
// build often has no DATABASE_URL and ships empty lists.
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function MainLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ const iranSans = localFont({
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const t = await getTranslations("meta");
|
||||
const siteUrl =
|
||||
process.env.NEXT_PUBLIC_SITE_URL ?? "https://aut.insaight.net";
|
||||
process.env.NEXT_PUBLIC_SITE_URL ?? "https://edu.mstaut.ir";
|
||||
return {
|
||||
metadataBase: new URL(siteUrl),
|
||||
title: {
|
||||
|
||||
@@ -5,6 +5,8 @@ import { getCourses } from "@/lib/data/courses";
|
||||
import { getPrograms } from "@/lib/data/programs";
|
||||
import { professionalNav, siteShortName } from "@/lib/site-config";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function ProfessionalLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
|
||||
Reference in new issue
Block a user