{"id":20853999,"url":"https://github.com/landakram/remark-task-list","last_synced_at":"2026-04-14T12:33:58.859Z","repository":{"id":57353038,"uuid":"97072521","full_name":"landakram/remark-task-list","owner":"landakram","description":"Toggle task list items and reference them by IDs. ","archived":false,"fork":false,"pushed_at":"2019-04-27T21:50:23.000Z","size":7,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T02:18:33.684Z","etag":null,"topics":["remark","remark-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/landakram.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}},"created_at":"2017-07-13T02:41:40.000Z","updated_at":"2023-07-13T15:28:26.000Z","dependencies_parsed_at":"2022-08-29T19:10:49.818Z","dependency_job_id":null,"html_url":"https://github.com/landakram/remark-task-list","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/landakram%2Fremark-task-list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/landakram%2Fremark-task-list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/landakram%2Fremark-task-list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/landakram%2Fremark-task-list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/landakram","download_url":"https://codeload.github.com/landakram/remark-task-list/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243222184,"owners_count":20256229,"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":["remark","remark-plugin"],"created_at":"2024-11-18T03:24:04.079Z","updated_at":"2025-12-25T12:18:17.610Z","avatar_url":"https://github.com/landakram.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# remark-task-list\n[![npm version](https://badge.fury.io/js/remark-task-list.svg)](https://badge.fury.io/js/remark-task-list) [![Build Status](https://travis-ci.org/landakram/remark-task-list.svg?branch=master)](https://travis-ci.org/landakram/remark-task-list)\n\nThis [remark](https://github.com/wooorm/remark) plugin does a few things: \n\n* It lets you add IDs to task list items so you can reference them later\n* It lets you toggle task list items by passing in a list of IDs to toggle. The plugin will transform the AST and flip the `node.checked` properties for each ID.\n\n## Usage\n\n```javascript\nconst unified = require('unified')\nconst markdown = require('remark-parse')\nconst taskListPlugin = require('remark-task-list');\n\nlet processor = unified()\n    .use(markdown, { gfm: true })\n    .use(taskListPlugin, { \n        toggle: ['task-list-item-1'], // Default is []\n        idPrefix: 'task-list-item-'   // Default is 'task-list-item-'\n    })\n```\n\nWhen the processor is run, each checkbox `listItem` node will have a few properties\nattached to its `data` key: \n\n```javascript\ndata: {\n    idx: 0,                    // Incremented for each task list item\n    id: 'task-list-item-0',    // Controlled by `idPrefix`\n    hProperties: {\n        id: 'task-list-item-0' // Causes the node to be rendered to HTML with an `id` attribute\n    }\n}\n```\n\nWe used the `toggle` option above to indicate that we'd like the task list item\nwith the ID `task-list-item-1` to be toggled. If it is checked, it will be\ntoggled unchecked, and vice versa.\n\nSay that we have this markdown string:\n\n``` markdown\n- [ ] task 1\n- [x] task 2\n```\n\nSince we specified `toggle: [\"task-list-item-1\"]`, the second `listItem` node\nwill have its `checked` property flipped. Thus, the markdown would be re-rendered like so:\n\n``` markdown\n-   [ ] task 1\n-   [ ] task 2\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flandakram%2Fremark-task-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flandakram%2Fremark-task-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flandakram%2Fremark-task-list/lists"}