{"id":21202076,"url":"https://github.com/liolok/hexo-asset-link","last_synced_at":"2025-07-10T06:32:28.797Z","repository":{"id":34150138,"uuid":"170593987","full_name":"liolok/hexo-asset-link","owner":"liolok","description":"A Hexo plugin to convert Markdown style asset links to HTML style ones","archived":false,"fork":false,"pushed_at":"2023-11-29T07:17:03.000Z","size":48,"stargazers_count":27,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T11:34:28.431Z","etag":null,"topics":["hexo","hexo-plugin","relative-path"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/hexo-asset-link","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/liolok.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":"2019-02-13T23:14:27.000Z","updated_at":"2024-12-27T11:47:05.000Z","dependencies_parsed_at":"2024-06-19T01:31:09.837Z","dependency_job_id":"fc30bd94-46b2-4a53-acca-2ad669f1a895","html_url":"https://github.com/liolok/hexo-asset-link","commit_stats":{"total_commits":41,"total_committers":7,"mean_commits":5.857142857142857,"dds":0.5609756097560976,"last_synced_commit":"d177bed1bc54d79903e265db025fc893ac526a16"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/liolok/hexo-asset-link","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liolok%2Fhexo-asset-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liolok%2Fhexo-asset-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liolok%2Fhexo-asset-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liolok%2Fhexo-asset-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liolok","download_url":"https://codeload.github.com/liolok/hexo-asset-link/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liolok%2Fhexo-asset-link/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264538584,"owners_count":23624436,"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":["hexo","hexo-plugin","relative-path"],"created_at":"2024-11-20T20:13:04.083Z","updated_at":"2025-07-10T06:32:28.531Z","avatar_url":"https://github.com/liolok.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hexo-asset-link [![NPM version](https://badge.fury.io/js/hexo-asset-link.svg)](https://www.npmjs.com/package/hexo-asset-link)\n\nConvert Markdown style asset links to HTML style ones.\n\n## Install\n\nIn Hexo blog instance directory:\n\n```shell\n$ npm i -s hexo-asset-link\n```\n\n**or** if you prefer yarn:\n\n```shell\n$ yarn add hexo-asset-link\n```\n\n## Config\n\n**Find** (not *add*) and enable [`Post Asset Folders`](https://hexo.io/docs/asset-folders#Post-Asset-Folder) feature in `_config.yml`:\n\n```yml\n# Writing\n...\npost_asset_folder: true\n...\n```\n\n## Usage\n\nFor example, if you have these files in `source/_post/`:\n\n```\n+-- _posts/\n|   +-- 2019-02-14-Test-Post.md\n|   +-- 2019-02-14-Test-Post/\n|       +-- Test-Image.png\n|       +-- Test-Other-File.pdf\n```\n\nThen in `2019-02-14-Test-Post.md`:\n\n### Images\n\n```markdown\n![Alt Text](./2019-02-14-Test-Post/Test-Image.png \"Title Text\")\n![Alt Text](2019-02-14-Test-Post/Test-Image.png \"Title Text\")\n```\n\n### Other Files\n\n```markdown\n[Text](./2019-02-14-Test-Post/Test-Other-File.pdf)\n[Text](2019-02-14-Test-Post/Test-Other-File.pdf)\n```\n\nAfter this we'll get the right asset path result in:\n\n- Blog home page of `hexo server` preview;\n- Blog post page of `hexo server` preview;\n- Blog home page of online website;\n- Blog post page of online website;\n- Markdown preview of editors like VS Code.\n\nNow shall we just have fun writing!\n\n## Reference\n\n- [Filter | Hexo](https://hexo.io/api/filter \"Filter | Hexo\")\n- [Posts | Hexo](https://hexo.io/api/posts \"Posts | Hexo\")\n- [`new URL`](https://nodejs.org/docs/latest-v18.x/api/url.html#new-urlinput-base)\n- [`url.pathname`](https://nodejs.org/docs/latest-v18.x/api/url.html#urlpathname)\n- [RegExp - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp \"RegExp - JavaScript | MDN\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliolok%2Fhexo-asset-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliolok%2Fhexo-asset-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliolok%2Fhexo-asset-link/lists"}