<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Haml</id>
	<title>Haml - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Haml"/>
	<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Haml&amp;action=history"/>
	<updated>2026-07-15T09:19:52Z</updated>
	<subtitle>在这个wiki上该页的修订历史</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://arolstar52-zhtest.hf.space/index.php?title=Haml&amp;diff=2882836&amp;oldid=prev</id>
		<title>imported&gt;SamitheSammy：​/* growthexperiments-addlink-summary-summary:2|0|0 */</title>
		<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Haml&amp;diff=2882836&amp;oldid=prev"/>
		<updated>2026-05-06T13:20:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;growthexperiments-addlink-summary-summary:2|0|0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{NoteTA&lt;br /&gt;
|G1=IT&lt;br /&gt;
|G2=FL&lt;br /&gt;
}}&lt;br /&gt;
{{校对翻译}}&lt;br /&gt;
{{Refimprove|time=2017-05-24T09:43:44+00:00}}&lt;br /&gt;
{{Infobox programming language&lt;br /&gt;
| name                      = Haml&lt;br /&gt;
| logo                      =&lt;br /&gt;
| alumni                    = [https://github.com/nex3 Natalie Weizenbaum]、{{tsl|en|Hampton Catlin}}&lt;br /&gt;
| designer                  = [http://nick-walsh.com/ Nick Walsh]&lt;br /&gt;
| developer                 = {{plainlist|&lt;br /&gt;
* [https://github.com/norman Norman Clarke]&lt;br /&gt;
* [https://github.com/mattwildig Matt Wildig]&lt;br /&gt;
* [https://github.com/amatsuda Akira Matsuda]&lt;br /&gt;
* [https://github.com/teeparham Tee Parham]&lt;br /&gt;
* [https://github.com/nex3 Natalie Weizenbaum] }}&lt;br /&gt;
| programming_language      = [[Ruby]]&lt;br /&gt;
| latest_release_version    = 5.2.1&lt;br /&gt;
| latest_release_date       = {{Start date|2020|11|30}}&amp;lt;ref name=&amp;quot;Change Log&amp;quot;&amp;gt;{{cite web|title=Change Log|url=https://github.com/haml/haml/blob/master/CHANGELOG.md|accessdate=2020-11-30|archive-date=2015-01-05|archive-url=https://web.archive.org/web/20150105090805/https://github.com/haml/haml/blob/master/CHANGELOG.md|dead-url=no}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
| operating_system          = [[跨平台]]&lt;br /&gt;
| paradigm                  = {{tsl|en|Template engine (web)||模板引擎}}&lt;br /&gt;
| license                   = {{plainlist|&lt;br /&gt;
* [https://github.com/haml/haml/blob/master/MIT-LICENSE MIT许可证]&lt;br /&gt;
* [https://unspace.ca/ Unspace Interactive]&amp;lt;ref name=&amp;quot;Haml GitHub&amp;quot; /&amp;gt;}}&lt;br /&gt;
| website                   = {{URL|http://haml.info/}}&lt;br /&gt;
| file_ext                  = .haml&lt;br /&gt;
}}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Haml&amp;#039;&amp;#039;&amp;#039;（[[HTML|&amp;#039;&amp;#039;&amp;#039;H&amp;#039;&amp;#039;&amp;#039;TML]] &amp;#039;&amp;#039;&amp;#039;A&amp;#039;&amp;#039;&amp;#039;bstraction &amp;#039;&amp;#039;&amp;#039;M&amp;#039;&amp;#039;&amp;#039;arkup &amp;#039;&amp;#039;&amp;#039;L&amp;#039;&amp;#039;&amp;#039;anguage，HTML抽象标记语言）是一种模板系统，它可以避免在Web文档中内嵌代码，使[[HTML]]更简易和干净。Haml为[[HTML]]中提供了一些动态内容的灵活性。类似其他[[万维网|Web]]语言（如[[PHP]]、[[Active Server Pages|ASP]]、[[JSP]]）和模板系统（如[[Eruby|eRuby]]），Haml也嵌入一些在运行时执行的代码并生成[[HTML]]代码，从而提供一些动态内容。为运行Haml代码，文件需要采用.haml扩展名。这些文件类似.erb或eRuby文件，这有助于在开发[[网络应用程序]]时嵌入[[Ruby]]代码。在解析代码注释时，Haml采用与Ruby 1.9或之后版本相同的规则。Haml只能理解兼容[[ASCII]]的编码（例如[[UTF-8]]），而不能理解不兼容ASCII的[[UTF-16]]与[[UTF-32]]。&amp;lt;ref name=&amp;quot;Encoding&amp;quot;&amp;gt;{{Cite web|url=http://haml.info/docs/yardoc/file.REFERENCE.html|title=Encoding|accessdate=29 January 2016|archive-date=2017-05-29|archive-url=https://web.archive.org/web/20170529075227/http://haml.info/docs/yardoc/file.REFERENCE.html|dead-url=no}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;UTF Encodings&amp;quot;&amp;gt;{{Cite web|url=https://github.com/haml/haml/blob/88110b0607efca433c13bb1e339dcb1131edf010/lib/haml/util.rb|title=UTF encodings|accessdate=7 February 2016|archive-date=2019-02-16|archive-url=https://web.archive.org/web/20190216133231/https://github.com/haml/haml/blob/88110b0607efca433c13bb1e339dcb1131edf010/lib/haml/util.rb|dead-url=no}}&amp;lt;/ref&amp;gt;Haml可以在[[命令行界面]]中使用，也可以作为一个单独的Ruby模块或在一个[[Ruby on Rails]]应用程序中使用，这使Haml可用于广泛的应用程序。&lt;br /&gt;
&lt;br /&gt;
== 历史 ==&lt;br /&gt;
Haml最早由{{tsl|en|Hampton Catlin}}于2006年发布，它的成果领先于其他几个人。他的动机是使[[HTML]]更简单、清晰和易于使用。自2006年以来，它已随新版本发布而多次修订。2012年4月，Haml的维护由Norman Clarke接手。&amp;lt;ref name=&amp;quot;History&amp;quot;&amp;gt;{{Cite web|url=http://haml.info/about.html|title=History|accessdate=29 January 2016|archive-date=2017-05-27|archive-url=https://web.archive.org/web/20170527063202/http://haml.info/about.html|dead-url=no}}&amp;lt;/ref&amp;gt;[[Natalie (網站)|Natalie]] Weizenbaum致力于使Haml可以在[[Ruby]]应用程序中使用，而品牌与设计则由Nick Walsh完成。目前的维护团队中还有Matt Wildig、Akira Matsuda和Tee Parham。&amp;lt;ref name=&amp;quot;Haml GitHub&amp;quot;&amp;gt;{{Cite web|url=https://github.com/haml/haml|title=GitHub|accessdate=30 January 2016|archive-date=2017-04-27|archive-url=https://web.archive.org/web/20170427062452/https://github.com/haml/haml|dead-url=no}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 版本历史 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 特性 ==&lt;br /&gt;
Haml的发展有四项原则。&lt;br /&gt;
&lt;br /&gt;
=== 用户友好的标记 ===&lt;br /&gt;
[[置标语言]]如果遵循下列特征，那么它则用户友好：&lt;br /&gt;
* 语言能轻松理解&lt;br /&gt;
* 使用便捷（其实现）&lt;br /&gt;
&lt;br /&gt;
=== DRY ===&lt;br /&gt;
标记语言应坚持不重复自身（[[一次且仅一次|DRY]]）原则。它应该：&lt;br /&gt;
* 避免不必要的重复&lt;br /&gt;
* 专注于干净的代码&lt;br /&gt;
&lt;br /&gt;
=== 精巧缩进 ===&lt;br /&gt;
有良好[[缩进]]的标记语言可以改善外观、使阅读器易于读取，并有助确定元素的开始与结束位置。&lt;br /&gt;
&lt;br /&gt;
=== 清晰结构 ===&lt;br /&gt;
有清晰结构的标记语言有助于代码维护和理解最终结果的逻辑。Haml在这方面是否提供了有差异的优势，这点尚不清晰。&lt;br /&gt;
&lt;br /&gt;
== 例子 ==&lt;br /&gt;
Haml标记在语法上类似[[层叠样式表|CSS]]。例如，Haml同样使用&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;（点）表示CSS的类，使开发人员可以轻松使用这种标记。&lt;br /&gt;
&lt;br /&gt;
=== Hello, World例子 ===&lt;br /&gt;
Haml的最简单的[[Hello World]]实现像是这样：&lt;br /&gt;
&lt;br /&gt;
==== Haml作为[[命令行界面|命令行工具]] ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;haml&amp;quot;&amp;gt;&lt;br /&gt;
%p{:class =&amp;gt; &amp;quot;sample&amp;quot;, :id =&amp;gt; &amp;quot;welcome&amp;quot;} Hello, World!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;得到这样的[[HTML]]代码：&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;sample&amp;quot; id=&amp;quot;welcome&amp;quot;&amp;gt;Hello, World!&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;为运行Haml代码，必须已安装，如使用下列命令   &amp;lt;code&amp;gt;Haml&amp;lt;/code&amp;gt;以[[RubyGems|gem]]安装：&amp;lt;ref name=&amp;quot;Using Haml&amp;quot;&amp;gt;{{Cite web|url=http://haml.info/docs/yardoc/file.REFERENCE.html#using_haml|title=Using Haml|accessdate=7 February 2016|archive-date=2017-05-29|archive-url=https://web.archive.org/web/20170529075227/http://haml.info/docs/yardoc/file.REFERENCE.html#using_haml|dead-url=no}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
 gem install haml&lt;br /&gt;
Haml代码若以&amp;lt;code&amp;gt;Hello.haml&amp;lt;/code&amp;gt;为文件名保存，则可以这样运行：&lt;br /&gt;
 haml Hello.haml&lt;br /&gt;
&lt;br /&gt;
==== Haml作为[[Ruby on Rails]]附加项 ====&lt;br /&gt;
要用[[Ruby]]使用Haml，Ruby的&amp;lt;code&amp;gt;Gemfile&amp;lt;/code&amp;gt;应该包含此行：&lt;br /&gt;
 gem &amp;#039;haml&amp;#039;&lt;br /&gt;
类似[[Eruby|eRuby]]，Haml也可以访问局部变量（在同一个文件中以Ruby代码声明）。此例子使用一个Ruby控制器文件为例。&lt;br /&gt;
* file: app/controllers/messages_controller.rb&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
class MessagesController &amp;lt; ApplicationController&lt;br /&gt;
  def index&lt;br /&gt;
    @message = &amp;quot;Hello, World!&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* file: app/views/messages/index.html.haml&amp;lt;syntaxhighlight lang=&amp;quot;haml&amp;quot;&amp;gt;&lt;br /&gt;
#welcome&lt;br /&gt;
    %p= @message&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
将得到：&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;welcome&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;Hello, World!&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Haml作为Ruby模块 ====&lt;br /&gt;
要独立于[[Ruby on Rails|Rails]]和[http://guides.rubyonrails.org/action_view_overview.html ActionView]{{Wayback|url=http://guides.rubyonrails.org/action_view_overview.html |date=20170528044224 }}使用Haml，安装&amp;lt;code&amp;gt;haml&amp;lt;/code&amp;gt; [[RubyGems|gem]]，在&amp;lt;code&amp;gt;Gemfile&amp;lt;/code&amp;gt;中包含它，然后简单的在Ruby脚本中导入&amp;lt;code&amp;gt;[Usage: require &amp;#039;haml&amp;#039;]&amp;lt;/code&amp;gt;，或者以&amp;lt;code&amp;gt;-rubygems&amp;lt;/code&amp;gt;标志调用Ruby[[直譯器]]。&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
welcome = Haml::Engine.new(&amp;quot;%p Hello, World!&amp;quot;)&lt;br /&gt;
welcome.render&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;输出：&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Hello, World!&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;[http://haml.info/docs/yardoc/Haml/Engine.html Haml::Engine]{{Wayback|url=http://haml.info/docs/yardoc/Haml/Engine.html |date=20170602094319 }}是一个Haml类。&lt;br /&gt;
&lt;br /&gt;
=== 基本例子 ===&lt;br /&gt;
Haml使用空格缩进（两个空格）来表示标签的嵌套和识别给定标签的范围。这取代打开、闭合的标签对系统，从而符合[[一次且仅一次|DRY]]并使其看上去更清晰（容易阅读）。下列例子展示了Haml与[[Eruby|eRuby]]（嵌入式Ruby）的差异。&lt;br /&gt;
{| style=&amp;quot;margin-bottom: 10px;&amp;quot;&lt;br /&gt;
! Haml&lt;br /&gt;
! ERB&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;Haml&amp;quot;&amp;gt;&lt;br /&gt;
%div.category&lt;br /&gt;
    %div.recipes&lt;br /&gt;
        %h1= recipe.name&lt;br /&gt;
        %h3= recipe.category&lt;br /&gt;
    %div&lt;br /&gt;
        %h4= recipe.description&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;HTML+ERB&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;category&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;recipes&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;h1&amp;gt;&amp;lt;%= recipe.name %&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
        &amp;lt;h3&amp;gt;&amp;lt;%= recipe.category %&amp;gt;&amp;lt;/h3&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;&amp;lt;%= recipe.description %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
由上述代码示例呈现的[[HTML]]代码如下所示：&amp;lt;syntaxhighlight lang=&amp;quot;HTML&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;category&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;recipes&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;h1&amp;gt;Cookie&amp;lt;/h1&amp;gt;&lt;br /&gt;
        &amp;lt;h3&amp;gt;Desserts&amp;lt;/h3&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Made from dough and sugar. Usually circular in shape and has about 400 calories.&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;两者的关键差异是：&lt;br /&gt;
* Haml不像[[Eruby|eRuby]]那样，每个元素都有开始与结束&lt;br /&gt;
* eRuby语法看上去很像、更像[[HTML]]，而Haml更像[[层叠样式表|CSS]]。&lt;br /&gt;
* Haml使用[[缩进]]来嵌套标签元素，而eRuby使用与HTML相同的表示法&lt;br /&gt;
* 在Haml属性中，&amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;可以用&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;和&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt;表示&amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt;和&amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;关键字。Haml使用&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;标示一个HTML元素，而eRuby中使用&amp;lt;code&amp;gt;&amp;lt;&amp;gt;&amp;lt;/code&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
=== 嵌入Ruby代码的例子 ===&lt;br /&gt;
注意：这是一个简单的预览示例，可能不能体现此语言的目前版本。&amp;lt;syntaxhighlight lang=&amp;quot;haml&amp;quot;&amp;gt;&lt;br /&gt;
!!!&lt;br /&gt;
%html{ :xmlns =&amp;gt; &amp;quot;http://www.w3.org/1999/xhtml&amp;quot;, :lang =&amp;gt; &amp;quot;en&amp;quot;, &amp;quot;xml:lang&amp;quot; =&amp;gt; &amp;quot;en&amp;quot;}&lt;br /&gt;
  %head&lt;br /&gt;
    %title BoBlog&lt;br /&gt;
    %meta{&amp;quot;http-equiv&amp;quot; =&amp;gt; &amp;quot;Content-Type&amp;quot;, :content =&amp;gt; &amp;quot;text/html; charset=utf-8&amp;quot;}&lt;br /&gt;
    %link{&amp;quot;rel&amp;quot; =&amp;gt; &amp;quot;stylesheet&amp;quot;, &amp;quot;href&amp;quot; =&amp;gt; &amp;quot;main.css&amp;quot;, &amp;quot;type&amp;quot; =&amp;gt; &amp;quot;text/css&amp;quot;}&lt;br /&gt;
  %body&lt;br /&gt;
    #header&lt;br /&gt;
      %h1 BoBlog&lt;br /&gt;
      %h2 Bob&amp;#039;s Blog&lt;br /&gt;
    #content&lt;br /&gt;
      - @entries.each do |entry|&lt;br /&gt;
        .entry&lt;br /&gt;
          %h3.title= entry.title&lt;br /&gt;
          %p.date= entry.posted.strftime(&amp;quot;%A, %B %d, %Y&amp;quot;)&lt;br /&gt;
          %p.body= entry.body&lt;br /&gt;
    #footer&lt;br /&gt;
      %p&lt;br /&gt;
        All content copyright © Bob&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;上述Haml产生这个[[XHTML]]：&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html lang=&amp;#039;en&amp;#039; xml:lang=&amp;#039;en&amp;#039; xmlns=&amp;#039;http://www.w3.org/1999/xhtml&amp;#039;&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt;BoBlog&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;meta content=&amp;#039;text/html; charset=utf-8&amp;#039; http-equiv=&amp;#039;Content-Type&amp;#039; /&amp;gt;&lt;br /&gt;
    &amp;lt;link href=&amp;quot;/stylesheets/main.css&amp;quot; media=&amp;quot;screen&amp;quot; rel=&amp;quot;Stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;#039;header&amp;#039;&amp;gt;&lt;br /&gt;
      &amp;lt;h1&amp;gt;BoBlog&amp;lt;/h1&amp;gt;&lt;br /&gt;
      &amp;lt;h2&amp;gt;Bob&amp;#039;s Blog&amp;lt;/h2&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;#039;content&amp;#039;&amp;gt;&lt;br /&gt;
      &amp;lt;div class=&amp;#039;entry&amp;#039;&amp;gt;&lt;br /&gt;
        &amp;lt;h3 class=&amp;#039;title&amp;#039;&amp;gt;Halloween&amp;lt;/h3&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;#039;date&amp;#039;&amp;gt;Tuesday, October 31, 2006&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;#039;body&amp;#039;&amp;gt;&lt;br /&gt;
          Happy Halloween, glorious readers! I&amp;#039;m going to a party this evening... I&amp;#039;m very excited.&lt;br /&gt;
        &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div class=&amp;#039;entry&amp;#039;&amp;gt;&lt;br /&gt;
        &amp;lt;h3 class=&amp;#039;title&amp;#039;&amp;gt;New Rails Templating Engine&amp;lt;/h3&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;#039;date&amp;#039;&amp;gt;Friday, August 11, 2006&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;p class=&amp;#039;body&amp;#039;&amp;gt;&lt;br /&gt;
          There&amp;#039;s a very cool new Templating Engine out for Ruby on Rails. It&amp;#039;s called Haml.&lt;br /&gt;
        &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;#039;footer&amp;#039;&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;&lt;br /&gt;
        All content copyright © Bob&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 实现 ==&lt;br /&gt;
Haml的官方实现已经以[[Ruby]][[插件]]形式内置在[[Ruby on Rails]]和{{tsl|en|Merb}}中，该Ruby实现也能够独立使用。Haml可以轻松配合其他语言使用。下列是各种语言对Haml的实现：&lt;br /&gt;
* [https://github.com/k0kubun/hamlit hamlit (Ruby)]{{Wayback|url=https://github.com/k0kubun/hamlit |date=20170421232751 }}&lt;br /&gt;
* [https://github.com/jessemiller/HamlPy HamlPy (Python)]{{Wayback|url=https://github.com/jessemiller/HamlPy |date=20180611022049 }}&lt;br /&gt;
* [https://github.com/norman/lua-haml LuaHaml (Lua)]{{Wayback|url=https://github.com/norman/lua-haml |date=20180610232412 }}&lt;br /&gt;
* [https://web.archive.org/web/20080608081951/http://weblogs.asp.net/mirvodasergey/archive/2008/06/02/introducing-monorail-nhaml.aspx MonoRail NHaml (ASP.NET)]&lt;br /&gt;
* [https://code.google.com/p/nhaml/ NHaml (.NET)]{{Wayback|url=https://code.google.com/p/nhaml/ |date=20160316090641 }}&lt;br /&gt;
* [https://web.archive.org/web/20100303124319/http://wiki.github.com/dxw/Fammel/ Fammel (PHP)]&lt;br /&gt;
* [https://web.archive.org/web/20110417115303/http://haml-to-php.com/ HAML-TO-PHP (PHP5)]&lt;br /&gt;
* [http://phaml.sourceforge.net/ pHAML (PHP)]{{Wayback|url=http://phaml.sourceforge.net/ |date=20170610115013 }}&lt;br /&gt;
* [https://code.google.com/p/phamlp/ phamlp (PHP)]{{Wayback|url=https://code.google.com/p/phamlp/ |date=20160821080435 }}&lt;br /&gt;
* [http://phphaml.sourceforge.net phpHaml (PHP5)]{{Wayback|url=http://phphaml.sourceforge.net/ |date=20170619012015 }}&lt;br /&gt;
* [https://github.com/arnaud-lb/MtHaml Multi target HAML (PHP5.3)]{{Wayback|url=https://github.com/arnaud-lb/MtHaml |date=20180611022532 }}&lt;br /&gt;
* [https://github.com/creationix/haml-js haml-js (JavaScript)]{{Wayback|url=https://github.com/creationix/haml-js |date=20161004160128 }}&lt;br /&gt;
* [https://metacpan.org/module/Text::Haml Text::Haml (Perl)]{{Wayback|url=https://metacpan.org/module/Text::Haml |date=20191017071318 }}&lt;br /&gt;
* [https://web.archive.org/web/20100216131951/http://scalate.fusesource.org/index.html Scalate (Scala)]&lt;br /&gt;
* [https://github.com/raymyers/JHaml JHaml (Java)]{{Wayback|url=https://github.com/raymyers/JHaml |date=20180611031908 }}&lt;br /&gt;
* [https://github.com/lvivski/hart Hart (Dart)]{{Wayback|url=https://github.com/lvivski/hart |date=20180610234115 }}&lt;br /&gt;
* [https://github.com/Unspeakable/cl-haml cl-haml (Common Lisp)]{{Wayback|url=https://github.com/Unspeakable/cl-haml |date=20180611002643 }}&lt;br /&gt;
&lt;br /&gt;
== 参见 ==&lt;br /&gt;
* [[BBCode]]&lt;br /&gt;
* [[Eruby|eRuby]]&lt;br /&gt;
* {{tsl|en|Markaby}}&lt;br /&gt;
* [[Ruby]]&lt;br /&gt;
* [[Ruby on Rails]]&lt;br /&gt;
* [[YAML]]&lt;br /&gt;
* [[Sass]] – 一种类似的面向[[层叠样式表|CSS]]的系统，也是由Catlin设计。&lt;br /&gt;
* {{tsl|en|Website Meta Language|网站元语言}} – 另一种有类似功能的模板语言&lt;br /&gt;
* {{tsl|en|Web template|Web模板}}&lt;br /&gt;
&lt;br /&gt;
== 参考资料 ==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
== 外部链接 ==&lt;br /&gt;
* {{Official website}}&lt;br /&gt;
** [http://haml.info/tutorial.html Haml tutorial]{{Wayback|url=http://haml.info/tutorial.html |date=20170529062037 }}&lt;br /&gt;
* [https://learnxinyminutes.com/docs/haml/ Learn Haml (basic)]{{Wayback|url=https://learnxinyminutes.com/docs/haml/ |date=20170423221617 }}&lt;br /&gt;
* {{GitHub|haml/haml|Haml}}&lt;br /&gt;
* [http://phphaml.sourceforge.net/ phpHaml]{{Wayback|url=http://phphaml.sourceforge.net/ |date=20170619012015 }}，面向[[PHP]]的Haml实现&lt;br /&gt;
* [https://groups.google.com/forum/?hl=en#!forum/haml Haml Google讨论组]{{Wayback|url=https://groups.google.com/forum/?hl=en#!forum/haml |date=20180130014044 }}&lt;br /&gt;
* [http://weblog.rubyonrails.org/2007/1/19/haml-1-0 Haml 1.0]{{Wayback|url=http://weblog.rubyonrails.org/2007/1/19/haml-1-0 |date=20170519062131 }}，Ruby on Rails博客上的公告&lt;br /&gt;
&lt;br /&gt;
[[Category:Ruby]]&lt;br /&gt;
[[Category:網頁模板引擎]]&lt;br /&gt;
[[Category:轻量级标记语言]]&lt;br /&gt;
[[Category:自由發展元件與函式庫]]&lt;br /&gt;
[[Category:使用MIT许可证的软件]]&lt;/div&gt;</summary>
		<author><name>imported&gt;SamitheSammy</name></author>
	</entry>
</feed>