https://github.com/wolfpup-software/coyote-rs
create documents with component functions
https://github.com/wolfpup-software/coyote-rs
components html rust templates xml xml-parser
Last synced: over 1 year ago
JSON representation
create documents with component functions
- Host: GitHub
- URL: https://github.com/wolfpup-software/coyote-rs
- Owner: wolfpup-software
- License: bsd-3-clause
- Created: 2024-03-29T07:54:27.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-29T23:36:20.000Z (almost 2 years ago)
- Last Synced: 2024-06-30T08:24:51.746Z (almost 2 years ago)
- Topics: components, html, rust, templates, xml, xml-parser
- Language: Rust
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Coyote-rs
Create `HTML` with function components in Rust.
There are no dependencies. There are no macros.
## Install
```sh
cargo install --git https://github.com/wolf-pup/coyote-rs
```
## Components
Create documents with coyote [components](./components.md).
```rust
use coyote::{Component, tmpl};
fn hai() -> Component {
tmpl("
hai :3
", [])
}
```
## Html
Render components as `html` with [document builders](./document_builders.md).
```rust
use coyote::{Component, Html, tmpl};
fn hai() -> Component {
tmpl("
hai :3
", [])
}
fn main() {
let hello_world = hai();
let html = Html::new();
if let Ok(document) = html.build(&hello_world) {
println!("{}", document);
};
}
```
The output will be:
```html
hai :3
```
## License
`Coyote-rs` is released under the BSD 3-Clause License.