{"id":14959295,"url":"https://github.com/robot-inventor/astro-link-card","last_synced_at":"2026-03-01T11:18:00.701Z","repository":{"id":251000203,"uuid":"836104957","full_name":"Robot-Inventor/astro-link-card","owner":"Robot-Inventor","description":"Astro integration to automatically convert bare links into link cards.","archived":false,"fork":false,"pushed_at":"2025-04-23T10:50:19.000Z","size":623,"stargazers_count":13,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-26T09:43:42.350Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Robot-Inventor.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,"zenodo":null}},"created_at":"2024-07-31T06:54:47.000Z","updated_at":"2025-04-14T15:46:57.000Z","dependencies_parsed_at":"2024-11-06T19:31:39.669Z","dependency_job_id":"b5971969-1eeb-4f9b-b8bf-ad9587c6436c","html_url":"https://github.com/Robot-Inventor/astro-link-card","commit_stats":{"total_commits":109,"total_committers":5,"mean_commits":21.8,"dds":0.4128440366972477,"last_synced_commit":"4acc3ba5dc456e01d6183e57cc82471c1dc81ac9"},"previous_names":["robot-inventor/astro-link-card"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fastro-link-card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fastro-link-card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fastro-link-card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fastro-link-card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Robot-Inventor","download_url":"https://codeload.github.com/Robot-Inventor/astro-link-card/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252038232,"owners_count":21684657,"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-09-24T13:19:21.636Z","updated_at":"2026-02-05T09:05:41.712Z","avatar_url":"https://github.com/Robot-Inventor.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# astro-link-card\n\nAstro integration to automatically convert bare links into link cards. This is a wrapper for [rehype-og-card](https://github.com/Robot-Inventor/rehype-og-card) with some configuration optimizations for Astro.\n\n## Features\n\nThis integration will automatically convert bare links into link cards. This is useful for creating a more visually appealing website with link previews. Here are some key features:\n\n- Automatically convert bare links into link cards\n- Server-side image caching\n- Build cache for images and Open Graph metadata for faster builds\n- Lazy loading and async decoding for images\n- Zero runtime JavaScript (all processing is done at build time)\n\nThe following links will be converted to link cards:\n\n- Bare links\n- Links that have the same URL and text (if you enable the `enableSameTextURLConversion` option)\n\nThe following links will NOT be converted to link cards:\n\n- Links in lists\n- Links in code blocks\n- Links in sentences\n- Non-bare links\n- Links that have the same URL and text (if you disable the enableSameTextURLConversion option)\n\nInput:\n\n```markdown\nthis is a link: https://blog.google/products/android/world-emoji-day-2024/\n\n`https://blog.google/products/android/world-emoji-day-2024/`\n\nhttps://blog.google/products/android/world-emoji-day-2024/\n```\n\nOutput (formatted for readability):\n\n```html\n\u003cp\u003ethis is a link: https://blog.google/products/android/world-emoji-day-2024/\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003ehttps://blog.google/products/android/world-emoji-day-2024/\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003e\u003cdiv class=\"og-card-container\"\u003e\n    \u003ca href=\"https://blog.google/products/android/world-emoji-day-2024/\"\u003e\n        \u003cdiv class=\"og-card-info\"\u003e\n            \u003cdiv class=\"og-card-title\"\u003e10 fun facts about emoji for World Emoji Day\u003c/div\u003e\n            \u003cdiv class=\"og-card-description\"\u003eCelebrate World Emoji Day with Google, and check out what’s new for Emoji Kitchen.\u003c/div\u003e\n            \u003cdiv class=\"og-card-url-container\"\u003e\n                \u003cimg class=\"og-card-favicon\" alt=\"favicon\" decoding=\"async\" height=\"16\" loading=\"lazy\" src=\"https://www.google.com/s2/favicons?domain=blog.google\" width=\"16\"\u003e\n                \u003cspan class=\"og-card-url\"\u003eblog.google\u003c/span\u003e\n            \u003c/div\u003e\n        \u003c/div\u003e\n        \u003cdiv class=\"og-card-image-container\"\u003e\n            \u003cimg class=\"og-card-image\" alt=\"https://storage.googleapis.com/gweb-uniblog-publish-prod/images/world_emoji_day_v2_1.width-1300.png\" decoding=\"async\" loading=\"lazy\" src=\"https://storage.googleapis.com/gweb-uniblog-publish-prod/images/world_emoji_day_v2_1.width-1300.png\"\u003e\n        \u003c/div\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\u003c/p\u003e\n```\n\n## Installation\n\n### `astro add` command (Recommended)\n\n```bash\nnpx astro add astro-link-card\n```\n\n### Manual Installation (Alternative)\n\n```bash\nnpm install astro-link-card\n```\n\n```typescript\nimport { defineConfig } from \"astro\";\nimport linkCard from \"astro-link-card\";\n\n// https://astro.build/config\nexport default defineConfig({\n    // ... other config\n    integrations: [\n        linkCard({\n            // options\n        })\n    ]\n});\n```\n\n## Options\n\nAll rehype-og-card options are supported. You can find the full list of options [here](https://github.com/Robot-Inventor/rehype-og-card?tab=readme-ov-file#options). Some options below are optimized for Astro:\n\n- `enableSameTextURLConversion` (default: `true`): Enable conversion of links that have the same URL and text. This is useful for projects that have `markdown.gfm` enabled.\n- `serverCache` (default: `true`): Enable server-side image caching.\n- `serverCachePath` (default: `\"./public\"`): Path to store server-side image cache.\n- `buildCache` (default: `true`): Enable build cache for images and Open Graph metadata.\n- `buildCachePath` (default: `\"./node_modules/.astro\"`): Path to store build cache.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobot-inventor%2Fastro-link-card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobot-inventor%2Fastro-link-card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobot-inventor%2Fastro-link-card/lists"}