118 lines
3.0 KiB
TOML
118 lines
3.0 KiB
TOML
template_name = "blog-post"
|
|
|
|
[values]
|
|
title = "Getting Started with Rustelo"
|
|
author = "Development Team"
|
|
published_date = "2024-01-15"
|
|
reading_time = 8
|
|
content = """
|
|
# Welcome to Rustelo
|
|
|
|
Rustelo is a powerful Rust-based web framework that combines the best of modern web development with the performance and safety of Rust.
|
|
|
|
## What is Rustelo?
|
|
|
|
Rustelo is built on top of **Leptos** and provides a complete solution for building fast, reliable web applications. It includes:
|
|
|
|
- **Template Engine**: Powered by Tera for flexible templating
|
|
- **Localization**: Built-in support for multiple languages
|
|
- **Content Management**: Easy content management with TOML configuration
|
|
- **Authentication**: Secure user authentication and authorization
|
|
- **Database Integration**: SQLx support for PostgreSQL and SQLite
|
|
|
|
## Key Features
|
|
|
|
### 🚀 Performance
|
|
Built with Rust for maximum performance and minimal resource usage.
|
|
|
|
### 🔒 Security
|
|
Security-first approach with built-in CSRF protection, secure headers, and more.
|
|
|
|
### 🌐 Localization
|
|
Easy internationalization with file-based language support.
|
|
|
|
### 📝 Content Management
|
|
Simple content management using TOML configuration files.
|
|
|
|
### 🎨 Flexible Templates
|
|
Powerful Tera template engine with custom filters and functions.
|
|
|
|
## Quick Start
|
|
|
|
1. **Clone the repository**
|
|
```bash
|
|
git clone https://github.com/your-org/rustelo.git
|
|
cd rustelo
|
|
```
|
|
|
|
2. **Install dependencies**
|
|
```bash
|
|
cargo build
|
|
```
|
|
|
|
3. **Run the development server**
|
|
```bash
|
|
cargo run
|
|
```
|
|
|
|
4. **Open your browser**
|
|
Navigate to `http://localhost:3030`
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
rustelo/
|
|
├── server/ # Backend Rust code
|
|
├── client/ # Frontend Leptos code
|
|
├── shared/ # Shared code between client and server
|
|
├── templates/ # Tera templates
|
|
├── content/ # Content files (.tpl.toml)
|
|
├── public/ # Static assets
|
|
└── migrations/ # Database migrations
|
|
```
|
|
|
|
## Configuration
|
|
|
|
Rustelo uses TOML files for configuration. The main configuration file is `config.toml`:
|
|
|
|
```toml
|
|
[server]
|
|
host = "127.0.0.1"
|
|
port = 3030
|
|
|
|
[database]
|
|
url = "sqlite:database.db"
|
|
|
|
[content]
|
|
content_dir = "content"
|
|
template_dir = "templates"
|
|
```
|
|
|
|
## Creating Your First Page
|
|
|
|
1. Create a template file in `templates/my-page.html`
|
|
2. Create a content file in `content/docs/en_my-page.tpl.toml`
|
|
3. Access your page at `/page:my-page`
|
|
|
|
## Next Steps
|
|
|
|
- Read the [Configuration Guide](/page:configuration)
|
|
- Learn about [Template System](/page:templates)
|
|
- Explore [Authentication](/page:auth)
|
|
- Check out [Database Setup](/page:database)
|
|
|
|
Ready to build amazing web applications with Rustelo? Let's get started!
|
|
"""
|
|
tags = ["rust", "web-framework", "leptos", "getting-started", "tutorial"]
|
|
featured_image = "/images/rustelo-banner.jpg"
|
|
enable_sharing = true
|
|
page_url = "https://yoursite.com/page:getting-started"
|
|
back_url = "/"
|
|
back_text = "Documentation"
|
|
|
|
[metadata]
|
|
category = "documentation"
|
|
difficulty = "beginner"
|
|
estimated_time = "10 minutes"
|
|
version = "1.0"
|