Add initial project files

This commit is contained in:
Igor Martyniuk
2026-09-01 13:03:41 +03:00
parent 22e111bb44
commit 74cb5b6176
1841 changed files with 242819 additions and 30 deletions
+18
View File
@@ -0,0 +1,18 @@
/**
* The public origin of this site, used as Next's `metadataBase`.
*/
const DEVELOPMENT_FALLBACK = 'http://localhost:3000';
export function siteUrl(): URL {
const configured = process.env['SITE_URL']?.trim();
if (configured) {
return new URL(configured);
}
if (process.env.NODE_ENV === 'production') {
console.error('SITE_URL is not set — canonical and Open Graph URLs will point at localhost.');
}
return new URL(DEVELOPMENT_FALLBACK);
}