astro-link-card 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -79,12 +79,9 @@ import linkCard from "astro-link-card";
79
79
  export default defineConfig({
80
80
  // ... other config
81
81
  integrations: [
82
- [
83
- linkCard,
84
- {
85
- // Options
86
- }
87
- ]
82
+ linkCard({
83
+ // options
84
+ })
88
85
  ]
89
86
  });
90
87
  ```
@@ -95,6 +92,6 @@ All rehype-og-card options are supported. You can find the full list of options
95
92
 
96
93
  - `enableSameTextURLConversion` (default: `true`): Enable conversion of links that have the same URL and text. This is useful for projects that have `markdown.gfm` enabled.
97
94
  - `serverCache` (default: `true`): Enable server-side image caching.
98
- - `serverCachePath` (default: `config.publicDir`): Path to store server-side image cache.
95
+ - `serverCachePath` (default: `"./public"`): Path to store server-side image cache.
99
96
  - `buildCache` (default: `true`): Enable build cache for images and Open Graph metadata.
100
- - `buildCachePath` (default: `config.cacheDir`): Path to store build cache.
97
+ - `buildCachePath` (default: `"./node_modules/.astro"`): Path to store build cache.
package/dist/index.js CHANGED
@@ -10,13 +10,13 @@ const astroLinkCard = (options) => {
10
10
  const integration = {
11
11
  hooks: {
12
12
  // eslint-disable-next-line jsdoc/require-jsdoc
13
- "astro:config:setup": ({ config, updateConfig }) => {
13
+ "astro:config:setup": ({ updateConfig }) => {
14
14
  const defaultOptions = {
15
15
  buildCache: true,
16
- buildCachePath: config.cacheDir.pathname,
16
+ buildCachePath: "./node_modules/.astro",
17
17
  enableSameTextURLConversion: true,
18
18
  serverCache: true,
19
- serverCachePath: config.publicDir.pathname
19
+ serverCachePath: "./public"
20
20
  };
21
21
  const mergedOptions = {
22
22
  ...defaultOptions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-link-card",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Astro integration to automatically convert bare links into link cards.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -46,6 +46,6 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "astro": "^4.12.3",
49
- "rehype-og-card": "^0.4.3"
49
+ "rehype-og-card": "^1.0.0"
50
50
  }
51
51
  }