@flyo/nitro-astro 2.3.3 → 2.3.5
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 +2 -0
- package/components/DebugInfo.astro +1 -1
- package/components/MetaInfo.astro +6 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -343,6 +343,8 @@ import MetaInfo from "@flyo/nitro-astro/MetaInfo.astro";
|
|
|
343
343
|
/>
|
|
344
344
|
```
|
|
345
345
|
|
|
346
|
+
> The image must be a flyo cdn url and will be automatically transformed to the correct format (1200x600 jpg)
|
|
347
|
+
|
|
346
348
|
#### `MetaInfoPage`
|
|
347
349
|
|
|
348
350
|
Specialized meta component for Flyo pages.
|
|
@@ -26,7 +26,7 @@ const mode = readEnv("MODE", "-");
|
|
|
26
26
|
const vercelDeploymentId = readEnv("VERCEL_DEPLOYMENT_ID", "-");
|
|
27
27
|
|
|
28
28
|
// prefer your own sha, otherwise Vercel's
|
|
29
|
-
const
|
|
29
|
+
const vercelGitCommitSha = readEnv("VERCEL_GIT_COMMIT_SHA", "-");
|
|
30
30
|
|
|
31
31
|
// prefer your own release/version, otherwise empty
|
|
32
32
|
const version = readEnv("VERSION", "");
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
const { title, image, description, jsonld } = Astro.props;
|
|
3
3
|
const jsonLdString = jsonld ? JSON.stringify(jsonld) : null;
|
|
4
|
+
|
|
5
|
+
// Transform image to 1200x600 jpg for optimal social media display
|
|
6
|
+
const transformedImage = `${image}/thumb/1200x600?format=jpg`
|
|
4
7
|
---
|
|
5
8
|
|
|
6
9
|
{
|
|
@@ -24,9 +27,9 @@ const jsonLdString = jsonld ? JSON.stringify(jsonld) : null;
|
|
|
24
27
|
{
|
|
25
28
|
image && (
|
|
26
29
|
<>
|
|
27
|
-
<meta name="image" content={
|
|
28
|
-
<meta property="og:image" content={
|
|
29
|
-
<meta name="twitter:image" content={
|
|
30
|
+
<meta name="image" content={transformedImage} />
|
|
31
|
+
<meta property="og:image" content={transformedImage} />
|
|
32
|
+
<meta name="twitter:image" content={transformedImage} />
|
|
30
33
|
</>
|
|
31
34
|
)
|
|
32
35
|
}
|