Show Topics

Haml

Haml is a whitespace sensitive HTML templating language. Prepros compiles Haml files to .html by default. Set output extension to .php in output options if you want to compile Haml files to PHP.

Options

  • Output File

    Click the output file path to manually change it or use project wide output options to adjust output path for all Haml files.

  • Double Quotes

    Enable this option to quote html attributes with double quotes.

  • Minify HTML

    Enable this option to minify the output HTML file.

Imported Files

Prepros compiles the parent file whenever you edit an imported file. Prepros also re-scans imported files whenever you edit a file. Refresh project with CTRL+R or CMD+R to manually re-scan imported files.

%html
  %head
    title Haml Example
  %body
    .content
      = Haml::Engine.new(IO.read('b.haml')).render

// This file will compiled automatically whenever you edit b.haml

Note: Prepros doesn't support nested Haml imports.

Learn more about Haml from Haml website.