Rustelo/info/logo_path_changes.md
Jesús Pérex 2f0f807331 feat: add dark mode functionality and improve navigation system
- Add complete dark mode system with theme context and toggle
- Implement dark mode toggle component in navigation menu
- Add client-side routing with SSR-safe signal handling
- Fix language selector styling for better dark mode compatibility
- Add documentation system with mdBook integration
- Improve navigation menu with proper external/internal link handling
- Add comprehensive project documentation and configuration
- Enhance theme system with localStorage persistence
- Fix arena panic issues during server-side rendering
- Add proper TypeScript configuration and build optimizations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 20:53:20 +01:00

3.9 KiB

Logo Path Changes Summary

This document summarizes the changes made to convert absolute GitHub URLs to relative paths for logo references in RUSTELO cargo documentation.

Overview

Updated all logo references in cargo documentation comments from absolute GitHub URLs to relative paths to improve portability and reliability.

Changes Made

1. Updated Rust Documentation Files

Before

//! <img src="https://raw.githubusercontent.com/yourusername/rustelo/main/logos/rustelo_dev-logo-h.svg" alt="RUSTELO" width="300" />

After

//! <img src="../logos/rustelo_dev-logo-h.svg" alt="RUSTELO" width="300" />

2. Files Modified

File Change Description
template/client/src/lib.rs URL → Relative path Client crate documentation header
template/server/src/lib.rs URL → Relative path Server crate documentation header
template/server/src/main.rs URL → Relative path Server binary documentation header
template/shared/src/lib.rs URL → Relative path Shared crate documentation header
template/docs/LOGO_TEMPLATE.md URL → Relative path Template examples for GitHub sections

3. New Files Created

File Purpose
template/scripts/build-docs.sh Automated documentation build script with asset copying
template/docs/CARGO_DOCS.md Documentation explaining the cargo docs setup
template/LOGO_PATH_CHANGES.md This summary file

4. Updated Files

File Change Description
template/justfile Added docs-cargo command New just command for building cargo docs with assets

Benefits

Improved Portability

  • No dependency on external GitHub URLs
  • Works in offline environments
  • Consistent across different hosting platforms

Better Reliability

  • No risk of broken links if repository moves
  • Faster loading (local assets)
  • Works with private repositories

Enhanced Development Experience

  • Automated asset copying with build script
  • Easy-to-use just command (just docs-cargo)
  • Comprehensive error handling and validation

Usage

Build Documentation

# Using the build script
./scripts/build-docs.sh

# Using just
just docs-cargo

# Manual cargo build
cargo doc --no-deps --lib --workspace
cp -r logos target/doc/

View Documentation

# Open in browser
cargo doc --open

# Or manually open
open target/doc/index.html

Technical Details

Path Resolution

  • Crate docs generated in: target/doc/[crate_name]/
  • Logo assets copied to: target/doc/logos/
  • Relative path: ../logos/ (up one directory from crate to doc root)

Build Script Features

  • Cleans previous documentation builds
  • Generates comprehensive cargo documentation
  • Copies logo assets to output directory
  • Validates successful asset copying
  • Provides colored status output

Verification

All absolute GitHub URLs have been successfully replaced:

# This command should return no matches
grep -r "https://raw.githubusercontent.com/yourusername/rustelo/main/logos/" .

Documentation builds successfully and logos display correctly in the generated HTML output.

Future Considerations

Maintenance

  • Keep logo files in the root logos/ directory
  • Use the build script for all documentation generation
  • Test documentation locally before committing changes

CI/CD Integration

The build script can be integrated into automated workflows:

- name: Build Documentation
  run: ./scripts/build-docs.sh

Documentation Deployment

Generated documentation with assets can be deployed to:

  • GitHub Pages
  • Netlify
  • Vercel
  • docs.rs (automatically handles asset copying)

This change ensures consistent, reliable logo display across all RUSTELO documentation while maintaining a professional appearance and improving the development workflow.