@dirsigler/astro-techradar 0.3.0 → 0.4.0

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/config.ts CHANGED
@@ -18,11 +18,14 @@ export interface ResolvedColorMode {
18
18
  }
19
19
 
20
20
  export interface TechRadarUserConfig {
21
- /** Navbar title text */
22
- title: string;
21
+ /** Brand name shown in the navbar. */
22
+ name: string;
23
+
24
+ /** Main page title shown as the h1 heading. Falls back to name if not set. */
25
+ title?: string;
23
26
 
24
- /** Main page headline. Falls back to title if not set. */
25
- headline?: string;
27
+ /** Subtitle shown below the title on the main page. */
28
+ subtitle?: string;
26
29
 
27
30
  /**
28
31
  * URL path prefix where the tech radar is mounted (e.g. "/techradar").
@@ -54,8 +57,9 @@ export interface TechRadarUserConfig {
54
57
  }
55
58
 
56
59
  export interface ResolvedConfig {
60
+ name: string;
57
61
  title: string;
58
- headline: string;
62
+ subtitle?: string;
59
63
  /** Normalized base path with leading slash, no trailing slash. Empty string when mounted at root. */
60
64
  basePath: string;
61
65
  logo?: string;
@@ -76,8 +80,9 @@ function normalizeBasePath(raw?: string): string {
76
80
 
77
81
  export function resolveConfig(user: TechRadarUserConfig): ResolvedConfig {
78
82
  return {
79
- title: user.title,
80
- headline: user.headline ?? user.title,
83
+ name: user.name,
84
+ title: user.title ?? user.name,
85
+ subtitle: user.subtitle,
81
86
  basePath: normalizeBasePath(user.basePath),
82
87
  logo: user.logo,
83
88
  footerText: user.footerText ?? '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dirsigler/astro-techradar",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "description": "An interactive technology radar Astro integration — track technology adoption across your organization",
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@ interface Props {
10
10
  description?: string;
11
11
  }
12
12
 
13
- const { title = config.title, description = 'Technology Radar — tracking technology adoption across our organization' } = Astro.props;
13
+ const { title = config.name, description = 'Technology Radar — tracking technology adoption across our organization' } = Astro.props;
14
14
  const siteBase = import.meta.env.BASE_URL.replace(/\/+$/, '');
15
15
  const base = `${siteBase}${config.basePath}/`;
16
16
  const canonicalUrl = new URL(Astro.url.pathname, Astro.site);
@@ -61,11 +61,11 @@ const canonicalUrl = new URL(Astro.url.pathname, Astro.site);
61
61
  {config.logo && (
62
62
  <img
63
63
  src={config.logo.startsWith('https://') ? config.logo : `${base}${config.logo.replace(/^\//, '')}`}
64
- alt={config.title}
64
+ alt={config.name}
65
65
  class="h-8 w-auto"
66
66
  />
67
67
  )}
68
- {config.title}
68
+ {config.name}
69
69
  </a>
70
70
  {config.color.toggle && <ThemeToggle />}
71
71
  </nav>
@@ -53,12 +53,14 @@ const legendSegments = segments.map((s) => ({
53
53
  const ringEntries = Object.entries(RING_LABELS) as [string, string][];
54
54
  ---
55
55
 
56
- <Base title={config.title}>
56
+ <Base title={config.name}>
57
57
  <div class="text-center mb-10">
58
- <h1 class="text-4xl font-bold" style="color: var(--radar-text);">{config.headline}</h1>
59
- <p class="mt-3 text-lg" style="color: var(--radar-text-muted);">
60
- An overview of the technologies, frameworks, processes, and languages we use and evaluate.
61
- </p>
58
+ <h1 class="text-4xl font-bold" style="color: var(--radar-text);">{config.title}</h1>
59
+ {config.subtitle && (
60
+ <p class="mt-3 text-lg" style="color: var(--radar-text-muted);">
61
+ {config.subtitle}
62
+ </p>
63
+ )}
62
64
  </div>
63
65
 
64
66
  <!-- Filter bar -->