Liquid VS Haml

Compare Liquid vs Haml and see what are their differences.

Liquid

Liquid markup language. Safe, customer facing template language for flexible web apps. (by Shopify)

Haml

HTML Abstraction Markup Language - A Markup Haiku (by haml)
Scout Monitoring - Performance metrics and, now, Logs Management Monitoring with Scout Monitoring
Get early access to Scout Monitoring's NEW Ruby logging feature [beta] by signing up now. Start for free and enable logs to get better insights into your Rails apps.
www.scoutapm.com
featured
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
Liquid Haml
41 28
11,103 3,766
0.6% 0.1%
6.6 6.0
4 days ago 3 months ago
Ruby Ruby
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Liquid

Posts with mentions or reviews of Liquid. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-10-27.

Haml

Posts with mentions or reviews of Haml. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-10-16.
  • Douglas Hofstadter on Lisp (1983)
    8 projects | news.ycombinator.com | 16 Oct 2024
    I never suggested that I was the first person to think of this; not having dealt with any Lisp since (hmmm) 1990 via Scheme in my introductory CS 212 class at Cornell probably has something to do with my ignorance of the prior art in this area. I do like your approach of breadcrumbing me instead of giving me the answer, though... best I can guess is "tooling" and simply that S-expressions are simply too embedded in the minds of the Lisp community at this (or previous) point(s).

    I also don't deal with significant-indentation in languages usually (and have a strong Python distaste); though I've been playing with Roc (https://www.roc-lang.org/), which has this, and have used HAML (https://haml.info/) in the past. I suppose auto-indenting is impossible in a significant-indentation language depending on what the editor can intuit based on how the previous line ended, but I don't think I'd need that feature.

    I did research "sweet expressions" (which are apparently also called T-expressions) and found the prior art there in Scheme and Lisp, and a library called "sweet" for Racket (which is another intriguing lisp dialect!). These might have gotchas, but apparently they've sufficiently solved the problem enough to be usable.

    I do simply like how "T-expressions" look. Which is something I guess I care about, although I know that's not a universal among coders.

  • A RuboCop Configuration Tailored for Phlex
    4 projects | dev.to | 20 Sep 2024
    Phlex takes a more Ruby-centric approach to generating HTML by using Ruby classes and methods instead of traditional template files like ERB or HAML. While this is great for reusability and code organization (And writing more Ruby 🤩), it can lead to long methods and classes, especially when building complex components or pages. Adding TailwindCSS into the mix further increases line lengths because of its utility-first CSS approach, where multiple classes are often stacked together.
  • Show HN: Slab – A programmable markup language for generating HTML
    5 projects | news.ycombinator.com | 23 Jul 2024
  • XRB alternatives - Haml, Slim, and Hamlit
    4 projects | 30 Apr 2024
  • Building a syntax highlighting extension for VS Code
    12 projects | dev.to | 1 Mar 2024
    First of all, I like Slim. I like the beauty and cleanness of Slim templates, to me they are way more readable than regular ERB templates and I think they fit in the ruby/Rails ecosystem very well. Slim is a close cousin to Haml, without the ugly percent characters, haha. I've used Slim exclusively in my projects since about 2016.
  • Hamlet: A type-safe Haml template engine for Go
    5 projects | news.ycombinator.com | 1 Jan 2024
    > I can't say what problem it is supposed to solve

    "Haml accelerates and simplifies template creation" https://haml.info/

    If you'd rather write raw HTML, keeping track of closing tags etc, then don't use HAML. No need to bash it because you personally feel it is ugly or unnecessary. FWIW I personally feel the exact opposite.

  • Any web frameworks that could compare to Symfony?
    10 projects | /r/rust | 9 Mar 2023
    Personally, I'd recommend Maud if you don't need something with runtime reloading. Not only is it much faster, it implements a template language that is effectively the Rust-syntax equivalent to Slim or Haml using a procedural macro, so you get compile-time verification that your HTML output is well-formed.
  • Rux: A JSX-inspired way to render view components in Ruby
    15 projects | news.ycombinator.com | 6 Mar 2023
    Does this support HAML-style syntax? We're 100% HAML-only for templating, whether normal Rails views or ViewComponent... https://github.com/haml/haml https://haml.info/ so going back to writing HTML or ERB feels like a huge downgrade.
  • Anyone from a Typescript/React background who tried out Rust for the 1st time?
    9 projects | /r/rust | 4 Mar 2023
    For templating, Maud is fast, gives compile-time well-formedness guarantees, and outputs minified HTML by default as a side-effect of it being based on Rust macros. (It's of a similar design philosophy to Slim and Haml)
  • Why must closing tags in HTML and XML contain the name of the tag being closed, if the tag being closed can be determined by the order they were opened?
    1 project | /r/askscience | 22 Dec 2022
    You don’t even need closing tags. Both Haml and Jade do away with closing tags altogether.

What are some alternatives?

When comparing Liquid and Haml you can also consider the following projects:

nunjucks - A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)

Slim - Slim is a template language whose goal is to reduce the syntax to the essential parts without becoming cryptic.

Mustache - Logic-less Ruby templates.

Hamlit - High Performance Haml Implementation

React - The library for web and native user interfaces.

Sanitize - Ruby HTML and CSS sanitizer.

hydrogen - Hydrogen lets you build faster headless storefronts in less time, on Shopify.

Arbre - An Object Oriented DOM Tree in Ruby

Tilt - Generic interface to multiple Ruby template engines

Scout Monitoring - Performance metrics and, now, Logs Management Monitoring with Scout Monitoring
Get early access to Scout Monitoring's NEW Ruby logging feature [beta] by signing up now. Start for free and enable logs to get better insights into your Rails apps.
www.scoutapm.com
featured
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured

Did you konow that Ruby is
the 12th most popular programming language
based on number of metions?