{"id":15759376,"url":"https://github.com/pegasd/md2conf","last_synced_at":"2025-03-13T18:31:58.077Z","repository":{"id":56883087,"uuid":"97037519","full_name":"pegasd/md2conf","owner":"pegasd","description":"Convert Markdown to XHTML ready to be posted to Confluence","archived":false,"fork":false,"pushed_at":"2019-12-04T13:36:50.000Z","size":40,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T20:37:51.735Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/pegasd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-07-12T17:56:06.000Z","updated_at":"2019-12-04T13:36:53.000Z","dependencies_parsed_at":"2022-08-20T13:10:48.404Z","dependency_job_id":null,"html_url":"https://github.com/pegasd/md2conf","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasd%2Fmd2conf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasd%2Fmd2conf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasd%2Fmd2conf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasd%2Fmd2conf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pegasd","download_url":"https://codeload.github.com/pegasd/md2conf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243459134,"owners_count":20294344,"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-10-04T10:04:59.185Z","updated_at":"2025-03-13T18:31:57.777Z","avatar_url":"https://github.com/pegasd.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Md2conf\n\nConverts Markdown to Confluence storage format\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'md2conf'\n```\n\nAnd then execute:\n\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n\n```bash\n$ gem install md2conf\n```\n\n## Usage\n\n### Basic usage\n\n```ruby\nrequire 'md2conf'\n\nconf_xhtml = Md2conf.parse_markdown(File.read('./README.md'))\n```\n\nContents of `conf_xhtml` is now ready to be pushed to Confluence.\n\n### Custom macros\n\nIt is possible to set up custom macros to be processed inside your Markdown files.\n\nMacros must be specified in the format `{MACRO_NAME:MACRO_ARG}` and reside outside of code blocks.\n\nMacro definition are read from the file `~/.md2conf.yaml` inside a `macros` key:\n\n```yaml\nmacros:\n  PUP: \u003ca href=\"https://tickets.puppetlabs.com/browse/PUP-%\u003carg\u003es\"\u003e\u003cimg src=\"https://img.shields.io/badge/PUP-%\u003carg\u003es-blue.svg\" /\u003e\u003c/a\u003e\n  PUPTEXT: \u003ca href=\"https://tickets.puppetlabs.com/browse/PUP-%\u003carg\u003es\"\u003ePUP-%\u003carg\u003es\u003c/a\u003e\n```\n\nHaving these definitions, the following macros:\n\n```markdown\n{PUP:7123} Fixed a bug\n\n{PUPTEXT:7885} Work in progress\n```\n\nwill be converted to this:\n\n```html\n\u003ca href=\"https://tickets.puppetlabs.com/browse/PUP-7123\"\u003e\u003cimg src=\"https://img.shields.io/badge/PUP-7123-blue.svg\" /\u003e\u003c/a\u003e Fixed a bug\n\n\u003ca href=\"https://tickets.puppetlabs.com/browse/PUP-7885\"\u003ePUP-7885\u003c/a\u003e Work in progress\n```\n\nNote the usage of `%\u003carg\u003es` - these will be replaced by the `MACRO_ARG` part that is specified inside each macro.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports, feature and pull requests are welcome at the official GitHub [repo](https://github.com/pegasd/md2conf).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpegasd%2Fmd2conf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpegasd%2Fmd2conf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpegasd%2Fmd2conf/lists"}