{"id":18347628,"url":"https://github.com/botpress/md2ob","last_synced_at":"2025-10-11T09:32:40.907Z","repository":{"id":49814455,"uuid":"511207380","full_name":"botpress/md2ob","owner":"botpress","description":"Library to convert an array of markdown files to a valid OpenBook JSON schema","archived":false,"fork":false,"pushed_at":"2022-09-09T20:34:22.000Z","size":23,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-20T23:06:53.512Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/botpress.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-06T16:11:40.000Z","updated_at":"2022-11-01T20:24:24.000Z","dependencies_parsed_at":"2023-01-18T02:25:12.228Z","dependency_job_id":null,"html_url":"https://github.com/botpress/md2ob","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/botpress/md2ob","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botpress%2Fmd2ob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botpress%2Fmd2ob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botpress%2Fmd2ob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botpress%2Fmd2ob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/botpress","download_url":"https://codeload.github.com/botpress/md2ob/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botpress%2Fmd2ob/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261032071,"owners_count":23100049,"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-11-05T21:14:32.311Z","updated_at":"2025-10-11T09:32:35.873Z","avatar_url":"https://github.com/botpress.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# md2ob\n\n\u003e Converts a list of markdown files to an OpenBook JSON object\n\n**md2ob** is a lightweight npm library used by the [OpenBook Playground](https://openbook-playground.botpress.tools) to convert users' Markdown files to an OpenBook JSON object for book compilation via [API](https://openbook.botpress.cloud/redoc).\n\nThis library can be used by anyone to create custom front-end or back-end OpenBook clients and preserve the same markdown format as our Playground.\n\n## Install\n\n```\nnpm install md2ob\n```\n\n## Usage\n\n```js\nimport convert from \"@botpress/md2ob\";\n\nconst file1 = `\n# Topic 1\nThis is the description of topic 1\n\n## Subtopic 1\nThis is the description of subtopic 1\n\n- A very impressive fact about subtopic 1\n    - `attachment to the fact`\n    - \u003e a question\n- A second fact\n`\n\nconst result = convert(...[file1]);\n\nif (result.success) {\n    // Success\n    console.log(result.book, result.warnings)\nelse {\n    // Failure\n    console.log(result.errors)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotpress%2Fmd2ob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbotpress%2Fmd2ob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotpress%2Fmd2ob/lists"}