{"id":25216673,"url":"https://github.com/pilaton/remark-translit-slug","last_synced_at":"2026-02-23T23:35:44.161Z","repository":{"id":276632907,"uuid":"929830539","full_name":"Pilaton/remark-translit-slug","owner":"Pilaton","description":"A remark plugin that transliterates headers into slug-IDs.","archived":false,"fork":false,"pushed_at":"2025-11-15T14:28:17.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-19T08:09:36.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/remark-translit-slug","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/Pilaton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2025-02-09T14:06:18.000Z","updated_at":"2025-11-15T14:27:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"df8316d8-a026-4ccc-9673-8802875415ac","html_url":"https://github.com/Pilaton/remark-translit-slug","commit_stats":null,"previous_names":["pilaton/remark-translit-slug"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Pilaton/remark-translit-slug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pilaton%2Fremark-translit-slug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pilaton%2Fremark-translit-slug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pilaton%2Fremark-translit-slug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pilaton%2Fremark-translit-slug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pilaton","download_url":"https://codeload.github.com/Pilaton/remark-translit-slug/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pilaton%2Fremark-translit-slug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29760738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T21:02:23.375Z","status":"ssl_error","status_checked_at":"2026-02-23T20:58:31.539Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2025-02-10T19:31:17.915Z","updated_at":"2026-02-23T23:35:44.156Z","avatar_url":"https://github.com/Pilaton.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# remark-translit-slug\n\n[![npm](https://img.shields.io/npm/v/remark-translit-slug?style=for-the-badge\u0026logo=npm\u0026logoColor=white\u0026labelColor=CB3837\u0026color=CB3837)](https://www.npmjs.com/package/remark-translit-slug)\n\nA plugin for [remark](https://github.com/remarkjs/remark) that transliterates headers into slug identifiers.  \nMost major languages are supported. The full list can be [seen here](https://github.com/sindresorhus/transliterate#supported-languages).\n\n## Install\n\n```bash\nnpm install remark-translit-slug\n```\n\n## Usage\n\nPlug the plugin into your remark processing chain:\n\n```js\nimport { remark } from \"remark\";\nimport remarkTranslitSlug from \"remark-translit-slug\";\nimport remarkToc from \"remark-toc\";\n\nconst file = await remark()\n  .use(remarkTranslitSlug, {\n    separator: \"-\", // Separator for slug (default '-')\n    lowercase: true, // Make the slug lowercase (defaults to true)\n    decamelize: false, // Convert camelcase to separate words. Internally it does fooBar → foo bar. (defaults to false)\n    preserveExistingIds: true, // Keep user-defined ids instead of overwriting them (defaults to true)\n  })\n  .use(remarkToc);\n```\n\nExample usage with `next.js --turbopack` + `@next/mdx`:\n\n```js\nimport createMdx from \"@next/mdx\";\n\n// nextConfig ...\n\nconst withMdx = createMdx({\n  options: {\n    remarkPlugins: [\n      [\n        \"remark-translit-slug\",\n        {\n          separator: \"-\",\n          lowercase: true,\n        },\n      ],\n      [\n        \"remark-toc\",\n        {\n          heading: \"table-of-contents\",\n          tight: true,\n          maxDepth: 3,\n        },\n      ],\n    ],\n  },\n});\nexport default withMdx(nextConfig);\n```\n\n## Result\n\nSource markdown:\n\n```md\n# Hello world!\n\n## Table of contents\n\n---\n\n## Hello in English\n\n## Dobrý den v češtině\n\n## مرحباً بالعربية\n\n## Привет на русском\n\n## Witam w języku polskim\n```\n\nThe result is this html:\n\n```html\n\u003ch1\u003eHello world!\u003c/h1\u003e\n\n\u003ch2 id=\"table-of-contents\"\u003eTable of contents\u003c/h2\u003e\n\u003cul\u003e\n  \u003cli\u003e\u003ca href=\"#hello-in-english\"\u003eHello in English\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"#dobry-den-v-cestine\"\u003eDobrý den v češtině\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"#mrhba-balerbyt\"\u003eمرحباً بالعربية\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"#privet-na-russkom\"\u003eПривет на русском\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"#witam-w-jezyku-polskim\"\u003eWitam w języku polskim\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003chr /\u003e\n\n\u003ch2 id=\"hello-in-english\"\u003eHello in English\u003c/h2\u003e\n\u003ch2 id=\"dobry-den-v-cestine\"\u003eDobrý den v češtině\u003c/h2\u003e\n\u003ch2 id=\"mrhba-balerbyt\"\u003eمرحباً بالعربية\u003c/h2\u003e\n\u003ch2 id=\"privet-na-russkom\"\u003eПривет на русском\u003c/h2\u003e\n\u003ch2 id=\"witam-w-jezyku-polskim\"\u003eWitam w języku polskim\u003c/h2\u003e\n```\n\nThis example shows the simultaneous operation of the `remark-translit-slug` plugin and the `remark-toc` plugin.  \nThe [remark-toc](https://github.com/remarkjs/remark-toc) plugin automatically created a «Table of contents» for us with the correct links that have undergone transliteration.\n\n## API\n\nThe plugin is set up so that the basic configuration will work for most and will not require reconfiguration.\n\nBut if you do need to make changes, the options are fully consistent with the [Slugify](https://github.com/sindresorhus/slugify) plugin. You can read more about them [here](https://github.com/sindresorhus/slugify?tab=readme-ov-file#api).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilaton%2Fremark-translit-slug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpilaton%2Fremark-translit-slug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilaton%2Fremark-translit-slug/lists"}