Riksdagsmonitor Intelligence Platform - v0.7.19
    Preparing search index...
    • Generate an embeddable SWOT analysis section.

      Returns a TemplateSection that can be appended to ArticleData.sections. The section renders as a 2×2 CSS Grid matrix styled to match the existing cyberpunk article theme.

      Parameters

      Returns TemplateSection

      import { generateSwotSection } from './content-generators/swot-section.js';

      const section = generateSwotSection({
      data: {
      subject: 'Socialdemokraterna (S)',
      strengths: [{ text: 'Largest party', impact: 'high' }],
      weaknesses: [{ text: 'Internal divisions', impact: 'medium' }],
      opportunities: [{ text: 'Rising voter concern on welfare', impact: 'high' }],
      threats: [{ text: 'Coalition fragmentation', impact: 'medium' }],
      },
      lang: 'en',
      });

      articleData.sections = [...(articleData.sections ?? []), section];