Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dxrcy/ibex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

100 Commits

Repository files navigation

Ibex

Ibex provides ergonomic HTML templating in Rust for SSG/SSR, using procedural macros.

Still a work in progress.

Check out Ibex Template for a quick start.

Example

fn at_blog(blog: BlogPost) -> Document {
 // Creates a `View` and converts to `Document`
 view! {
 // Calls a function `header(true)`
 @header[true]
 // Some html elements
 h2 { [blog.title] }
 h3 { i {[blog.author]} }
 // Include any variables in scope
 p {
 [blog.body]
 }
 // Variables can be used in attributes
 // Use a slash to signify an empty element body
 img [src=blog.image]/
 // Any syntax can be used with `if` or `for` statements (except `else-if`)
 [:if let Some(image_src) = blog.image {
 image [src=image_src]/
 }]
 }
 .into()
}

Ibex logo

About

Ergonomic HTML templating in Rust for SSG/SSR

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /