Code Monkey home page Code Monkey logo

yate's Introduction

yate

crates.io page docs.rs page build license: MIT

yate is a simple, idiomatic, combined html template engine and static site generator.

yate's People

Contributors

stoically avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

yate's Issues

Binary

Provide some binary that allows to operate on raw files like markdown (#1) or maybe even html, tho composing html might get hard with raw files because of embedded rust.

Shortcut for `if expr { something } else { "" }`

Sometimes it's needed to only return something in the if-case, which leads to quite a few else { "" } or else { String::new() }, so a special syntax for that might be nice, or a simple macro maybe

`yate::html!` vs `format!`

So why not just use Strings directly and format! them for templating, that's basically what the html! macro does anyway, right?

Actually, yes, that's true. I guess the only real advantage of the html! macro is that it does syntax checking of the provided html and mabye it's nicer to directly write html instead of fiddling with strings. ๐Ÿ˜…

Special Syntax to format href paths with html escaping guarantees

Something like

href={%path "uwu" / &some_var / "owo" %}

or

href={%path ["uwu", &some_var, "owo"] %}

or

href={%path "uwu/{&some_var}/owo" %} (this would probably get complicated)

which makes sure to internally correctly escape the path with html_escape::encode_text or html_escape::encode_double_quoted_attribute

Might also work to special-case the occurence of href and then do something special, e.g.

href="uwu/{&some_var}/owo"

could automagically do the right thing - tho I think that's way to implicit/hidden.

Markdown files

Would be nice to be able to parse and embed existing markdown files

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.