Skip to main content

Metadata System

This document provides an overview of the metadata system used in RallyPoynt OS documentation. The system extracts, validates, and utilizes frontmatter metadata from Markdown files to create relationships, taxonomies, navigation structures, and search indexes.

Components

The metadata system consists of several interconnected components:

  1. Frontmatter Schema - Defines the structure and validation rules for document metadata
  2. Relationship Management System - Validates and manages content relationships
  3. Metadata Extraction System - Extracts and processes metadata into usable formats
  4. UI Components - Displays metadata-driven content to users

Integration with Docusaurus

The metadata system is integrated into the Docusaurus build process through a custom plugin (metadata-extraction-plugin). This plugin:

  1. Runs during the build process to extract metadata from all content files
  2. Generates necessary data structures (search indexes, navigation, taxonomies, relationship maps)
  3. Makes the data available to React components through generated JSON files
  4. Creates specialized routes for metadata exploration

The plugin is configured in docusaurus.config.ts and works alongside the frontmatter validation plugin.

Generated Metadata

The system generates several types of metadata:

  • Content Maps - Comprehensive mapping of all content and its metadata
  • Search Indexes - Optimized structures for content search and discovery
  • Navigation Structures - Hierarchical content organization
  • Taxonomies - Tag and business area categorization
  • Relationship Maps - Content connections and references

Accessing Metadata

Metadata can be accessed through:

  1. UI Components - Use the MetadataExplorer, TagExplorer, and BusinessAreaExplorer components
  2. JSON Files - Access raw metadata in the /static/metadata directory
  3. JavaScript API - Import metadata directly from @metadata/* path aliases

Adding or Modifying Metadata

To add or modify content metadata:

  1. Add appropriate frontmatter to your Markdown files following the schema
  2. Run validation using the pre-commit hooks or GitHub Actions
  3. Use the relationship management system to create content connections
  4. The metadata extraction system will automatically process your changes during build

Validation

The system includes validation mechanisms:

  1. Pre-commit Hook - Validates frontmatter before allowing commits
  2. GitHub Action - Validates metadata during CI/CD
  3. Development Environment Plugin - Provides real-time validation feedback
  • scripts/js/extract-metadata.js - Core metadata extraction logic
  • scripts/js/manage-relationships.js - Relationship validation and analysis
  • plugins/metadata-extraction-plugin/index.js - Docusaurus integration

UI Components

  • src/components/MetadataExplorer - Browse all metadata
  • src/components/TagExplorer - Browse content by tag
  • src/components/BusinessAreaExplorer - Browse by business area