Files
wiki/src/components/RightSidebar.tsx
Wayne Sutton a87db9d171 docs: add changelog entries for v1.33.1 through v1.37.0
Add missing changelog entries to content/pages/changelog-page.md:

v1.34.0 (2025-12-26): Blog page featured layout with hero post
- blogFeatured frontmatter field for posts
- Hero card displays first featured post with landscape image
- 2-column featured row for remaining featured posts
- 3-column grid for regular posts

v1.35.0 (2025-12-26): Image support at top of posts and pages
- showImageAtTop frontmatter field
- Full-width image display above post header
- Works for both posts and pages

v1.36.0 (2025-12-27): Social footer component
- Customizable social links (8 platform types)
- Copyright with auto-updating year
- showSocialFooter frontmatter field for per-page control
- Configurable via siteConfig.socialFooter

v1.37.0 (2025-12-27): Newsletter Admin UI
- Three-column admin interface at /newsletter-admin
- Subscriber management with search and filters
- Send newsletter panel (post selection or custom email)
- Weekly digest automation (Sunday 9am UTC)
- Developer notifications (subscriber alerts, weekly stats)
- Markdown-to-HTML conversion for custom emails
2025-12-27 15:32:07 -08:00

51 lines
1.5 KiB
TypeScript

// Right sidebar component
// Conditionally renders AI chat when enabled via frontmatter and siteConfig
import AIChatView from "./AIChatView";
import siteConfig from "../config/siteConfig";
interface RightSidebarProps {
aiChatEnabled?: boolean; // From frontmatter aiChat: true/false (undefined = not set)
pageContent?: string; // Page markdown content for AI context
slug?: string; // Page/post slug for chat context ID
}
export default function RightSidebar({
aiChatEnabled = false,
pageContent,
slug,
}: RightSidebarProps) {
// Check if AI chat should be shown
// Requires:
// 1. Global config enabled (siteConfig.aiChat.enabledOnContent)
// 2. Frontmatter explicitly enabled (aiChat: true)
// 3. Slug exists for context ID
// If aiChat: false is set in frontmatter, chat will be hidden even if global config is enabled
const showAIChat =
siteConfig.aiChat.enabledOnContent &&
aiChatEnabled === true &&
slug;
if (showAIChat) {
return (
<aside className="post-sidebar-right">
<div className="right-sidebar-ai-chat">
<AIChatView
contextId={slug}
pageContent={pageContent}
hideAttachments={true}
/>
</div>
</aside>
);
}
// Default empty sidebar for layout spacing
return (
<aside className="post-sidebar-right">
<div className="right-sidebar-content">
{/* Empty - maintains layout spacing */}
</div>
</aside>
);
}