{"id":22085632,"url":"https://github.com/nexmo/nexmo-markdown-renderer","last_synced_at":"2025-07-24T17:31:36.429Z","repository":{"id":40183278,"uuid":"235133265","full_name":"Nexmo/nexmo-markdown-renderer","owner":"Nexmo","description":"Nexmo Markdown Renderer","archived":false,"fork":false,"pushed_at":"2023-08-24T01:41:12.000Z","size":352,"stargazers_count":2,"open_issues_count":9,"forks_count":1,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-04-23T23:14:37.917Z","etag":null,"topics":["markdown","markdown-parser","nexmo","ruby"],"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/Nexmo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-20T15:27:37.000Z","updated_at":"2023-03-08T15:23:45.000Z","dependencies_parsed_at":"2023-02-12T07:31:28.937Z","dependency_job_id":null,"html_url":"https://github.com/Nexmo/nexmo-markdown-renderer","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nexmo%2Fnexmo-markdown-renderer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nexmo%2Fnexmo-markdown-renderer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nexmo%2Fnexmo-markdown-renderer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nexmo%2Fnexmo-markdown-renderer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nexmo","download_url":"https://codeload.github.com/Nexmo/nexmo-markdown-renderer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227463796,"owners_count":17778465,"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":["markdown","markdown-parser","nexmo","ruby"],"created_at":"2024-12-01T01:15:25.703Z","updated_at":"2024-12-01T01:15:26.539Z","avatar_url":"https://github.com/Nexmo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nexmo Markdown Renderer\n\n![Build Status](https://github.com/Nexmo/nexmo-markdown-renderer/workflows/CI/badge.svg)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.txt)\n\nThis gem facilitates the presentation of markdown documents in a Rails app by applying custom filters for tabs, code snippets, icons, indentation and more. It is used in the [Nexmo Developer Platform](https://developer.nexmo.com).\n\n* [Installation and Usage](#installation-and-usage)\n    * [In An Application](#in-an-application)\n    * [CLI Standlone](#cli-standalone)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Installation and Usage\n\n### In An Application\n\nTo use this gem you must install it in your application's Gemfile:\n\n```ruby\ngem 'nexmo-markdown-renderer'\n```\n\nThen run `bundle install` to install it.\n\nThe gem requires an environment variable to be set of `DOCS_BASE_PATH` that should point to the top level directory of your markdown content to be rendered. For example:\n\n```\nDOCS_BASE_PATH = '/path/to/markdown`\n```\n\nOnce you have installed it, you can use it by instantiating an instance of it by passing in the options you require:\n\n```ruby\ncontent = Nexmo::Markdown::Renderer.new()\n```\n\nOnce you have instantiated an instance, you can then invoke the `#call` method with the markdown you wish to render. You can either point to a file or pass in the markdown directly:\n\nPassing in the markdown directly:\n\n```ruby\nrendered = content.call( \"with markdown\" )\n```\n\nPassing in a markdown file:\n\n```ruby\nrendered = content.call(\"/_documentation/example/example_markdown.md\")\n```\n\n### CLI Standalone\n\nTo use the markdown renderer with the built-in CLI, you first must install the gem locally:\n\n```bash\n$ gem install nexmo-markdown-renderer\n```\n\nOnce the gem is installed you can use the CLI to generate HTML output for a provided markdown file. To do so, you must specify both a path to the documentation folder and the specific markdown file you wish to render:\n\n```bash\n$ DOCS_BASE_PATH=path/to/docs bundle exec nexmo-markdown-renderer render _documentation/path/sample.md\n```\n\nThe converted HTML output will be displayed in your console.\n\n## Contributing\n\nWe ❤️ contributions from everyone! [Bug reports](https://github.com/Nexmo/nexmo-markdown-renderer/issues), [bug fixes](https://github.com/Nexmo/nexmo-markdown-renderer/pulls) and feedback on the gem is always appreciated. Look at the [Contributor Guidelines](https://github.com/Nexmo/nexmo-markdown-renderer/blob/master/CONTRIBUTING.md) for more information.\n\n## License\n\nThis project is under the [MIT LICENSE](https://github.com/Nexmo/nexmo-markdown-renderer/blob/master/LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexmo%2Fnexmo-markdown-renderer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexmo%2Fnexmo-markdown-renderer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexmo%2Fnexmo-markdown-renderer/lists"}