Slim
Haml
Slim | Haml | |
---|---|---|
31 | 28 | |
5,315 | 3,768 | |
0.0% | 0.0% | |
6.4 | 6.0 | |
3 months 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.
Slim
-
XRB alternatives - Haml, Slim, and Hamlit
4 projects | 30 Apr 2024
-
Building a syntax highlighting extension for VS Code
I spent a few days of my spare time building a VS Code extension that would bring better syntax highlighting for the Slim template language to the editor. I quite enjoyed most of the process so I’d like to share what I learned.
-
Rails 7.1 Released
I think they mean Server Side Rendering (normal rails controllers/views), and Slim is just the name of the templating engine. It's a little nicer than the default ERB. https://github.com/slim-template/slim
There's also SSR with react and other js frameworks, but I don't think that's what they meant.
- How to build a website without frameworks and tons of libraries
-
Do Modern Programming Languages Have to Care About Line Length?
Checkout slim https://github.com/slim-template/slim it's a templating language
-
Hotwire Question - Controller Lifecycle
And this is what the HTML looks like (I'm using slim):
-
How to use View Transitions in Hotwire Turbo
The template renders the tag and inside it the link and the counter itself (the Slim template language and Tailwind styling are used here, hopefully the notation is sufficiently self-explaining):
-
Slim: A HTML Templating Language
In this part of the series, let's explore another popular templating language, Slim.
-
Pug: A HTML Templating Language
Templating languages are widely used in Web development and two of the most popular ones are Pug and Slim. In this series, we're going to learn the basics of these two and hopefully they would help improve your workflow further.
-
Template Engine with percent sign in Rails?
You may want to checkout slim I'v tried ERB, SLIM, and HAML and absolutely sware by slim it's very easy to use and saves a ton of typing compared to ERB.
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?
Liquid - Liquid markup language. Safe, customer facing template language for flexible web apps.
Hamlit - High Performance Haml Implementation
Sanitize - Ruby HTML and CSS sanitizer.
Tilt - Generic interface to multiple Ruby template engines
Mustache - Logic-less Ruby templates.
tachyons - Functional css for humans
Arbre - An Object Oriented DOM Tree in Ruby
Curly - The Curly template language allows separating your logic from the structure of your HTML templates.