create-unmint 1.3.2 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-unmint",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "Create a new Unmint documentation project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -90,13 +90,18 @@ export function getCSSVariables(mode: 'light' | 'dark') {
90
90
 
91
91
  /**
92
92
  * Get the site URL dynamically
93
- * Priority: NEXT_PUBLIC_SITE_URL > VERCEL_URL > siteConfig.url
93
+ * Priority: NEXT_PUBLIC_SITE_URL > VERCEL_PROJECT_PRODUCTION_URL > VERCEL_URL > siteConfig.url
94
94
  * This allows OG images to work automatically on Vercel without configuration
95
95
  */
96
96
  export function getSiteUrl(): string {
97
97
  if (process.env.NEXT_PUBLIC_SITE_URL) {
98
98
  return process.env.NEXT_PUBLIC_SITE_URL
99
99
  }
100
+ // Use production URL if available (custom domain)
101
+ if (process.env.VERCEL_PROJECT_PRODUCTION_URL) {
102
+ return `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`
103
+ }
104
+ // Fallback to deployment URL for preview deployments
100
105
  if (process.env.VERCEL_URL) {
101
106
  return `https://${process.env.VERCEL_URL}`
102
107
  }