{"id":13532088,"url":"https://github.com/andi23rosca/solid-markdown","last_synced_at":"2025-05-16T11:04:56.426Z","repository":{"id":43085821,"uuid":"415685622","full_name":"andi23rosca/solid-markdown","owner":"andi23rosca","description":"Render Markdown as Solid components","archived":false,"fork":false,"pushed_at":"2025-05-09T15:48:35.000Z","size":495,"stargazers_count":119,"open_issues_count":5,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-10T23:17:08.536Z","etag":null,"topics":["markdown","rehype","remark","solid","solid-js","unified"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/andi23rosca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-10T19:51:27.000Z","updated_at":"2025-05-02T06:40:13.000Z","dependencies_parsed_at":"2024-01-14T02:01:55.548Z","dependency_job_id":"dcee9fbc-065a-4879-95db-aa97b2e7d02a","html_url":"https://github.com/andi23rosca/solid-markdown","commit_stats":{"total_commits":12,"total_committers":3,"mean_commits":4.0,"dds":"0.33333333333333337","last_synced_commit":"3c824fb5951e731a758685b971d59e4d78aad02d"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andi23rosca%2Fsolid-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andi23rosca%2Fsolid-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andi23rosca%2Fsolid-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andi23rosca%2Fsolid-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andi23rosca","download_url":"https://codeload.github.com/andi23rosca/solid-markdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518384,"owners_count":22084374,"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","rehype","remark","solid","solid-js","unified"],"created_at":"2024-08-01T07:01:08.110Z","updated_at":"2025-05-16T11:04:51.415Z","avatar_url":"https://github.com/andi23rosca.png","language":"TypeScript","readme":"\u003cp\u003e\n  \u003cimg width=\"100%\" src=\"https://assets.solidjs.com/banner?type=solid-markdown\u0026background=tiles\u0026project=%20\" alt=\"solid-markdown\"\u003e\n\u003c/p\u003e\n\n# `solid-markdown`\n\nRender markdown as solid components.\n\nThe implementation is 90% shamelessly copied from https://github.com/remarkjs/react-markdown.\n\nChanges include:\n\n- Replacing React specific component creation with SolidJS components\n- Porting the implementation from javascript with JSDoc types to typescript\n\nPlease check the original repo for in-depth details on how to use.\n\n## Installation\n```bash\nnpm install solid-markdown\n```\n\n\n## Usage\n\n```jsx\nimport { SolidMarkdown } from \"solid-markdown\";\n\nconst markdown = `\n# This is a title\n\n- here's\n- a\n- list\n`;\nconst App = () =\u003e {\n  return \u003cSolidMarkdown children={markdown} /\u003e;\n};\n```\n\n## Rendering strategy\nThere's an extra option you can pass to the markdown component: `renderingStrategy: \"memo\" | \"reconcile\"`.\n\nThe default value is `\"memo\"`, which means that the markdown parser will generate a new full AST tree each time (inside a `useMemo`), and use that.\nAs a consequence, the full DOM will be re-rendered, even the markdown nodes that haven't changed. (Should be fine 90% of the time).\n\nUsing `reconcile` will switch the strategy to using a solid store with the `reconcile` function (https://docs.solidjs.com/reference/store-utilities/reconcile). This will diff the previous and next markdown ASTs and only trigger re-renders for the parts that have changed.\nThis will help with cases like streaming partial content and updating the markdown gradually (see https://github.com/andi23rosca/solid-markdown/issues/32).\n\n\n```tsx\n\u003cSolidMarkdown renderingStrategy=\"reconcile\" children={markdown} /\u003e;\n```\n\n## TODO\n\n- [ ] Port unit tests from from original library\n","funding_links":[],"categories":["📦 Components \u0026 Libraries"],"sub_categories":["UI Components"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandi23rosca%2Fsolid-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandi23rosca%2Fsolid-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandi23rosca%2Fsolid-markdown/lists"}