{"id":13509144,"url":"https://github.com/slime-lang/slime","last_synced_at":"2026-02-27T19:15:40.329Z","repository":{"id":35750995,"uuid":"40030162","full_name":"slime-lang/slime","owner":"slime-lang","description":"Minimalistic HTML templates for Elixir, inspired by Slim.","archived":false,"fork":false,"pushed_at":"2024-06-08T16:38:35.000Z","size":302,"stargazers_count":375,"open_issues_count":6,"forks_count":56,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-01-14T07:34:11.504Z","etag":null,"topics":["elixir","markup","markup-language","slim","slim-framework","slime","template-engine"],"latest_commit_sha":null,"homepage":"http://slime-lang.com","language":"Elixir","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/slime-lang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-08-01T00:35:04.000Z","updated_at":"2025-11-28T13:41:09.000Z","dependencies_parsed_at":"2024-05-01T17:21:15.328Z","dependency_job_id":"cedba5f3-7174-4a78-8954-03e858ced01b","html_url":"https://github.com/slime-lang/slime","commit_stats":{"total_commits":205,"total_committers":32,"mean_commits":6.40625,"dds":0.6926829268292682,"last_synced_commit":"24f5a7fa0ba3163bbe8196956d7f438a84c8cbc0"},"previous_names":["doomspork/slim_fast"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/slime-lang/slime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slime-lang%2Fslime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slime-lang%2Fslime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slime-lang%2Fslime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slime-lang%2Fslime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slime-lang","download_url":"https://codeload.github.com/slime-lang/slime/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slime-lang%2Fslime/sbom","scorecard":{"id":831693,"data":{"date":"2025-08-11","repo":{"name":"github.com/slime-lang/slime","commit":"0b6b3a4e0881236e2a67dcf88cc1db8e6d4927cb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":4,"reason":"Found 12/26 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Info: Possibly incomplete results: error parsing shell code: invalid parameter name: .github/workflows/ci.yml:64","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/slime-lang/slime/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/slime-lang/slime/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/slime-lang/slime/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/slime-lang/slime/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/slime-lang/slime/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/slime-lang/slime/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/slime-lang/slime/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/slime-lang/slime/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/slime-lang/slime/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/slime-lang/slime/release.yml/master?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-5g2h-9x5v-5h3x","Warn: Project is vulnerable to: GHSA-j3gg-r6gp-95q2"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T17:56:15.347Z","repository_id":35750995,"created_at":"2025-08-23T17:56:15.347Z","updated_at":"2025-08-23T17:56:15.347Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29909438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T17:28:36.873Z","status":"ssl_error","status_checked_at":"2026-02-27T17:28:20.970Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["elixir","markup","markup-language","slim","slim-framework","slime","template-engine"],"created_at":"2024-08-01T02:01:03.544Z","updated_at":"2026-02-27T19:15:40.293Z","avatar_url":"https://github.com/slime-lang.png","language":"Elixir","readme":"# Slime [![Continuous Integration][github-img]][github] [![Hex Version][hex-img]][hex] [![License][license-img]][license]\n\n[github-img]: https://github.com/slime-lang/slime/actions/workflows/ci.yml/badge.svg\n[github]: https://github.com/slime-lang/slime/actions/workflows/ci.yml\n[hex-img]: https://img.shields.io/hexpm/v/slime.svg\n[hex]: https://hex.pm/packages/slime\n[license-img]: http://img.shields.io/badge/license-MIT-brightgreen.svg\n[license]: http://opensource.org/licenses/MIT\n\n\u003e A refreshing way to slim down your markup in Elixir.\n\nSlime is an [Elixir][elixir] library for rendering [Slim][slim]-like\ntemplates as HTML.\n\nFor use with [Phoenix][phoenix], please see [PhoenixSlime][phoenix-slime].\n\n[slim]: http://slim-lang.com\n[elixir]: http://elixir-lang.com\n[phoenix]: http://www.phoenixframework.org/\n[phoenix-slime]: https://github.com/slime-lang/phoenix_slime\n\nEasily turn this:\n\n```slim\ndoctype html\nhtml\n  head\n    meta name=\"keywords\" description=\"Slime\"\n    title = site_title\n    javascript:\n      alert('Slime supports embedded javascript!');\n  body\n    #id.class\n      ul\n        = Enum.map [1, 2], fn x -\u003e\n          li = x\n```\n\nInto this:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \u003cmeta name=\"keywords\" description=\"Slime\"\u003e\n  \u003ctitle\u003eWebsite Title\u003c/title\u003e\n  \u003cscript\u003ealert('Slime supports embedded javascript!');\u003c/script\u003e\n\u003c/head\u003e\n\n\u003cbody\u003e\n  \u003cdiv class=\"class\" id=\"id\"\u003e\n    \u003cul\u003e\n      \u003cli\u003e1\u003c/li\u003e\n      \u003cli\u003e2\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/div\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nWith this:\n\n```elixir\nSlime.render(source, site_title: \"Website Title\")\n```\n\n\n## Reference\n\n### Attributes\n\nAttributes can be assigned in a similar fashion to regular HTML.\n\n```slim\na href=\"elixir-lang.org\" target=\"_blank\" Elixir\n```\n```html\n\u003ca href=\"elixir-lang.org\" target=\"_blank\"\u003eElixir\u003c/a\u003e\n```\n\nElixir expressions can be used as attribute values using the interpolation\nsyntax.\n\n```slim\na href=\"#{my_variable}\" Elixir\n```\n```html\n\u003ca href=\"elixir-lang.org\"\u003eElixir\u003c/a\u003e\n```\n\nBoolean attributes can be set using boolean values\n\n```slim\ninput type=\"checkbox\" checked=true\ninput type=\"checkbox\" checked=false\n```\n```html\n\u003cinput type=\"checkbox\" checked\u003e\n\u003cinput type=\"checkbox\"\u003e\n```\n\nThere is a literal syntax for class and id attributes\n\n```slim\n.foo.bar\nselect.bar\n#foo\nbody#bar\n```\n```html\n\u003cdiv class=\"foo bar\"\u003e\u003c/div\u003e\n\u003cselect class=\"bar\"\u003e\u003c/select\u003e\n\u003cdiv id\"foo\"\u003e\u003c/div\u003e\n\u003cbody id=\"bar\"\u003e\u003c/body\u003e\n```\n\n\n### Code\n\nElixir can be written inline using `-` and `=`.\n\n`-` evalutes the expression.\n`=` evalutes the expression, and then inserts the value into template.\n\n```slim\n- number = 40\np = number + 2\n```\n```html\n\u003cp\u003e42\u003c/p\u003e\n```\n\nThe interpolation syntax can be used to insert expressions into text.\n\n```slim\n- name = \"Felix\"\np My cat's name is #{name}\n```\n```html\n\u003cp\u003eMy cat's name is Felix\u003c/p\u003e\n```\n\n\n### Comments\n\nLines can be commented out using the `/` character.\n\n```slim\n/ p This line is commented out\np This line is not\n```\n```html\n\u003cp\u003eThis line is not\u003c/p\u003e\n```\n\nHTML `\u003c!-- --\u003e` comments can be inserted using `/!`\n```slim\n/! Hello, world!\n```\n```html\n\u003c!-- Hello, world! --\u003e\n```\n\n\n### Conditionals\n\nWe can use the regular Elixir flow control such as the `if` expression.\n\n```slim\n- condition = true\n= if condition do\n  p It was true.\n- else\n  p It was false.\n```\n```html\n\u003cp\u003eIt was true.\u003c/p\u003e\n```\n\n\n### Doctype\n\nThere are shortcuts for common doctypes.\n\n```slim\ndoctype html\ndoctype xml\ndoctype transitional\ndoctype strict\ndoctype frameset\ndoctype 1.1\ndoctype basic\ndoctype mobile\n```\n```html\n\u003c!DOCTYPE html\u003e\n\u003c?xml version=\"1.0\" encoding=\"utf-8\" ?\u003e\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"\u003e\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"\u003e\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\"\u003e\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"\u003e\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML Basic 1.1//EN\" \"http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd\"\u003e\n\u003c!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.2//EN\" \"http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd\"\u003e\n```\n\n\n### Iteration\n\nElixir's collection manipulation expressions can be used to iterate over\ncollections in your templates.\n\n```slim\n- names = [\"Sarah\", \"Mia\", \"Harry\"]\n\n/! Enum.map\n= Enum.map names, fn name -\u003e\n  p = name\n\n/! for comprehension\n= for name \u003c- names do\n  h1 = name\n```\n```html\n\u003c!-- Enum.map --\u003e\n\u003cp\u003eSarah\u003c/p\u003e\n\u003cp\u003eMia\u003c/p\u003e\n\u003cp\u003eHarry\u003c/p\u003e\n\n\u003c!-- for comprehension --\u003e\n\u003ch1\u003eSarah\u003c/h1\u003e\n\u003ch1\u003eMia\u003c/h1\u003e\n\u003ch1\u003eHarry\u003c/h1\u003e\n```\n\n### Embedded engines\n\nExamples:\n\n```slim\njavascript:\n  console.log(\"Test javascript\");\n\ncss:\n  body {\n    color: black;\n  }\n\nelixir:\n  a = [1, 2, 3]\n  b = Enum.map(a, \u0026(\u00261 + 1))\n\neex:\n  Hello from \u003c%= \"eex\" %\u003e\n```\n\nYou can define your own embedded engine in slime application config:\n\n```elixir\n# config.exs\nconfig :slime, :embedded_engines, %{\n  markdown: MyApp.MarkdownEngine\n}\n\n# markdown_engine.ex\ndefmodule MyApp.MarkdownEngine do\n  @behaviour Slime.Parser.EmbeddedEngine\n\n  def render(text, _options) do\n    Earmark.to_html(text)\n  end\nend\n```\nBecause the engines are being read on compile time you need to recompile\nthe library after you have added new engines. You can do this by:\n\n```bash\nmix deps.compile slime --force\n```\n\n## Precompilation\n\nTemplates can be compiled into module functions like EEx templates, using\nfunctions `Slime.function_from_file/5` and\n`Slime.function_from_string/5`.\n\nTo use slime templates (and Slime) with\n[Phoenix][phoenix], please see\n[PhoenixSlim][phoenix-slime].\n\n[phoenix]: http://www.phoenixframework.org/\n[phoenix-slime]: https://github.com/slime-lang/phoenix_slime\n\n\n## Differences to Ruby Slim\n\nWe aim for feature parity with the original [Slim](http://slim-lang.com)\nimplementation, but we deviate in some respects. We do this to be true to\nElixir – just like the original Slim implementation is true to its Ruby\nfoundations.\n\nFor example, in Slime you do\n\n```slim\n= if condition do\n  p It was true.\n- else\n  p It was false.\n```\n\nwhere Ruby Slim would do\n\n```slim\n- if condition\n  p It was true.\n- else\n  p It was false.\n```\n\nNote the `do` and the initial `=`, because we render the return value of the\nconditional as a whole.\n\n\n## Debugging\n\nIf you have trouble locating exceptions in Slime templates, you can add\n\n```elixir\nconfig :slime, :keep_lines, true\n```\n\nto your `config.exs` file. With this option Slime will keep original template lines in result `eex` and `html`. Keep in mind, that output is slightly different from default Slime output, for example `|` works like `'`, and empty lines are not ignored.\n\n\n## Contributing\n\nFeedback, feature requests, and fixes are welcomed and encouraged.  Please\nmake appropriate use of [Issues][issues] and [Pull Requests][pulls].  All code\nshould have accompanying tests.\n\n[issues]: https://github.com/slime-lang/slime/issues\n[pulls]: https://github.com/slime-lang/slime/pulls\n\n\n## License\n\nMIT license. Please see [LICENSE][license] for details.\n\n[LICENSE]: https://github.com/slime-lang/slime/blob/master/LICENSE\n","funding_links":[],"categories":["Templating","Text and Numbers"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslime-lang%2Fslime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslime-lang%2Fslime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslime-lang%2Fslime/lists"}