A pug-inspired HTML preprocessor

Overview

Build Status License: MIT Donate: PayPal

UNDER CONSTRUCTION

Right now there is no usable version of hsml available. I'm just working on it.

HSML - Hyper Short Markup Language

hsml is a hyper short markup language that is inspired by pug (aka jade).

What is it?

  • hsml is written in Rust and compiles to HTML.
  • There will be a binary that can take CLI arguments to compile a .hsml file to a .html file, but also there will be some other arguments to e.g. format a .hsml file.
  • There will be also a library that can parse a .hsml file and return an AST for it. It is planned that this AST can be used in the JS ecosystem as well, so tools like ESLint and Prettier can work with it.
  • There are two major differences between pug and hsml
    • hsml will support TailwindCSS and similar CSS frameworks out of the box, even with arbitrary values like .bg-[#1da1f2] or lg:[&:nth-child(3)]:hover:underline
    • hsml will not support template engine syntax. It is just an HTML preprocessor.

Why doing it?

  • I want to learn Rust
  • I use pug for my projects but sadly pug's goal mismatches my preferences and comes with a lot of overhead I don't need
You might also like...
A HTML to node macro powered by rstml.

html-node A HTML to node macro powered by rstml. Features Text escaping Pretty-printing NEW: type-safe elements and attributes! (example) Example let

Configurable HTML/Vue/Svelte/Jinja/Twig formatter, with dprint integration.

markup_fmt markup_fmt is a configurable HTML/Vue/Svelte/Jinja/Twig formatter. Notes for Vue and Svelte Users This formatter provides some options such

Show HTML content
Show HTML content "inside" your egui rendered application

hframe Show HTML content "inside" your egui rendered application. "hframe" stands for "HTML Frame". Note: hframe only works when the application is co

A PostgreSQL extension for rendering the Tera HTML templating language.

PGTera PGTera is a PostgreSQL extension that provides functions for using Tera to render HTML templates. When used with a tool like Postgrest, you can

A system clipboard command line tools which inspired by pbcopy & pbpaste but better to use.

rclip A command line tool which supports copy a file contents to the system clipboard or copy the contents of the system clipboard to a file. Install

A CI inspired approach for local job automation.

nauman A CI inspired approach for local job automation. Features • Installation • Usage • FAQ • Examples • Job Syntax About nauman is an easy-to-use j

Requestty - An easy-to-use collection of interactive cli prompts inspired by Inquirer.js.
Requestty - An easy-to-use collection of interactive cli prompts inspired by Inquirer.js.

Requestty requestty (request-tty) is an easy-to-use collection of interactive cli prompts inspired by Inquirer.js. Easy-to-use - The builder API and m

📦 A Python package manager written in Rust inspired by Cargo.
📦 A Python package manager written in Rust inspired by Cargo.

huak About A Python package manager written in Rust. The Cargo for Python. ⚠️ Disclaimer: huak is currently in its proof-of-concept (PoC) phase. Huak

📦 A Python package manager written in Rust inspired by Cargo.
📦 A Python package manager written in Rust inspired by Cargo.

huak About A Python package manager written in Rust. The Cargo for Python. ⚠️ Disclaimer: huak is currently in its Alpha phase. Huak aims to support a

Comments
  • Allow normal comments

    Allow normal comments

    Allow normal comments that are visible in the compiled HTML

    Example:

    // This is a comment at the start of the document
    h1.text-red // This is a comment behind a tag
      // This is a comment inside a tag
      // Comments can obviously multi-line
      span And here is another text
    // This is a comment after a tag
    
    <!-- This is a comment at the start of the document --><h1 class="text-red"><!-- This is a comment behind a tag --><!-- This is a comment inside a tag --><!-- Comments can obviously multi-line --><span>And here is another text</span></h1><!-- This is a comment after a tag -->
    

    pretty

    <!-- This is a comment at the start of the document -->
    <h1 class="text-red">
      <!-- This is a comment behind a tag -->
      <!-- This is a comment inside a tag -->
      <!-- Comments can obviously multi-line -->
      <span>And here is another text</span>
    </h1>
    <!-- This is a comment after a tag -->
    
    enhancement 
    opened by Shinigami92 1
Owner
Shinigami
Currently mainly frontend developer who loves Material Design and Vue + Vuetify/Quasar. Also a passionate TypeScript enthusiast.
Shinigami
Markdown to HTML converter written in Rust. Inspired by Katsuki Yuri's Makudaun Tool.

Makurust Makurust is a powerful tool written in Rust that allows you to effortlessly convert your Markdown files into static HTML pages. Inspired by T

Said (Fromgodd) 15 Apr 9, 2023
Tools - The Rome Toolchain. A linter, compiler, bundler, and more for JavaScript, TypeScript, HTML, Markdown, and CSS.

Rome is currently being rewritten in Rust. Read more about it in our latest blog post. The documentation below is out of date and available for poster

Rome 22k Jan 3, 2023
Minimal Pandoc compiler -> HTML

Minimal Pandoc compiler -> HTML

/c/ympfh 1 Apr 6, 2022
An html macro for dioxus applications.

dioxus html macro This crate offers an html! like macro for dioxus applications. It expands to the equivalent rsx! macro call you would have made othe

Dioxus Labs 8 Dec 22, 2022
Fetch and extract HTML's title and description by given link.

extd Fetch and extract HTML's title and description by given link. Usage in Cargo.toml: [dependencies] extd = "0.1.4" Example use extd::extract_td; f

null 4 Nov 4, 2022
A Faster(⚡) formatter, linter, bundler, and more for JavaScript, TypeScript, JSON, HTML, Markdown, and CSS Lapce Plugin

Lapce Plugin for Rome Lapce-rome is a Lapce plugin for rome, The Rome is faster ⚡ , A formatter, linter, compiler, bundler, and more for JavaScript, T

xiaoxin 7 Dec 16, 2022
Generate HTML source files from rust functions!

Htmlificator This crate provides an element struct which can be displayed as HTML. License This crate is licensed under the MIT license Credit This cr

Isotoxal 2 Nov 7, 2022
A minimal browser with a super simple rendering engine for HTML and CSS, using Rust.

minimal-browser A minimal browser with a super simple rendering engine for HTML and CSS, using Rust. Credit: https://github.com/mbrubeck and https://l

Federico Baldini 3 Jan 15, 2023
🏭 Convert Markdown documents into themed HTML pages with support for code syntax highlighting, LaTeX and Mermaid diagrams.

Marky Markdown Magician ?? Features Hot reload previewing ?? Conversion to HTML / PDF ?? Themes! ✨ Extensions - Math, diagrams, syntax-highlighting ??

Vadim 12 Feb 19, 2023
More beautiful HTML reports for llvm-cov/cargo-llvm-cov

?? llvm-cov-pretty More beautiful HTML reports for llvm-cov (cargo-llvm-cov specifically). Dark theme support (switches automatically based on your br

Dominik Nakamura 13 Jun 26, 2023