Enhanced Sitemap Feature

By Amr

Comprehensive site navigation with advanced search, filtering, and discovery tools

Estimated reading time: 3 minutes

πŸ—ΊοΈ Enhanced Sitemap Feature

The Enhanced Sitemap is a powerful navigation and content discovery tool that provides a comprehensive overview of all content on the site with advanced search, filtering, and sorting capabilities.

🌟 Key Features

πŸ“Š Overview Dashboard

  • Site Statistics: Total pages and collections count
  • Collection Breakdown: Visual distribution of content across collections
  • Real-time Counters: Shows filtered vs. total results
  • Multi-field Search: Search across titles, descriptions, categories, tags, and content
  • Real-time Results: Instant search with debouncing for performance
  • URL Parameters: Direct search via ?q=search-term in URL
  • Keyboard Shortcuts: Ctrl/Cmd + K to focus search, Escape to clear

πŸŽ›οΈ Smart Filtering

  • Collection Filter: Filter by specific content collections (posts, docs, pages, etc.)
  • Date Range Filter: Filter by recency (today, week, month, year)
  • Combined Filters: Multiple filters work together for precise results

πŸ“‹ Interactive Table

  • Multi-column Sorting: Click headers to sort by any column
  • Responsive Design: Adapts to different screen sizes
  • Visual Indicators: Clear sort direction and active column highlighting
  • Action Buttons: Direct links to view pages and copy URLs

πŸ“± Mobile Optimized

  • Responsive Layout: Optimal viewing on all device sizes
  • Touch-friendly: Easy interaction on mobile devices
  • Progressive Disclosure: Shows essential info first, details on larger screens

πŸš€ Usage

Accessing the Sitemap

  • Navigation Bar: Click the map icon (πŸ—ΊοΈ) in the main navigation
  • Direct URL: Visit /sitemap/ on the site
  • Search with Parameters: Use /sitemap/?q=search-term for direct search

Search and Discovery

  1. Basic Search: Type keywords in the search bar
  2. Filter by Collection: Use the dropdown to focus on specific content types
  3. Date Filtering: Filter by content recency
  4. Sort Results: Click column headers to sort by different criteria

Advanced Features

  • Copy URLs: Click the clipboard icon to copy page URLs
  • Statistics View: Toggle collection statistics for content overview
  • Reset Filters: Clear all filters and return to full view

🎨 Visual Design

Modern Interface

  • Bootstrap 5 Styling: Clean, professional appearance
  • Card-based Layout: Organized content sections
  • Icon Integration: Bootstrap Icons for intuitive navigation
  • Color-coded Badges: Visual distinction between content types

Accessibility

  • Screen Reader Support: Proper ARIA labels and semantic HTML
  • Keyboard Navigation: Full keyboard accessibility
  • High Contrast: Clear visual distinction between elements
  • Responsive Text: Readable on all screen sizes

πŸ”§ Technical Implementation

Architecture

  • Jekyll Integration: Seamless integration with Jekyll collections and pages
  • Bootstrap 5: Modern responsive framework
  • Vanilla JavaScript: No external dependencies for core functionality
  • CSS Custom Properties: Consistent theming and easy customization

Performance

  • Client-side Filtering: Fast search and filtering without server requests
  • Debounced Search: Optimized search performance
  • Efficient DOM Manipulation: Minimal reflow and repaint operations
  • Lazy Loading: Optimized initial page load

Data Sources

  • Jekyll Collections: Automatically includes all collection documents
  • Site Pages: Regular Jekyll pages and posts
  • Metadata Integration: Uses frontmatter for enhanced information
  • Dynamic Updates: Reflects site changes automatically

πŸ“ˆ Benefits

For Users

  • Easy Discovery: Find content quickly and efficiently
  • Multiple Access Points: Various ways to locate information
  • Visual Overview: Understand site structure at a glance
  • Mobile Accessibility: Access from any device

For Site Maintainers

  • Content Audit: Easy overview of all site content
  • Navigation Analytics: Understand content distribution
  • SEO Benefits: Improved content discoverability
  • User Experience: Enhanced site usability

πŸ”„ Future Enhancements

Planned Features

  • Export Functionality: Export sitemap data to various formats
  • Advanced Analytics: Content usage and popularity metrics
  • Bookmark System: Save frequently accessed pages
  • Tag Cloud: Visual representation of popular tags

Integration Opportunities

  • Search API: Connect to external search services
  • Content Management: Direct editing links for administrators
  • Social Sharing: Share specific search results
  • Accessibility Tools: Enhanced screen reader support

πŸ› οΈ Customization

Configuration Options

The sitemap can be customized through Jekyll configuration and CSS variables:

# _config.yml
sitemap:
  enabled: true
  show_statistics: true
  default_sort: "date"
  items_per_page: 50

Styling Customization

Override CSS custom properties to match your theme:

:root {
  --sitemap-col-collection: 120px;
  --sitemap-col-title: 200px;
  --sitemap-col-date: 120px;
  --sitemap-col-actions: 80px;
}

The Enhanced Sitemap represents a significant improvement in site navigation and content discovery, providing users with powerful tools to explore and find information efficiently while maintaining excellent performance and accessibility standards.