Skip to content

Advanced Use

Ars Paradox edited this page May 16, 2025 · 2 revisions

Advanced Setup and Customization

Core Architecture Overview

The system is designed for easy customization while maintaining a clean codebase. Here's what technical users need to know:

Key Files to Modify:

  • routes/public_route.py - Controls all public-facing routes
  • static/public/ - Directory for custom HTML files

Public Route

Default Routing Behavior

  • The root path (/) automatically serves a blog gallery view
  • This uses Jinja templating in index.html
  • Can be completely replaced by modifying the route handler

Custom Site Implementation

  1. Add Static HTML:

    • Place any custom HTML files in static/public/
    • Can be generated by Aina's visual editor and exported manually
  2. Configure Routes:

    • Map URLs to your files in public_route.py
    • Supports both direct file serving and custom route handlers
  3. Post-Creation Editing:

    • Aina understands site structure and can assist with:
    • Making a 'main' site that connects to other main site
    • Making a header for an MPA
    • Or edit HTML manually for full control

Coming Improvements

We're actively developing:

  • Simplified main site editor (beyond blog automation)
  • Visual route configuration
  • One-click theme application

Pro Tip: The current system gives you direct access to FastAPI's routing power while we build more user-friendly tools.

Technical Notes

  • All routing logic is contained in public_route.py
  • Static files have priority over dynamic routes
  • Blog system remains fully automated unless modified
# Example custom route in public_route.py
@router.get("/custom-page")
async def serve_custom_page():
    return FileResponse("static/public/custom.html")

Remember: It's simpler than WordPress's codebase - we promise!

Clone this wiki locally