Skip to content

Commit 40533ec

Browse files
committed
Merge branch 'claude/fix-favicon-metadata-d2rqY' into 'master'
Fix favicon metadata and consolidate site branding constants Closes #156 See merge request postgres-ai/docs!845
2 parents ff55154 + a5789f1 commit 40533ec

6 files changed

Lines changed: 41 additions & 14 deletions

File tree

docusaurus.config.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
const path = require('path')
22

3+
// Site-wide constants (single source of truth)
4+
const { SITE_NAME, SITE_SLOGAN } = require('./src/config/site.json')
5+
36
const URL = !!process.env.URL ? process.env.URL : 'https://v2.postgres.ai/'
47
const COLOR_MODE = typeof window !== 'undefined' && window.localStorage.getItem('theme') === 'dark' ? 'dark' : 'light'
58
const 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-
2730
const CONSULTING_WEBHOOK = process.env.CONSULTING_WEBHOOK ? process.env.CONSULTING_WEBHOOK : ''
2831

2932
module.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
},

src/config/site.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"SITE_NAME": "PostgresAI",
3+
"SITE_SLOGAN": "Stop firefighting Postgres"
4+
}

src/config/site.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Site-wide constants for PostgresAI documentation
3+
*
4+
* Re-exports from site.json which serves as the single source of truth
5+
* for both Docusaurus config (CommonJS) and React components (ESM).
6+
*/
7+
8+
import siteConfig from './site.json'
9+
10+
export const SITE_NAME: string = siteConfig.SITE_NAME
11+
export const SITE_SLOGAN: string = siteConfig.SITE_SLOGAN

src/pages/index.module.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
.tagline {
2+
font-family: "JetBrains Mono Variable", "JetBrains Mono", "Fira Code", "Source Code Pro", monospace;
3+
font-size: 1.1rem;
4+
font-weight: 500;
5+
color: #ff6112;
6+
margin: 32px 0 8px 0 !important;
7+
letter-spacing: 0.02em;
8+
}
9+
110
.mainTitle {
2-
margin: 32px 0 12px 0 !important;
11+
margin: 0 0 12px 0 !important;
312
font-family: "JetBrains Mono Variable", "JetBrains Mono", "Fira Code", "Source Code Pro", monospace;
413
font-size: 1rem !important;
514
line-height: 1.4;

src/pages/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext'
44

55
import styles from './index.module.css'
66
import { TRUSTED_BY_COMPANIES } from './pricing'
7+
import { SITE_NAME, SITE_SLOGAN } from '../config/site'
78

89
// Testimonials
910
const testimonials = [
@@ -38,7 +39,7 @@ function IndexPage() {
3839
if (typeof signInUrl !== 'string') return null
3940

4041
return (
41-
<Layout title="PostgresAIself-healing Postgres for fast-growing startups">
42+
<Layout title={`${SITE_NAME}${SITE_SLOGAN}`}>
4243
<main>
4344
{/* Hero Section with Video */}
4445
<section className="banner position-relative text-center">
@@ -53,12 +54,12 @@ function IndexPage() {
5354
Ship your product features instead of fighting Postgres fires
5455
</p>
5556
*/}
57+
<p className={styles.tagline}>{SITE_SLOGAN}</p>
5658
<h1 className={styles.mainTitle}>
5759
Your next Postgres outage is already in your logs
5860
</h1>
5961
<p className={styles.subtitle}>
60-
PostgresAI scans your database automatically and delivers fixes.<br />
61-
Before problems take your Postgres down
62+
PostgresAI finds Postgres problems and delivers fixes automatically — so your team can focus on the roadmap.
6263
</p>
6364

6465
{/* Video Container */}

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"extends": "@tsconfig/docusaurus/tsconfig.json",
33
"compilerOptions": {
44
"baseUrl": ".",
5+
"resolveJsonModule": true
56
},
67
"include": ["src/"]
78
}

0 commit comments

Comments
 (0)