Giter Site home page Giter Site logo

hteaml's Introduction

If the regular HTML syntax is not your cup of tea, maybe hteaml is (maybe not).

What is hteaml?

It's a Rust procedural macro for writing HTML in a more concise way which also allows you to use Rust expressions wherever possible. The macro will expand to Rust code at compile time, which you can call .render() on and receive aString containg the old-school HTML.

If you're looking for a crate to use for a serious project then consider using maud, which is a proper HTML templating engine.

What does hteaml look like?

Good question... Well, uh... for better or worse, the syntax will remind you of Lisp dialects. HTML uses <angled brackets>, maud, dioxus and some others use {curly braces} but hteaml uses (parenthesis).

drumroll ...

use hteaml::hteaml;

hteaml! {
  ("!DOCTYPE" html)
  (html
    (head (title = "Hello World"))
    (body = "Yep, lots of parenthesis")
  )
};

Project Status

  • Functional but not to be used in production
  • Still under development
  • Lacks any kind of HTML escaping

Pending Features/Tasks

  • Docs
  • Guide for using the hteaml macro
  • HTML escaping
  • Better error messages
  • Benchmarks

hteaml's People

Contributors

voltairenoir avatar

Watchers

 avatar

hteaml's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.