{"id":25236844,"url":"https://github.com/flowershow/remark-wiki-link","last_synced_at":"2025-10-26T12:30:18.286Z","repository":{"id":57688862,"uuid":"473996494","full_name":"flowershow/remark-wiki-link","owner":"flowershow","description":"Parse and render wiki-style links in markdown especially Obsidian style links.","archived":false,"fork":false,"pushed_at":"2025-10-07T09:28:54.000Z","size":158,"stargazers_count":33,"open_issues_count":6,"forks_count":6,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-10-07T11:32:13.611Z","etag":null,"topics":["remark-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flowershow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-25T12:15:02.000Z","updated_at":"2025-10-07T09:28:59.000Z","dependencies_parsed_at":"2025-07-13T07:22:15.840Z","dependency_job_id":"b063fea0-674f-4e40-ae85-74d9e736f750","html_url":"https://github.com/flowershow/remark-wiki-link","commit_stats":null,"previous_names":["life-itself/remark-wiki-link-plus","flowershow/remark-wiki-link-plus"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/flowershow/remark-wiki-link","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowershow%2Fremark-wiki-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowershow%2Fremark-wiki-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowershow%2Fremark-wiki-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowershow%2Fremark-wiki-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flowershow","download_url":"https://codeload.github.com/flowershow/remark-wiki-link/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowershow%2Fremark-wiki-link/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281059638,"owners_count":26437056,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["remark-plugin"],"created_at":"2025-02-11T15:32:09.321Z","updated_at":"2025-10-26T12:30:18.280Z","avatar_url":"https://github.com/flowershow.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @flowershow/remark-wiki-link\n\nParse and render wiki-style links in markdown especially Obsidian style links.\n\n🚧 TODO better docs and usage instructions/examples\n\n## What is this ?\n\nUsing obsidian, when we type in wiki link syntax for eg. `[[wiki_link]]` it would parse them as anchors.\n\n## Features supported\n\n- [x] Support `[[Internal link]]`\n- [x] Support `[[Internal link|With custom text]]`\n- [x] Support `[[Internal link#heading]]`\n- [x] Support `[[Internal link#heading|With custom text]]`\n- [x] Support `![[Document.pdf]]`\n- [x] Support `![[Image.png]]`\n\n* Supported image formats are jpg, jpeg, png, apng, webp, gif, svg, bmp, ico\n* Unsupported image formats will display a raw wiki link string, e.g. `[[Image.xyz]]`.\n\nFuture support:\n\n- [ ] Support `![[Audio.mp3]]`\n- [ ] Support `![[Video.mp4]]`\n- [ ] Support `![[Embed note]]`\n- [ ] Support `![[Embed note#heading]]`\n\n## Installation\n\n```bash\nnpm install @flowershow/remark-wiki-link\n```\n\n## Usage\n\n```javascript\nimport { unified } from \"unified\";\nimport remarkParse from \"remark-parse\";\nimport wikiLinkPlugin from \"@flowershow/remark-wiki-link\";\n\nconst processor = unified().use(remarkParse).use(wikiLinkPlugin);\n```\n\n## Configuration options\n\n### `format`\n\nType: `\"regular\" | \"shortestPossible\"`\nDefault: `\"regular\"`\n\n- `\"regular\"`: Link paths will be treated as is (absolute or relative, depending on how they are written)\n- `\"shortestPossible\"`: Link paths will be treated as \"shortest-possible\" absolute paths (e.g. `[[abc]]` would be matched to blog/abc permalink if provided in permalinks array)\n\n### `permalinks`\n\nType: `Array\u003cstring\u003e`\nDefault: `[]`\n\nA list of URLs used to match wikilinks. Wikilink without a matching permalink will have `new` class.\n\n(When using `format: \"shortestPossible\"`, this list is used to resolve shortened paths to their full paths.)\n\n### `className`\n\nType: `string`\nDefault: `\"internal\"`\n\nClass name added to all wiki link and embed nodes.\n\n### `newClassName`\n\nType: `string`\nDefault: `\"new\"`\n\nClass name added to nodes for which no matching permalink (passed in `permalinks` option) was found.\n\n### `urlResolver`\n\nType: `(name: string) =\u003e string`\nDefault: `(name: string) =\u003e name`\n\nA function that resolves a wikilink (or embed) target to a URL path. The target is the part in `[[target|alias]]` or `![[target]]`.\n\n### `aliasDivider`\n\nType: `string`\nDefault: `\"|\"`\n\nThe character used to separate the link target from its alias in wiki links. For example in `[[target|alias]]`, the divider is `|`.\n\n## Generating list of permalinks\n\nIf you're using shortest possible path format for your wiki links, you need to set `option.format: \"shortestPossible\"` and provide the plugin with a list of permalinks that point to files in your content folder as `option.permalinks`. You can generate this list using your own script or use a file system utility like `glob`:\n\n```javascript\nimport { unified } from \"unified\";\nimport remarkParse from \"remark-parse\";\nimport wikiLinkPlugin from \"@flowershow/remark-wiki-link\";\nimport glob from \"glob\";\n\nconst permalinks = glob\n  .sync(\"**/*.md\", { cwd: \"content\" })\n  .map((path) =\u003e path.replace(/\\.md$/, \"\"));\n\nconst processor = unified().use(remarkParse).use(wikiLinkPlugin, {\n  format: \"shortestPossible\",\n  permalinks,\n});\n```\n\n## Running tests\n\n```bash\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowershow%2Fremark-wiki-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowershow%2Fremark-wiki-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowershow%2Fremark-wiki-link/lists"}