{"id":18319738,"url":"https://github.com/redding/sanford-nm","last_synced_at":"2025-04-09T14:22:15.451Z","repository":{"id":17766918,"uuid":"20627665","full_name":"redding/sanford-nm","owner":"redding","description":"Sanford template engine for Nm templates ","archived":false,"fork":false,"pushed_at":"2017-08-17T15:41:08.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T05:46:59.965Z","etag":null,"topics":["ruby","template-engine"],"latest_commit_sha":null,"homepage":null,"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/redding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-08T22:10:50.000Z","updated_at":"2018-10-20T00:50:30.000Z","dependencies_parsed_at":"2022-08-21T01:20:23.972Z","dependency_job_id":null,"html_url":"https://github.com/redding/sanford-nm","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redding%2Fsanford-nm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redding%2Fsanford-nm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redding%2Fsanford-nm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redding%2Fsanford-nm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redding","download_url":"https://codeload.github.com/redding/sanford-nm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054200,"owners_count":21039952,"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":["ruby","template-engine"],"created_at":"2024-11-05T18:14:07.276Z","updated_at":"2025-04-09T14:22:15.429Z","avatar_url":"https://github.com/redding.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sanford::Nm\n\n[Sanford](https://github.com/redding/sanford) template engine for rendering [Nm](https://github.com/redding/nm) templates\n\n## Usage\n\nRegister the engine:\n\n```ruby\nrequire 'sanford'\nrequire 'sanford-nm'\n\nSanford.configure do |c|\n\n  c.template_source \"/path/to/templates\" do |s|\n    s.engine 'nm', Sanford::Nm::TemplateEngine\n  end\n\nend\n```\n\nAdd `.nm` to any template files in your template source path.  Sanford will render their content using Nm when they are rendered.\n\n### Notes\n\nNm doesn't allow overriding the template scope but instead allows you to pass in data that binds to the template scope as methods.  By default, the service handler will be bound to Nm's scope via the `view` method in templates.  If you want to change this, provide a `'handler_local'` option when registering:\n\n```ruby\n  c.template_source \"/path/to/templates\" do |s|\n    s.engine 'nm', Sanford::Nm::TemplateEngine, 'handler_local' =\u003e 'service_handler'\n  end\n```\n\nNm doesn't cache templates by default.  To enable caching, pass a `'cache'` option when registering:\n\n```ruby\n  c.template_source \"/path/to/templates\" do |s|\n    s.engine 'nm', Sanford::Nm::TemplateEngine, 'cache' =\u003e true\n  end\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'sanford-nm'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install sanford-nm\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredding%2Fsanford-nm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredding%2Fsanford-nm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredding%2Fsanford-nm/lists"}