Files
g-butandClaude Opus 4.5 53fd048b97 feat: implement knowledge center foundation with guides and infrastructure pages
- Add types/knowledge.ts with type definitions for guides, difficulty levels, and comparisons
- Add lib/knowledge.ts for GitHub-based content fetching with ISR caching
- Create knowledge components: DifficultyBadge, GuideCard, Callout, CodeBlock, TableOfContents
- Add /knowledge/guides page with difficulty and category filters
- Add /knowledge/guides/[slug] dynamic page for individual guide rendering with MDX
- Add /knowledge/infrastructure page with hosting comparison overview
- Update navigation menu with new Knowledge Center links

Content will be fetched from g-but/botsmann-knowledge-content GitHub repo.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 01:49:29 +01:00

31 lines
766 B
TypeScript

'use client';
import type { DifficultyLevel } from '@/types/knowledge';
import { difficultyConfig } from '@/types/knowledge';
interface DifficultyBadgeProps {
level: DifficultyLevel;
size?: 'sm' | 'md' | 'lg';
}
/**
* Badge component displaying difficulty level with appropriate styling
*/
export function DifficultyBadge({ level, size = 'md' }: DifficultyBadgeProps) {
const config = difficultyConfig[level];
const sizeClasses = {
sm: 'px-2 py-0.5 text-xs',
md: 'px-2.5 py-1 text-xs',
lg: 'px-3 py-1.5 text-sm',
};
return (
<span
className={`inline-flex items-center font-medium rounded-full border ${config.bgColor} ${config.color} ${config.borderColor} ${sizeClasses[size]}`}
>
{config.label}
</span>
);
}