-
Notifications
You must be signed in to change notification settings - Fork 298
Expand file tree
/
Copy pathconfig.py
More file actions
31 lines (24 loc) · 1.09 KB
/
Copy pathconfig.py
File metadata and controls
31 lines (24 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# config.py
# Application configuration settings for DevPath.
#
# This module centralizes all configuration values that might change
# between environments (development, production, forks).
import os
class Config:
"""Base configuration class with sensible defaults."""
# Base URL for the application - used for OG tags and canonical URLs
# Can be overridden via environment variable for different deployments
BASE_URL = os.getenv("BASE_URL", "https://mydevpath-github.vercel.app")
# Application metadata for OG tags
SITE_NAME = "DevPath"
SITE_DESCRIPTION = "Get personalized coding project recommendations with step-by-step roadmaps and starter code."
# OG image path (relative to static folder)
OG_IMAGE_PATH = "/static/og-banner.png"
@classmethod
def get_og_image_url(cls):
"""Return the full URL for the OG banner image."""
return f"{cls.BASE_URL.rstrip('/')}{cls.OG_IMAGE_PATH}"
@classmethod
def get_base_url(cls):
"""Return the base URL without trailing slash."""
return cls.BASE_URL.rstrip("/")