shokunin
v0.0.32
منشئ موقع ثابت للمحتوى أولاً تم تصميمه في Rust، وهو محسّن للأداء وإمكانية الوصول ورؤية محرك البحث.
• الموقع الإلكتروني • الوثائق • الإبلاغ عن الأخطاء • ميزة الطلب • إرشادات المساهمة
Shokunin هو مولد موقع ثابت عالي الأداء (SSG) تم تصميمه في Rust ويعطي الأولوية لما يلي:
أضف إلى Cargo.toml
الخاص بك :
[ dependencies ]
ssg = " 0.0.32 "
أو التثبيت عبر Cargo:
cargo install ssg
use staticdatagen :: compiler :: service :: compile ;
use std :: { path :: Path , error :: Error } ;
fn main ( ) -> Result < ( ) , Box < dyn Error > > {
// Define directory paths
let build_dir = Path :: new ( "./examples/build" ) ; // Build directory
let content_dir = Path :: new ( "./examples/content" ) ; // Content directory
let public_dir = Path :: new ( "./examples/public" ) ; // Public directory
let template_dir = Path :: new ( "./examples/templates" ) ; // Templates
// Generate site
compile ( build_dir , content_dir , public_dir , template_dir ) ? ;
println ! ( " Site generated successfully!" ) ;
Ok ( ( ) )
}
إنشاء موقع جديد:
# Full command syntax
ssg --content=content --template=templates --serve=public
# Short form
ssg -c=content -t=templates -o=output -s=public
# Using cargo run
cargo run --bin ssg -- -c= " ./examples/content " -t= " ./examples/templates " -s= " ./examples/public "
خيار | قصير | وصف | مطلوب |
---|---|---|---|
--content | -c | مسار المحتوى | نعم |
--template | -t | مسار القالب | نعم |
--serve | -s | المسار العام للخادم | نعم |
جرب تطبيقات الأمثلة لدينا:
# Basic example
# # Convert Markdown to static sites effortlessly, with templates, organized builds, and instant local hosting.
git clone https://github.com/sebastienrousseau/shokunin.git
cd shokunin
cargo run --example basic
# Quick start example
# # Create, compile, and host a static site effortlessly with Shokunin: simple setup, error handling, and instant local server for previews.
cargo run --example quickstart
# Multilingual example
# # Build multilingual static sites effortlessly: generate language-specific sites, create a language selector, and serve all from a single directory.
cargo run --example multilingual
نحن نرحب بالمساهمات! يرجى الاطلاع على إرشادات المساهمة الخاصة بنا للحصول على تفاصيل حول:
هذا المشروع مرخص بشكل مزدوج بموجب:
في خيارك.
شكر خاص لجميع المساهمين الذين ساعدوا في بناء Shokunin.