Files
3031023-xyz-public/src/lib/site-data.js
T

17 lines
550 B
JavaScript

import manifest from '../../sites.json';
import www from '../../sites/www/site.json';
import blog from '../../sites/blog/site.json';
const content = { www, blog };
const key = process.env.SITE_KEY || 'www';
if (!Object.hasOwn(manifest.sites, key) || !Object.hasOwn(content, key)) {
throw new Error(`Unknown SITE_KEY: ${key}`);
}
export const siteKey = key;
export const deployment = manifest.sites[key];
export const site = content[key];
export const isBlog = key === 'blog';
export const isProduction = process.env.DEPLOY_ENV === 'production';