{"id":19806626,"url":"https://github.com/timnew/hexo-tag-asset-res","last_synced_at":"2025-05-01T07:30:59.360Z","repository":{"id":19729595,"uuid":"22985701","full_name":"timnew/hexo-tag-asset-res","owner":"timnew","description":"Hexo Tag that consumes asset files","archived":false,"fork":false,"pushed_at":"2015-10-20T10:13:12.000Z","size":273,"stargazers_count":17,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T07:16:23.417Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/timnew/hexo-tag-asset-res","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/timnew.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":"2014-08-15T09:58:30.000Z","updated_at":"2024-08-24T10:24:31.000Z","dependencies_parsed_at":"2022-08-24T14:09:16.188Z","dependency_job_id":null,"html_url":"https://github.com/timnew/hexo-tag-asset-res","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fhexo-tag-asset-res","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fhexo-tag-asset-res/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fhexo-tag-asset-res/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timnew%2Fhexo-tag-asset-res/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timnew","download_url":"https://codeload.github.com/timnew/hexo-tag-asset-res/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251840159,"owners_count":21652292,"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":[],"created_at":"2024-11-12T09:08:01.935Z","updated_at":"2025-05-01T07:30:59.123Z","avatar_url":"https://github.com/timnew.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"**\u003ch2\u003eOBSOLETE WARNING\u003c/h2\u003e**  \n\n**This Plug-in is designed to be used with Hexo 2. And it is considered to be obsoleted after Hexo 3 released, which already has the `asset-folder` feature built-in.**\n\nhexo-tag-asset-res  [![NPM version][npm-image]][npm-url] [![Dependency Status][depstat-image]][depstat-url][![Stories in Ready](https://badge.waffle.io/timnew/hexo-tag-asset-res.png?label=ready\u0026title=Ready)](https://waffle.io/timnew/hexo-tag-asset-res)\n==================\n\n\u003e [Hexo][hexo-url] tags that enable you to reference files in [post asset] with relative path\n\n## Install\n\nInstall using [npm][npm-url].\n\n    $ npm install hexo-tag-asset-res --save\n\n## Usage\n\nSuppose you have the following folder structure:\n```\nsource\\\n  _posts\\\n    2014-08-15-a-simple-self-introduction.md\n    2014-08-15-a-simple-self-introduction\\\n      my_portrait.jpg\n      my_resume.pdf\n```\n\nIn the markdown file `2014-08-15-a-simple-self-introduction.md`, you can reference files as\n\n```\n  {% asset_img my_portrait.jpg %}\n  {% asset_link my_resume.pdf My Resume %}\n```\nIt generates\n\n```html\n  \u003cimg src=\"/2014/08/15/a-simple-self-introduction/my_portrait.jpg\"\u003e\n  \u003ca href=\"/2014/08/15/a-simple-self-introduction/my_resume.pdf\"\u003eMy Resume\u003c/a\u003e\n```\n\n### Syntax Detail\n\n```\n  {% asset_img [.class1.class2] file_name.png [width [height]] [\"caption\" [\"hint\"]] %}\n\n  {% asset_link [.class1.class2] file_name.png \"text\" [\"hint\"] %}\n```\n\n**class** (optional): Custom css classes in CSS falvor  \n*hint*: `.class1.class2` generates `class=\"class1 class2\"`\n\n**filename** (mandantory): The file name of the image\n\n**width** (optional): width, both `px` or `%` are accepted\n\n**height** (optional): height, both `px` or `%` are accepted  \n*hint*: `height` is only acceptable when `width` is avaiable\n\n**caption** (optional): The caption of the image.  \n*hint*: To avoid ambiguous value, always quote the text with space, `'` or `\"` are both accepted\n\n**text** (mandantory): The text of the `\u003ca\u003e`  \n*hint*: To avoid ambiguous value, always quote the text with space, `'` or `\"` are both accepted\n\n**hint** (optional): The text displayed when mouse hover  \n*hint*: To avoid ambiguous value, always quote the text with space, `'` or `\"` are both accepted\n\n## Asset Folder\n\nAsset folder can be created manually, it should have the same name as the post\n\nOr\n\nAsset folder can be created automatically when post is created.  \nAdjust the config in `_config.yml`:\n\n```yaml\npost_asset_folder: true\n```\n\n## Roadmap\n\n* [x] Custom classes\n* [x] Width, height for `Asset Image`\n* [x] Title and alt for `Asset Image`\n* [ ] `AssetImage` cascaded in `Asset Link`\n\n## License\nMIT\n\n[![NPM downloads][npm-downloads]][npm-url]\n\n[homepage]: https://github.com/timnew/hexo-tag-asset-res\n\n[npm-url]: https://npmjs.org/package/hexo-tag-asset-res\n[npm-image]: http://img.shields.io/npm/v/hexo-tag-asset-res.svg?style=flat\n[npm-downloads]: http://img.shields.io/npm/dm/hexo-tag-asset-res.svg?style=flat\n\n[depstat-url]: https://gemnasium.com/timnew/hexo-tag-asset-res\n[depstat-image]: http://img.shields.io/gemnasium/timnew/hexo-tag-asset-res.svg?style=flat\n\n[hexo-url]: http://hexo.io/\n[post asset]: http://hexo.io/docs/writing.html#Asset_Folder\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimnew%2Fhexo-tag-asset-res","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimnew%2Fhexo-tag-asset-res","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimnew%2Fhexo-tag-asset-res/lists"}