{"id":15486096,"url":"https://github.com/khalidsheet/nuxt-link-preview","last_synced_at":"2026-03-11T14:09:26.285Z","repository":{"id":65420793,"uuid":"591357414","full_name":"khalidsheet/nuxt-link-preview","owner":"khalidsheet","description":"Link Preview for Nuxt App","archived":false,"fork":false,"pushed_at":"2023-01-22T19:23:41.000Z","size":225,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-17T22:14:51.389Z","etag":null,"topics":["link","links","module","nuxt","nuxt3","nuxtjs","preview"],"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/khalidsheet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-20T15:03:54.000Z","updated_at":"2024-12-16T12:23:51.000Z","dependencies_parsed_at":"2023-02-12T17:45:33.018Z","dependency_job_id":null,"html_url":"https://github.com/khalidsheet/nuxt-link-preview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/khalidsheet/nuxt-link-preview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidsheet%2Fnuxt-link-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidsheet%2Fnuxt-link-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidsheet%2Fnuxt-link-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidsheet%2Fnuxt-link-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khalidsheet","download_url":"https://codeload.github.com/khalidsheet/nuxt-link-preview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidsheet%2Fnuxt-link-preview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30383344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T13:58:07.161Z","status":"ssl_error","status_checked_at":"2026-03-11T13:58:06.476Z","response_time":84,"last_error":"SSL_read: 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":["link","links","module","nuxt","nuxt3","nuxtjs","preview"],"created_at":"2024-10-02T06:06:27.579Z","updated_at":"2026-03-11T14:09:26.257Z","avatar_url":"https://github.com/khalidsheet.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nuxt3 Link Preview\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=flat\u0026logo=typescript\u0026logoColor=white) ![npm bundle size](https://img.shields.io/bundlephobia/min/nuxt-link-preview)\n\nA Nuxt.js 3.x module for previewing links using the Composition API.\n\n## Installation\n1. Add the module to your Nuxt.js project:\n```bash\nnpm install --save nuxt-link-preview\n```\n2. Add nuxt-link-preview to the modules section of your nuxt.config.js file:\n```typescript\nmodules: [\n  'nuxt-link-preview'\n],\n```\n\n## Types\n```ts\ninterface Preview {\n    title: string,\n    description: string,\n    image: string,\n    url: string,\n    meta: Meta[]\n}\n\ninterface Meta {\n        name: string;\n        value: string\n}\n```\n\n## Usage\nIn your project, you may create a new api endpoint inside `/server/api` called `preview.ts` or `preview.get.ts`\n\n```typescript\nexport default defineEventHandler(async (event) =\u003e {\n  const body = getQuery(event);\n  const preview = await useLinkPreview(\u003cstring\u003ebody.url);\n  return { preview };\n});\n```\n\n## API\n`useLinkPreview(url: string): Preview`\n\nFetches link preview data for the given url. Returns an object of the Preview interface with the following properties:\n\n* `title` The title of the page\n* `description` A short descriprion of the page\n* `image` A URL to the main image of the page\n* `url` The URL of the page\n* `meta` The whole meta tags inside `\u003chead\u003e` tag\n\n\n## Development\n\n- Run `npm run dev:prepare` to generate type stubs.\n- Use `npm run dev` to start [playground](./playground) in development mode.\n\n\n## Contributing\n1. Fork the Repo\n2. Create your feature/bugfix branch (git checkout -b my-branch)\n3. Commit your changes (git commit -am \"Add/fixed something somewhere\")\n4. Push to the branch (git push origin my-branch)\n5. Create new Pull Request\n\n## License\nThe project is licensed under the MIT License -- see the [LICENSE](https://opensource.org/licenses/MIT) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalidsheet%2Fnuxt-link-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhalidsheet%2Fnuxt-link-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalidsheet%2Fnuxt-link-preview/lists"}