{"id":26119130,"url":"https://github.com/markmap-universe/remark-markmap","last_synced_at":"2025-11-25T10:01:50.491Z","repository":{"id":270098977,"uuid":"909335057","full_name":"markmap-universe/remark-markmap","owner":"markmap-universe","description":"A remark plugin insert mindmap by markmap. 一个插入思维导图的 remark 插件。","archived":false,"fork":false,"pushed_at":"2025-02-10T03:18:18.000Z","size":63,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T23:39:58.127Z","etag":null,"topics":["astro","markmap","markmap-lib","mindmap","remark"],"latest_commit_sha":null,"homepage":"http://remark.markmap.org","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/markmap-universe.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":"2024-12-28T11:51:22.000Z","updated_at":"2025-03-18T13:34:18.000Z","dependencies_parsed_at":"2025-02-09T09:36:01.651Z","dependency_job_id":null,"html_url":"https://github.com/markmap-universe/remark-markmap","commit_stats":null,"previous_names":["coderxi1/remark-markmap","markmap-universe/remark-markmap"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmap-universe%2Fremark-markmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmap-universe%2Fremark-markmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmap-universe%2Fremark-markmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmap-universe%2Fremark-markmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markmap-universe","download_url":"https://codeload.github.com/markmap-universe/remark-markmap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248696163,"owners_count":21147079,"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":["astro","markmap","markmap-lib","mindmap","remark"],"created_at":"2025-03-10T12:15:37.220Z","updated_at":"2025-11-25T10:01:45.451Z","avatar_url":"https://github.com/markmap-universe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[**简体中文**](https://github.com/coderxi1/remark-markmap/blob/master/README.zh.md)\n\n# remark-markmap\n\n[![Version](https://img.shields.io/npm/v/remark-markmap)](https://npm.im/remark-markmap)\n[![Version](https://img.shields.io/npm/d18m/remark-markmap)](https://npm.im/remark-markmap)\n[![GithubStars](https://img.shields.io/github/stars/coderxi1/remark-markmap?style=flat\u0026logo=github\u0026color=yellow)](https://github.com/coderxi1/remark-markmap)\n\nA remark plugin to insert mindmap in markdown. Simply insert a code block in markdown to render the mindmap. \n\n\u003e More preview in [my blog](https://coderxi.com/posts/remark-markmap-doc).\n\n\u003eDepend on [markmap](https://github.com/markmap/markmap). Inspired by [hexo-markmap](https://github.com/maxchang3/hexo-markmap).\n\n## Installation\n\n```sh\npnpm install remark-markmap\n```\n```sh\nnpm install remark-markmap\n```\n```sh\nyarn add remark-markmap\n```\n\n## Options\n\n### Plugin Options\n\n```js\n{\n  darkThemeSelector: () =\u003e document.documentElement.matches('.dark') || (window.matchMedia \u0026\u0026 window.matchMedia('(prefers-color-scheme: dark)').matches)\n}\n```\n- **`darkThemeSelector`**: A function used to determine whether the current page is in dark mode. It can return either a `string` or a `boolean`. When it returns a `string`, for example `darkThemeSelector: () =\u003e '[data-theme=\"dark\"]'`, it means it is equivalent to `document.documentElement.matches('[data-theme=\"dark\"]')`.\n\n### Frontmatter Options\n\nThe frontmatter integrates style and jsonOptions(markmap).\n```yaml\nid: markmap-example\nmarkmap:\n  colorFreezeLevel: 2\n```\n\n- **`id`** : Set the id to control single markmap-wrap (such as set style)\n\n- **`markmap`/`options`** : Correspond to the [`IMarkmapJSONOptions`](https://markmap.js.org/api/interfaces/markmap-view.IMarkmapJSONOptions.html) in the markmap project. For more details, please refer to [`jsonOptions`](https://markmap.js.org/docs/json-options#option-list).\n\n## Usage\n\nSay our document contains: `example.md`\n\n`````markdown\nSome text...\n\n````markmap\n---\nid: markmap-example\noptions:\n  colorFreezeLevel: 2\n---\n- links\n- **inline** ~~text~~ *styles*\n- multiline\n  text\n- `inline code`\n- ```js\n  console.log('code block');\n  console.log('code block');\n  ```\n- KaTeX - $x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}$\n````\n\nSome text...\n`````\n\nUse the `remark-markmap` plugin in `example.js`:\n\n```javascript\nimport { read } from 'to-vfile'\nimport { remark } from 'remark'\nimport remarkMarkmap from 'remark-markmap'\n\nconst file = await remark()\n  .use(remarkMarkmap)\n  .process(await read('example.md'))\n\nconsole.log(String(file));\n```\n\nThen you can get the renderd html.\n\n## Example\n\nSee [example branch](https://github.com/coderxi1/remark-markmap/tree/example)\n\nOr clone example branch\n\n```sh\ngit clone -b example https://github.com/coderxi1/remark-markmap remark-markmap-example\n```\n\n[**Preview Page**](https://remark.markmap.org)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmap-universe%2Fremark-markmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkmap-universe%2Fremark-markmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmap-universe%2Fremark-markmap/lists"}