{"id":18099924,"url":"https://github.com/rossmacarthur/pulldown-cmark-toc","last_synced_at":"2025-04-13T16:09:00.927Z","repository":{"id":57657882,"uuid":"284461101","full_name":"rossmacarthur/pulldown-cmark-toc","owner":"rossmacarthur","description":"Generate a table of contents from a Markdown document","archived":false,"fork":false,"pushed_at":"2025-02-24T07:04:35.000Z","size":48,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"trunk","last_synced_at":"2025-04-13T16:08:55.300Z","etag":null,"topics":["cmark","markdown","rust","table-of-contents"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rossmacarthur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2020-08-02T12:52:52.000Z","updated_at":"2025-02-24T07:04:28.000Z","dependencies_parsed_at":"2024-12-10T13:41:16.689Z","dependency_job_id":"7c82c707-0e30-4208-9612-5319d18c99d9","html_url":"https://github.com/rossmacarthur/pulldown-cmark-toc","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"6e2bc2cd50e8461afae214e89a6d17c8c2660be3"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossmacarthur%2Fpulldown-cmark-toc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossmacarthur%2Fpulldown-cmark-toc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossmacarthur%2Fpulldown-cmark-toc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossmacarthur%2Fpulldown-cmark-toc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rossmacarthur","download_url":"https://codeload.github.com/rossmacarthur/pulldown-cmark-toc/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741205,"owners_count":21154255,"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":["cmark","markdown","rust","table-of-contents"],"created_at":"2024-10-31T21:11:45.402Z","updated_at":"2025-04-13T16:09:00.898Z","avatar_url":"https://github.com/rossmacarthur.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pulldown-cmark-toc\n\n[![Crates.io](https://badgers.space/crates/version/pulldown-cmark-toc)](https://crates.io/crates/pulldown-cmark-toc)\n[![Docs.rs](https://badgers.space/badge/docs.rs/latest/blue)](https://docs.rs/pulldown-cmark-toc)\n[![Build Status](https://badgers.space/github/checks/rossmacarthur/pulldown-cmark-toc/trunk?label=build)](https://github.com/rossmacarthur/pulldown-cmark-toc/actions/workflows/build.yaml?branch=trunk)\n\nGenerate a table of contents from a Markdown document.\nBy default the heading anchor calculation (aka the \"slugification\")\nis done in a way that attempts to mimic GitHub's (undocumented) behavior.\n\n## Getting started\n\nAdd the `pulldown-cmark-toc` to your `Cargo.toml`.\n\n```\ncargo add pulldown-cmark-toc\n```\n\n## Usage\n\n```rust\nuse pulldown_cmark_toc::TableOfContents;\n\nlet text = r#\"\n# Heading\n\n## Subheading\n\n## Subheading with `code`\n\"#;\n\nlet toc = TableOfContents::new(text);\nassert_eq!(\n    toc.to_cmark(),\n    r#\"- [Heading](#heading)\n  - [Subheading](#subheading)\n  - [Subheading with `code`](#subheading-with-code)\n\"#\n);\n}\n```\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n   http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frossmacarthur%2Fpulldown-cmark-toc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frossmacarthur%2Fpulldown-cmark-toc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frossmacarthur%2Fpulldown-cmark-toc/lists"}