11const path = require ( 'path' )
22
3+ // Site-wide constants (single source of truth)
4+ const { SITE_NAME , SITE_SLOGAN } = require ( './src/config/site.json' )
5+
36const URL = ! ! process . env . URL ? process . env . URL : 'https://v2.postgres.ai/'
47const COLOR_MODE = typeof window !== 'undefined' && window . localStorage . getItem ( 'theme' ) === 'dark' ? 'dark' : 'light'
58const API_URL_PREFIX = ! ! process . env . API_URL_PREFIX ? process . env . API_URL_PREFIX : 'https://postgres.ai/api/general' // was: 'https://v2.postgres.ai/api/general/'
@@ -27,14 +30,12 @@ const BOT_WS_URL = !!process.env.BOT_WS_URL ? process.env.BOT_WS_URL : '/ai-bot-
2730const CONSULTING_WEBHOOK = process . env . CONSULTING_WEBHOOK ? process . env . CONSULTING_WEBHOOK : ''
2831
2932module . exports = {
30- title :
31- 'PostgresAI' , // Title for your website.
32- tagline :
33- 'Self-healing Postgres for fast-growing startups. Ship features instead of fighting database fires.' ,
33+ title : SITE_NAME ,
34+ tagline : SITE_SLOGAN ,
3435 url : URL , // Your website URL.
3536 baseUrl : BASE_URL , // Base URL for your project.
3637 onBrokenLinks : 'warn' , //'throw',
37- favicon : 'favicon.svg' ,
38+ favicon : '/ favicon.svg' ,
3839 organizationName : 'postgres-ai' ,
3940 projectName : 'docs' ,
4041
@@ -86,7 +87,7 @@ module.exports = {
8687 tagName : 'meta' ,
8788 attributes : {
8889 name : 'apple-mobile-web-app-title' ,
89- content : 'PostgresAI' ,
90+ content : SITE_NAME ,
9091 } ,
9192 } ,
9293 {
@@ -109,7 +110,7 @@ module.exports = {
109110 // This options will overwrite options from pages with the same name/property.
110111 { 'http-equiv' : 'x-dns-prefetch-control' , content : 'on' } ,
111112 { property : 'og:locale' , content : 'en_US' } ,
112- { property : 'og:site_name' , content : 'PostgresAI' } ,
113+ { property : 'og:site_name' , content : SITE_NAME } ,
113114 { property : 'og:image' , content : `${ URL } /img/og-image.png` } ,
114115 {
115116 property : 'article:publisher' ,
@@ -131,7 +132,7 @@ module.exports = {
131132 } ,
132133
133134 navbar : {
134- title : 'PostgresAI' ,
135+ title : SITE_NAME ,
135136 logo : {
136137 alt : 'PostgresAI logo' ,
137138 src : 'img/logo.svg' ,
@@ -369,7 +370,7 @@ module.exports = {
369370 ] ,
370371 } ,
371372 ] ,
372- copyright : `Copyright © ${ new Date ( ) . getFullYear ( ) } PostgresAI ` ,
373+ copyright : `Copyright © ${ new Date ( ) . getFullYear ( ) } ${ SITE_NAME } ` ,
373374 } ,
374375
375376 prism : {
@@ -594,7 +595,7 @@ module.exports = {
594595 type : 'all' ,
595596 title : '' , // default to siteConfig.title
596597 description : '' , // default to `${siteConfig.title} Blog`
597- copyright : 'PostgresAI' ,
598+ copyright : SITE_NAME ,
598599 language : undefined , // possible values: http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
599600 } ,
600601 } ,
0 commit comments