Crates.io | nucleusflow |
lib.rs | nucleusflow |
version | 0.0.1 |
source | src |
created_at | 2024-11-07 22:17:01.05519 |
updated_at | 2024-11-07 22:17:01.05519 |
description | A powerful Rust library for content processing, enabling static site generation, document conversion, and templating. |
homepage | https://nucleusflow.com/ |
repository | https://github.com/sebastienrousseau/nucleusflow |
max_upload_size | |
id | 1440360 |
size | 347,181 |
NucleusFlow
A fast, flexible and secure static site generator written in Rust.
• Website • Documentation • Report Bug • Request Feature • Contributing Guidelines
NucleusFlow is a powerful content processing library and static site generator that prioritises security, performance and flexibility. Built in Rust, it offers a comprehensive toolkit for managing content lifecycles, from processing raw content to generating optimised static websites.
Secure Content Processing
Flexible Content Pipeline
Performance Optimised
Developer Experience
Add nucleusflow
to your Cargo.toml
:
[dependencies]
nucleusflow = "0.0.1"
Here's a basic example of how to use nucleusflow
:
use nucleusflow::{NucleusFlow, NucleusFlowConfig, FileContentProcessor, HtmlOutputGenerator, HtmlTemplateRenderer};
use std::path::PathBuf;
// Create configuration
let config = NucleusFlowConfig::new(
"content",
"public",
"templates"
).expect("Failed to create config");
// Initialize processors with the concrete implementations
let content_processor = FileContentProcessor::new(PathBuf::from("content"));
let template_renderer = HtmlTemplateRenderer::new(PathBuf::from("templates"));
let output_generator = HtmlOutputGenerator::new(PathBuf::from("public"));
// Create NucleusFlow instance
let nucleus = NucleusFlow::new(
config,
Box::new(content_processor),
Box::new(template_renderer),
Box::new(output_generator)
);
// Process content
nucleus.process().expect("Failed to process content");
# Create a new site
nucleusflow new my-site --template blog
# Build the site
nucleusflow build --content content/ --output public/
This example demonstrates setting up NucleusFlow with a Markdown processor, Handlebars templating, and HTML output generation.
For full API documentation, please visit docs.rs/nucleusflow.
To explore more examples, clone the repository and run the following command:
cargo run --example example_name
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under either of
at your option.
Special thanks to all contributors who have helped build the nucleusflow
library.