htmw

The HTMW Project

Free & Open source. Simple, Fast and Lightweight extension for your Web App

Easy to implement and use

HTMW is fully compatible with your HTML and PHP files and the syntax is simple

Write less, do more

HTMW automates your work and let's you avoid unnecessary lines of code making your code more flexible and readable

Zero performance loss

HTMW widgets are compiled directly to HTML, PHP, XML, etc... no additional backend or frontend processing required

vT.5

New! Enhanced arguments and native tag notation added. Learn more .

Get started

Thank you for supporting us!

How to use it

Simply create a file with your preferred name and the extension .htmw

Then write HTML/PHP code normally and whenever you need HTMW tools you can just use the directive tags like <@template ...> to enhance your Web development.

e.g. in the file example index.htmw we created a really simple widget that outputs <h1>hello world!</h1> with a custom message in a paragraph; this is just a quick and minimal example

<!-- file: index.htmw -->
<!-- define a widget with the template directive -->
<@template welcome(name) {}>
    <h1>hello $name!</h1>
    <p>$INNER</p>
</@template>

<!-- to use it simply write it as an HTML tag -->
<welcome name="world">
    and welcome to htmw!!
</welcome>

<!-- extra: we can also implement PHP if we want -->
<?php echo "<h3>awesome</h3>"; ?>

Then run the following command

htmw [filename without extension] -f [output file format extension]
to compile it to your preferred file format and the output will have the same name with the new file extension

e.g. if you have index.htmw and want to compile to PHP run

htmw index -f php
to generate index.php

How HTMW differs from systems like React

Architectures like React are great for highly dynamic apps, but they always ship extra overhead to the browser, especially for pages that don't need it but still need a simpler system without unnecessary performance impact. Our ≈300 KB compiler pre-processeses widgets into clean, 100% stand-alone static code, resulting in smaller files, faster load times, no runtime dependencies and no additional processing. It is also easy to embed in PHP pages


By Woxell Co