Skip to content

unifyroute/UnifyRouteWeb

Repository files navigation

πŸš€ UnifyRoute Website

Official website and documentation for UnifyRoute - an open-source, self-hosted gateway for routing requests across multiple LLM providers.

πŸ“‹ Overview

The website includes:

  • 🏠 Landing Page - Homepage with features, quickstart, and use cases
  • πŸ“– Documentation - Comprehensive guides including:
    • Getting Started
    • Architecture & Design
    • API Reference
    • CLI Commands
    • Configuration Guide
    • Deployment Instructions
    • Troubleshooting
  • ✨ Features Page - Detailed feature descriptions
  • πŸŒ“ Dark/Light Mode - Full theme support with system preference detection
  • πŸ” Full-Text Search - Lunr.js powered search across all content

πŸ› οΈ Building the Website

βš™οΈ Prerequisites

  • Hugo 0.100+ (extended version recommended)
  • Python 3.7+ (for search index generation)
  • Node.js 14+ (optional, for CSS/JS preprocessing)

πŸ’» Local Development

  1. Clone the repository

    git clone https://github.com/unifyroute/UnifyRoute.git
    cd UnifyRoute/website  # or UnifyRouteWeb
  2. Start development server

    hugo server -D
    # Website will be available at http://localhost:1313
  3. View in browser

πŸ“¦ Production Build

  1. Run build script

    chmod +x build.sh
    ./build.sh

    Or use Hugo directly:

    hugo --minify
  2. Output

    • Generated files are in the public/ directory
    • Ready for deployment

πŸ“ Project Structure

.
β”œβ”€β”€ config.toml              # Hugo configuration
β”œβ”€β”€ content/                 # Content files
β”‚   β”œβ”€β”€ _index.md           # Homepage
β”‚   β”œβ”€β”€ features.md         # Features page
β”‚   └── docs/               # Documentation
β”‚       β”œβ”€β”€ _index.md       # Docs homepage
β”‚       β”œβ”€β”€ getting-started.md
β”‚       β”œβ”€β”€ architecture.md
β”‚       β”œβ”€β”€ api-reference.md
β”‚       β”œβ”€β”€ cli.md
β”‚       β”œβ”€β”€ configuration.md
β”‚       β”œβ”€β”€ deployment.md
β”‚       └── troubleshooting.md
β”œβ”€β”€ themes/
β”‚   └── unifyroute/         # Custom theme
β”‚       β”œβ”€β”€ layouts/        # Template files
β”‚       β”œβ”€β”€ assets/         # CSS and JavaScript
β”‚       └── static/         # Static assets
β”œβ”€β”€ static/
β”‚   └── images/             # Logos and images
β”œβ”€β”€ build.sh               # Build script
└── README.md              # This file

🎨 Customization

🎭 Colors & Branding

Edit theme color variables in themes/unifyroute/assets/css/style.css:

:root {
  --primary-color: #4d4d4d;      /* Dark gray */
  --accent-color: #f25221;        /* Orange */
  /* ... other variables ... */
}

πŸ“ Navigation

Edit menu items in config.toml:

[[menu.main]]
  name = "Features"
  url = "/features/"
  weight = 1

πŸ–ΌοΈ Logos

Place logos in static/images/:

  • logo.png - Header logo
  • favicon.png - Favicon
  • logo-space.png - Homepage hero image

πŸ“ Content

Edit markdown files in content/ directory. Hugo supports:

  • Markdown with front matter
  • YAML configuration
  • Custom shortcodes

🌐 Deployment

☁️ To Static Hosting (GitHub Pages, Netlify, Vercel)

  1. Build the site:

    ./build.sh
  2. Deploy public/ folder to your hosting platform

  3. Configure DNS and HTTPS

πŸ–₯️ To Custom Server

Using Nginx

server {
    listen 80;
    server_name unifyroute.example.com;

    root /var/www/unifyroute;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
    }

    # Cache static assets
    location ~* \.(js|css|png|jpg|svg|woff|woff2)$ {
        expires 30d;
        add_header Cache-Control "public, immutable";
    }
}

Using Apache

<VirtualHost *:80>
    ServerName unifyroute.example.com
    DocumentRoot /var/www/unifyroute

    <Directory /var/www/unifyroute>
        Options -MultiViews
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.html [QSA,L]
    </Directory>
</VirtualHost>

πŸ”’ Enable HTTPS

# Using Let's Encrypt with Certbot
sudo certbot certonly --webroot -w /var/www/unifyroute -d unifyroute.example.com

πŸŒ“ Dark/Light Mode

The website automatically:

  1. Detects system preference (prefers-color-scheme)
  2. Loads saved user preference from localStorage
  3. Provides a manual toggle button

JavaScript code in themes/unifyroute/assets/js/theme.js manages theme switching.

πŸ” Search Functionality

Search is powered by Lunr.js:

  • Searches across all page titles and content
  • Fuzzy matching support
  • Results updated as user types
  • Search data built during site generation

Search index is auto-generated in public/search-index.json

⚑ Performance Optimization

The site is optimized for speed:

  • Static HTML output (no server-side processing)
  • Minified CSS and JavaScript
  • Image optimization
  • Lazy loading support
  • CDN-friendly structure

Lighthouse scores:

  • Performance: 90+
  • Accessibility: 95+
  • Best Practices: 95+
  • SEO: 100

πŸ“Š Analytics (Optional)

To add analytics:

  1. Add to config.toml:

    [params]
      googleAnalytics = "G-XXXXXXXXXX"
  2. Analytics code will be automatically included in production builds

πŸ› Troubleshooting

Hugo not found

# Install Hugo
brew install hugo           # macOS
choco install hugo          # Windows
apt-get install hugo        # Linux

Build errors

# Check Hugo version
hugo version
# Should be 0.100+

# Validate config
hugo config

Theme not loading

# Check theme path
ls -la themes/unifyroute

# Reinstall theme
rm -rf themes/unifyroute
git clone <theme-repo> themes/unifyroute

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test locally
  5. Submit a pull request

πŸ“„ License

This website is part of the UnifyRoute project and is licensed under the Apache License 2.0.

See LICENSE for details.

πŸ’¬ Support

πŸ“š More Information

  • Main Project: UnifyRoute GitHub
  • Documentation: Available on the website
  • Community: Join our Discord (link on website)

Built with ❀️ for the community. UnifyRoute - Smart LLM Routing.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors