{"id":22980960,"url":"https://github.com/rubyworks/malt","last_synced_at":"2025-08-13T17:33:38.588Z","repository":{"id":56882675,"uuid":"735967","full_name":"rubyworks/malt","owner":"rubyworks","description":"My Milkshake is Better than Yours","archived":false,"fork":false,"pushed_at":"2015-03-28T18:14:13.000Z","size":1048,"stargazers_count":12,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-07T03:46:18.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rubyworks.github.com/malt","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubyworks.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-06-23T15:44:11.000Z","updated_at":"2024-09-21T18:11:46.000Z","dependencies_parsed_at":"2022-08-21T00:20:18.952Z","dependency_job_id":null,"html_url":"https://github.com/rubyworks/malt","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fmalt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fmalt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fmalt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fmalt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyworks","download_url":"https://codeload.github.com/rubyworks/malt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229773540,"owners_count":18122031,"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-12-15T01:46:18.140Z","updated_at":"2024-12-15T01:46:18.773Z","avatar_url":"https://github.com/rubyworks.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Malt](http://rubyworks.github.io/malt)\n\n[![Version](https://img.shields.io/gem/v/malt.svg)](https://rubygems.org/gems/malt)\n[![Build Status](https://secure.travis-ci.org/rubyworks/malt.png)](http://travis-ci.org/rubyworks/malt)\n[![Issues](https://img.shields.io/github/issues-raw/rubyworks/malt.svg)](https://github.com/rubyworks/malt/issues)\n\nMalt provides a factory framework for rendering a variety of template and\nmarkup document formats. Malt has a very object-oriented design\nutilizing separate engine adapter classes and format classes. This makes\nMalt easy to maintain, debug and extend, and thus more robust. In fact,\nMalt supports template caching and ERB compilation by default, which was\nvery easy to implement thanks to it's clean design.\n\n\n## Usage\n\n### Functional API\n\n    Malt.render(:file=\u003e'foo.erb', :to=\u003e:html, :data=\u003edata)\n\nWhere `data` is a data source of some type. Malt will see\nthat the file is an ERB template and render it accordingly.\n\nThe output of this call will be the HTML String.\n\n### Object-Oriented API\n\n    Malt.file('foo.erb').to_html(data).to_s\n\nWhere +data+ is a data source of some type. Malt will see\nthat the file is an ERB template and render it accordingly.\n\nTo get the render text you simple need to provide the template\nor markup type.\n\n    Malt.text(text, :type=\u003e:erb).to_html(data).to_s\n\nNotice the `#to_s` method call. This is needed because #to_html\nreturns a `Malt::Format::HTML` object.\n\n\n## Limitations\n\n*JRuby* and *Rubinus* users: Not all template systems work with your Ruby.\nConsequently not all of Malt will work either. Thankfully Malt only\nrequires template engines as they are needed, so it will work fine\nin most cases. But, you will need to avoid engines that depend on compiled\ncode, such as `less` and `coffee-script`.\n\n\n## Installation\n\nTo install with RubyGems simply open a console and type:\n\n    $ gem install  \n\nUsiong Bundler add to your gem file.\n\n    gem 'malt'\n\nFor a site install you will need Ruby Setup and the compressed\npackages (tar.gz or zip usually). Uncompress the package cd into\nit and run setup.rb, e.g.\n\n    $ tar -xvzf malt-x.y.z.tgz\n    $ cd malt-x.y.z.tgz\n    $ sudo setup.rb\n\n\n## Copyrights\n\nCopyright (c) 2010 Rubyworks\n\nThis program is ditributed under the terms of the *BSD-2-Clause* license.\n\nSee the LICENSE.txt file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Fmalt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyworks%2Fmalt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Fmalt/lists"}