{"id":13463248,"url":"https://github.com/haml/haml","last_synced_at":"2025-05-12T03:38:36.782Z","repository":{"id":65330867,"uuid":"426","full_name":"haml/haml","owner":"haml","description":"HTML Abstraction Markup Language - A Markup Haiku","archived":false,"fork":false,"pushed_at":"2024-12-28T15:27:55.000Z","size":10581,"stargazers_count":3779,"open_issues_count":21,"forks_count":574,"subscribers_count":81,"default_branch":"main","last_synced_at":"2025-05-09T11:36:01.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://haml.info","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haml.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["haml","k0kubun"]}},"created_at":"2008-02-11T22:55:26.000Z","updated_at":"2025-05-03T17:40:43.000Z","dependencies_parsed_at":"2023-09-27T12:26:44.079Z","dependency_job_id":"8be6387a-8dff-4ba8-9912-701a0eb62ec8","html_url":"https://github.com/haml/haml","commit_stats":{"total_commits":5760,"total_committers":220,"mean_commits":"26.181818181818183","dds":0.628125,"last_synced_commit":"3841f56a8005bebcd89ee11de6afcd34f1f4abcb"},"previous_names":[],"tags_count":158,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haml%2Fhaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haml%2Fhaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haml%2Fhaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haml%2Fhaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haml","download_url":"https://codeload.github.com/haml/haml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253411526,"owners_count":21904147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T13:00:48.913Z","updated_at":"2025-05-12T03:38:36.759Z","avatar_url":"https://github.com/haml.png","language":"Ruby","funding_links":["https://github.com/sponsors/haml","https://github.com/sponsors/k0kubun"],"categories":["HTML \u0026 Markup","Ruby","Happy Exploring 🤘","Template Engine","Uncategorized"],"sub_categories":["Template Engines","Uncategorized"],"readme":"# Haml\n\n[![Gem Version](https://badge.fury.io/rb/haml.svg)](https://rubygems.org/gems/haml)\n[![test](https://github.com/haml/haml/actions/workflows/test.yml/badge.svg)](https://github.com/haml/haml/actions/workflows/test.yml)\n[![Code Climate](https://codeclimate.com/github/haml/haml/badges/gpa.svg)](https://codeclimate.com/github/haml/haml)\n[![Inline docs](https://inch-ci.org/github/haml/haml.svg)](https://inch-ci.org/github/haml/haml)\n[![Discord Server](https://dcbadge.limes.pink/api/server/https://discord.gg/G8dEAwvV2Y)](https://discord.gg/G8dEAwvV2Y)\n\nHaml is a templating engine for HTML. It's designed to make it both easier and\nmore pleasant to write HTML documents, by eliminating redundancy, reflecting the\nunderlying structure that the document represents, and providing an elegant syntax\nthat's both powerful and easy to understand.\n\n## Basic Usage\n\nHaml can be used from the command line or as part of a Ruby web framework. The\nfirst step is to install the gem:\n\n~~~sh\ngem install haml\n~~~\n\nAfter you write some Haml, you can run\n\n~~~sh\nhaml render document.haml\n~~~\n\nto compile it to HTML. For more information on these commands, check out\n\n~~~sh\nhaml --help\n~~~\n\nTo use Haml programmatically, check out the [YARD documentation](https://haml.info/docs/yardoc/).\n\n## Using Haml with Rails\n\nTo use Haml with Rails, simply add Haml to your Gemfile and run `bundle`.\n\n~~~ruby\ngem 'haml'\n~~~\n\nIf you'd like to replace Rails's ERB-based generators with Haml, add\n[haml-rails](https://github.com/haml/haml-rails) to your Gemfile as well.\n\n## Formatting\n\nThe most basic element of Haml is a shorthand for creating HTML:\n\n~~~haml\n%tagname{:attr1 =\u003e 'value1', :attr2 =\u003e 'value2'} Contents\n~~~\n\nNo end-tag is needed; Haml handles that automatically. If you prefer HTML-style\nattributes, you can also use:\n\n~~~haml\n%tagname(attr1='value1' attr2='value2') Contents\n~~~\n\nAdding `class` and `id` attributes is even easier. Haml uses the same syntax as\nthe CSS that styles the document:\n\n~~~haml\n%tagname#id.class\n~~~\n\nIn fact, when you're using the `\u003cdiv\u003e` tag, it becomes _even easier_. Because\n`\u003cdiv\u003e` is such a common element, a tag without a name defaults to a div. So\n\n~~~haml\n#foo Hello!\n~~~\n\nbecomes\n\n~~~html\n\u003cdiv id='foo'\u003eHello!\u003c/div\u003e\n~~~\n\nHaml uses indentation to bring the individual elements to represent the HTML\nstructure. A tag's children are indented beneath than the parent tag. Again, a\nclosing tag is automatically added. For example:\n\n~~~haml\n%ul\n  %li Salt\n  %li Pepper\n~~~\n\nbecomes:\n\n~~~html\n\u003cul\u003e\n  \u003cli\u003eSalt\u003c/li\u003e\n  \u003cli\u003ePepper\u003c/li\u003e\n\u003c/ul\u003e\n~~~\n\nYou can also put plain text as a child of an element:\n\n~~~haml\n%p\n  Hello,\n  World!\n~~~\n\nIt's also possible to embed Ruby code into Haml documents. An equals sign, `=`,\nwill output the result of the code. A hyphen, `-`, will run the code but not\noutput the result. You can even use control statements like `if` and `while`:\n\n~~~haml\n%p\n  Date/Time:\n  - now = DateTime.now\n  %strong= now\n  - if now \u003e DateTime.parse(\"December 31, 2006\")\n    = \"Happy new \" + \"year!\"\n~~~\n\nHaml provides far more tools than those presented here. Check out the [reference\ndocumentation](https://haml.info/docs/yardoc/file.REFERENCE.html)\nfor full details.\n\n### Indentation\n\nHaml's indentation can be made up of one or more tabs or spaces. However,\nindentation must be consistent within a given document. Hard tabs and spaces\ncan't be mixed, and the same number of tabs or spaces must be used throughout.\n\n## Contributing\n\nContributions are welcomed, but before you get started please read the\n[guidelines](https://haml.info/development.html#contributing).\n\nAfter forking and then cloning the repo locally, install Bundler and then use it\nto install the development gem dependencies:\n~~~sh\ngem install bundler\nbundle install\n~~~\n\nOnce this is complete, you should be able to run the test suite:\n~~~sh\nrake\n~~~\n\nAt this point `rake` should run without error or warning and you are ready to\nstart working on your patch!\n\nNote that you can also run just one test out of the test suite if you're working\non a specific area:\n\n~~~sh\nruby -Itest test/helper_test.rb -n test_buffer_access\n~~~\n\nHaml currently supports Ruby 2.0.0 and higher, so please make sure your changes run on 2.0+.\n\n## Team\n\n### Current Maintainers\n\n* [Akira Matsuda](https://github.com/amatsuda)\n* [Matt Wildig](https://github.com/mattwildig)\n* [Tee Parham](https://github.com/teeparham)\n* [Takashi Kokubun](https://github.com/k0kubun)\n\n### Alumni\n\nHaml was created by [Hampton Catlin](http://hamptoncatlin.com), the author of\nthe original implementation. Hampton is no longer involved in day-to-day coding,\nbut still consults on language issues.\n\n[Natalie Weizenbaum](http://nex-3.com) was for many years the primary developer\nand architect of the \"modern\" Ruby implementation of Haml.\n\n[Norman Clarke](https://github.com/norman) was the primary maintainer of Haml from 2012 to 2016.\n\n## License\n\nSome of Natalie's work on Haml was supported by Unspace Interactive.\n\nBeyond that, the implementation is licensed under the MIT License.\n\nCopyright (c) 2006-2019 Hampton Catlin, Natalie Weizenbaum and the Haml team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaml%2Fhaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaml%2Fhaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaml%2Fhaml/lists"}