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:
- Frontmatter Schema - Defines the structure and validation rules for document metadata
- Relationship Management System - Validates and manages content relationships
- Metadata Extraction System - Extracts and processes metadata into usable formats
- 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:
- Runs during the build process to extract metadata from all content files
- Generates necessary data structures (search indexes, navigation, taxonomies, relationship maps)
- Makes the data available to React components through generated JSON files
- 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:
- UI Components - Use the MetadataExplorer, TagExplorer, and BusinessAreaExplorer components
- JSON Files - Access raw metadata in the
/static/metadatadirectory - JavaScript API - Import metadata directly from
@metadata/*path aliases
Adding or Modifying Metadata
To add or modify content metadata:
- Add appropriate frontmatter to your Markdown files following the schema
- Run validation using the pre-commit hooks or GitHub Actions
- Use the relationship management system to create content connections
- The metadata extraction system will automatically process your changes during build
Validation
The system includes validation mechanisms:
- Pre-commit Hook - Validates frontmatter before allowing commits
- GitHub Action - Validates metadata during CI/CD
- Development Environment Plugin - Provides real-time validation feedback
Related Scripts
scripts/js/extract-metadata.js- Core metadata extraction logicscripts/js/manage-relationships.js- Relationship validation and analysisplugins/metadata-extraction-plugin/index.js- Docusaurus integration
UI Components
src/components/MetadataExplorer- Browse all metadatasrc/components/TagExplorer- Browse content by tagsrc/components/BusinessAreaExplorer- Browse by business area