{"id":16318515,"url":"https://github.com/vic/iexample","last_synced_at":"2025-06-25T02:32:49.957Z","repository":{"id":57506309,"uuid":"127946157","full_name":"vic/iexample","owner":"vic","description":"Mix formatted documentation iex examples.","archived":false,"fork":false,"pushed_at":"2018-04-03T18:13:32.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T13:53:38.569Z","etag":null,"topics":["documentation","elixir","iex","mix-format"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vic.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":null,"security":null,"support":null}},"created_at":"2018-04-03T17:45:07.000Z","updated_at":"2023-10-07T18:50:13.000Z","dependencies_parsed_at":"2022-08-29T20:00:44.511Z","dependency_job_id":null,"html_url":"https://github.com/vic/iexample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vic/iexample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fiexample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fiexample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fiexample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fiexample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vic","download_url":"https://codeload.github.com/vic/iexample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fiexample/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261791008,"owners_count":23210080,"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":["documentation","elixir","iex","mix-format"],"created_at":"2024-10-10T22:23:46.374Z","updated_at":"2025-06-25T02:32:49.912Z","avatar_url":"https://github.com/vic.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IExample - Elixir formatted documentation examples.\n\n[![Travis](https://img.shields.io/travis/vic/iexample.svg)](https://travis-ci.org/vic/iexample)\n[![Hex.pm](https://img.shields.io/hexpm/v/iexample.svg?style=flat-square)](https://hexdocs.pm/iexample)\n\n## Usage\n\nJust interpolate the result of `iexample` into your documentation strings.\n\nNote that for this to work, your docs should allow interpolation (dont use `~S`)\n*and* the interpolation should happen at the start of a new line.\n\nThe `iexample/2` macro takes the expression result and a code block, and simply generates\nan iex example string.\n\nThe following code from `test/support/example.ex`, would generate:\n\n```\niex\u003e 12 * 3\n36\n```\n\n```elixir\ndefmodule MyModule do\n  import IExample\n\n  @moduledoc \"\"\"\n  Math works\n\n  #{\n    iexample(36) do\n      12 * 3\n    end\n  }\n  \"\"\"\nend\n```\n\n\nThen just run `mix format` and the interpolated code should be formatted for you nicely.\n\n\n## Installation\n\n```elixir\ndef deps do\n  [\n    {:iexample, \"~\u003e 0.1\"}\n  ]\nend\n```\n\nDocumentation can be found at [https://hexdocs.pm/iexample](https://hexdocs.pm/iexample).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic%2Fiexample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvic%2Fiexample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic%2Fiexample/lists"}