Skip to content

Releases: Senforsce/tndr

v0.0.3

26 May 17:34
Compare
Choose a tag to compare
v0.0.3 Pre-release
Pre-release

Fixing bugs on 0.0.2 due to a bad merge.

v0.0.2

26 May 16:23
Compare
Choose a tag to compare
v0.0.2 Pre-release
Pre-release

With this release, Everything works the same as templ, except now files now should be of the extension .t1

Features

  • New Element O8 allows for inputting turtle syntax to be converted into a json-ld script associated with the component
    Example
t1 HTMX () {
 <article>
    <h2>Isaac Newton</h2>
    <p>figured out if the moon falls like everyday objects</p>
 </article>
}

O8 About () {
@prefix wiki: http://dbpedia.org .
@prefix schema: http://schema.org .

wiki:Isaac_Newton a schema:Person
}

Will output a jsonld representation of the ttl

  • Supports HDT Context extraction expressions, when used in conjunction with senforsce/router and senforsce/HDT, can read HDT values from the template file, and after validation binds the data to the context to be retrieved in the generated code
    Example
// note that /- ... -/ is syntactic sugar for c.get("...")
t1 HTMX (c *router.Context) {
 <form action=/- path:WhereFormsAreHandled -/>
    <input type="text" placeholder=/- i18n:EnterName -/ />
    <button>{ c.get("i18n:SaveText") }</button>
    <button>/- i18n:SaveText -/</button>
 </form>

Senforsce TndrFish and Tndr-Vscode should, if not now, soon provide syntax highlighting and documentation/definition on hover

Full Changelog: https://github.com/Senforsce/t1/commits/v0.0.2