sitemap:generate
Generates the sitemap.xml file for search engine optimization.
Overview
This command creates a comprehensive XML sitemap containing all publicly accessible URLs on the website. The sitemap helps search engines discover and index content more efficiently, improving SEO performance.
Key Features: Automatic URL discovery, priority weighting, change frequency hints, XML validation.
Usage
Options
This command has no specific options - it automatically generates a complete sitemap using configured settings.
Generation Process
The command follows this workflow:
Discovers all public URLs from the application routes
Queries database for dynamic content (games, creators, etc.)
Calculates priorities based on content importance
Determines change frequencies based on content type
Generates XML sitemap following sitemap protocol
Validates XML output for compliance
Saves sitemap file to public directory
Examples
Generates a complete sitemap.xml file with all public URLs.
Shows detailed information about URLs being included.
Only shows errors, useful for automated execution.
When to Use
Recommended Usage Scenarios
Scheduled execution (daily or weekly) for regular updates
After adding new games or content to the database
When launching new features or pages
After significant content updates or reorganization
During SEO optimization campaigns
URL Categories
The sitemap includes various types of URLs:
Static Pages
Homepage: Main site entry point
About/Help Pages: Informational content
Category Pages: Game browsing and filtering
Search Pages: Game discovery interfaces
Dynamic Content
Game Detail Pages: Individual game information
Creator Profiles: Developer and publisher pages
Game Jam Pages: Event and competition information
Collection Pages: Curated game lists
API Endpoints
Public APIs: Documented API endpoints
RSS Feeds: Syndication feeds
Data Exports: Public data access points
Priority Weighting
Content Type | Priority | Reasoning |
|---|---|---|
Homepage | 1.0 | Most important entry point |
Popular Games | 0.9 | High-traffic content |
Game Detail Pages | 0.8 | Primary content |
Creator Pages | 0.7 | Important discovery pages |
Category Pages | 0.6 | Navigation and browsing |
Static Pages | 0.5 | Supporting content |
Change Frequency
The sitemap includes change frequency hints:
Daily Updates
Homepage: Frequently updated with new content
Popular Games: Rankings and statistics change daily
Recent Releases: New games added regularly
Weekly Updates
Game Detail Pages: Occasional updates and new versions
Creator Profiles: Periodic information updates
Category Pages: Content additions and changes
Monthly Updates
Static Pages: Infrequent content changes
Archive Pages: Historical content rarely changes
Documentation: Occasional updates and improvements
File Output
The generated sitemap:
Location: Saved to
public/sitemap.xmlFormat: Valid XML following sitemap protocol
Size Limits: Respects 50,000 URL and 50MB limits
Compression: Optionally gzipped for bandwidth efficiency
SEO Benefits
A well-maintained sitemap provides:
Faster Indexing: Search engines discover new content quickly
Complete Coverage: Ensures all important pages are found
Priority Signals: Helps search engines understand content importance
Update Notifications: Indicates when content has changed
Validation
The command includes validation to ensure:
XML Compliance: Proper XML syntax and structure
URL Validity: All URLs are properly formatted and accessible
Protocol Adherence: Follows sitemap.org specifications
Size Limits: Stays within search engine limits
Performance Optimization
The generation process is optimized for:
Database Efficiency: Minimal queries with proper indexing
Memory Management: Handles large numbers of URLs efficiently
Processing Speed: Quick generation even for large sites
File I/O: Efficient XML writing and file operations
Related Commands
games:refresh - Update content that affects sitemap
feed:process - Add new content for sitemap inclusion