{"id":13394576,"url":"https://github.com/threepointone/markdown-in-js","last_synced_at":"2025-04-04T10:07:41.865Z","repository":{"id":44316437,"uuid":"74213694","full_name":"threepointone/markdown-in-js","owner":"threepointone","description":"inline markdown for react/jsx","archived":false,"fork":false,"pushed_at":"2022-12-06T21:00:48.000Z","size":153,"stargazers_count":784,"open_issues_count":20,"forks_count":21,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-14T16:49:15.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/threepointone.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":"2016-11-19T14:33:23.000Z","updated_at":"2024-10-11T22:09:14.000Z","dependencies_parsed_at":"2023-01-23T15:16:18.137Z","dependency_job_id":null,"html_url":"https://github.com/threepointone/markdown-in-js","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threepointone%2Fmarkdown-in-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threepointone%2Fmarkdown-in-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threepointone%2Fmarkdown-in-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threepointone%2Fmarkdown-in-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threepointone","download_url":"https://codeload.github.com/threepointone/markdown-in-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157275,"owners_count":20893219,"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-07-30T17:01:24.308Z","updated_at":"2025-04-04T10:07:41.841Z","avatar_url":"https://github.com/threepointone.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"markdown-in-js\n---\n\nzero-overhead markdown in your react components\n\nusage\n---\n\nadd `'markdown-in-js/babel'` to the `plugins` field of your babel config\n\n```jsx\nimport markdown from 'markdown-in-js'\n\nconst App = () =\u003e markdown`\n## This is some content.\nYou can write _markdown_ as you'd like.\n\n${ \u003cspan\u003e interpolate more \u003cContent/\u003e \u003c/span\u003e }\n\nyou can \u003ci\u003einline *html*\u003c/i\u003e or even \u003cOtherComponents/\u003e, wow\n\n\u003cdiv style=${{ fontWeight: 'bold' }}\n    className=${'some more styles'}\n    onClick=${handler}\u003e\n  interpolate attributes as expected\n\u003c/div\u003e\n`\n```\n\n- gets compiled to react elements via a babel plugin\n- preserves interpolations\n- built with [commonmark](https://github.com/jgm/commonmark.js)\n- optionally add [prismjs](http://prismjs.com/) for syntax highlighting of code blocks\n\ncustom components\n---\n\nYou can use custom components for markdown primitives like so -\n```jsx\nimport md from 'markdown-in-js'\nimport { MyHeading, MyLink } from './path/to/components'\n\nconst App = () =\u003e md({ h1: MyHeading, a: MyLink })`\n# this will be a custom header\n[custom link component](/url/to/link)\n`\n```\n\ntodo\n---\n\n- optionally no-wrap paragraphs\n- optionally return array of elements\n- instructions for in-editor syntax highlighting\n- add gotchas to docs\n- precompile code blocks\n- commonmark options\n- tests!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreepointone%2Fmarkdown-in-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreepointone%2Fmarkdown-in-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreepointone%2Fmarkdown-in-js/lists"}