Liquid
Haml
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 |
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
-
Managing LLM prompts in DotNet with DotPrompt
You might notice that the prompt has template instructions in there. To create this we used the Fluid library which is based on the Liquid template language from Shopify. It's got some great features in it and helps to make the prompt generation pretty powerful.
-
Instantly preview rendered liquid template
Liquid is a template language created by shopify. In my use case I use it for generate html that is almost similar looking but differs in data. So when iterating over my HTML, I need to preview the changes I made combined with my data.
-
Eleventy vs. Next.js for static site generation
Inside the blog directory, create an index.liquid file. This will be our blog’s homepage. Eleventy provides a number of options when selecting a template engine. For this project, we’ll use Liquid.
- How to Express Logic "and", "Or", "Not"?
-
How To Choose the Best Static Site Generator and Deploy it to Kinsta for Free
Templating engine: SSGs rely on templating engines to define the structure of web pages. These engines enable developers to create reusable templates and incorporate dynamic content. Popular templating engines include Liquid, Handlebars, Mustache, EJS, ERB, HAML, and Slim.
-
Count tickets opened per organization based on a custom field (ticket type/category)
Assuming I understand the ask, I think my approach would be to have a trigger fire when a ticket's custom field is set to "add user to the application." That trigger would notify a webhook. That webhook would be set to the Organization API endpoint with a payload that uses liquid markup to add 1 to the existing Organization's value.
-
How easy is ruby to learn from zero experience coding
For example, their theme templates use Liquid, which is a html templating system for Ruby. Activemerchant also was released by Shopify, and it provides a interface to major payment providers like PayPal.
-
👀 Is anyone interested in reviewing my GitHub Pages and Docker training video?
In the meantime, Liquid v4.0.4 has been released, and allows building a Jekyll site with the latest Ruby.
-
Remove certain tags from follow up tickets?
Liquid docs - https://shopify.github.io/liquid/
-
Running Eleventy Serverless On AWS Lambda@Edge
Then, let’s create the simplest template for our static Eleventy page. We’ll write it using Liquid, but since it’s so simple, it won’t take advantage of any useful templating tags for now. Let’s call it index.liquid:
Haml
-
Douglas Hofstadter on Lisp (1983)
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
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
-
XRB alternatives - Haml, Slim, and Hamlit
4 projects | 30 Apr 2024
-
Building a syntax highlighting extension for VS Code
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
> 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?
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
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?
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?
You don’t even need closing tags. Both Haml and Jade do away with closing tags altogether.
What are some alternatives?
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