Skip to main content

Overview

Content and documentation automations help maintain high-quality content with less manual effort. These automations can generate metadata, check for consistency, and enhance SEO.

Example: Blog Post Frontmatter Generator

Use Case: Automatically generate SEO-friendly metadata for blog posts. How it works:
  • Triggered when a PR adds or modifies markdown files in the blog directory
  • Reads the blog post content
  • Generates title suggestions, descriptions, and tags
  • Updates the frontmatter in the file
  • Comments on the PR with the suggestions
Trigger: PR opened with changes to blog/**/*.md Prompt Template:
A blog post has been added or modified in {file_path}.

1. Read the blog post content
2. Generate SEO-optimized metadata:
   - Title suggestions (3 options, max 60 characters)
   - Meta description (max 160 characters)
   - 5-7 relevant tags/keywords
   - Suggested social media preview text

3. Check if frontmatter exists:
   - If missing: Add complete frontmatter with generated content
   - If exists: Suggest improvements in a PR comment

4. Create a commit with the frontmatter changes
5. Comment on the PR with:
   - The generated metadata
   - SEO score and suggestions
   - Alternative title options for the author to consider
MCP Servers Needed: GitHub Content Guidelines:
  • Keep titles under 60 characters for SEO
  • Descriptions should be compelling and include keywords
  • Use markdown formatting in descriptions sparingly
  • Include publication date and author metadata

Tips for Content & Documentation Automations

  • Respect author intent - Provide suggestions rather than forcing changes; authors have final say
  • Maintain brand voice - Include brand guidelines in prompts to ensure tone consistency
  • Check for consistency - Automate checks for terminology, formatting, and style
  • Generate, don’t replace - Use AI for drafts and suggestions, with human review for published content
  • Follow SEO best practices - Include keyword placement, character limits, and meta tag optimization in prompts