@flyo/nitro-astro 1.3.4 → 1.4.0

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.
@@ -0,0 +1,33 @@
1
+ ---
2
+ const { title, image, description, jsonld } = Astro.props;
3
+ const jsonLdString = jsonld ? JSON.stringify(jsonld) : null;
4
+ ---
5
+
6
+ <!-- Title Meta Tags -->
7
+ {title && (
8
+ <meta name="title" content={title} />
9
+ <meta property="og:title" content={title} />
10
+ <meta name="twitter:title" content={title} />
11
+ )}
12
+
13
+ <!-- Description Meta Tags -->
14
+ {description && (
15
+ <meta name="description" content={description} />
16
+ <meta property="og:description" content={description} />
17
+ <meta name="twitter:description" content={description} />
18
+ )}
19
+
20
+ <!-- Image Meta Tags -->
21
+ {image && (
22
+ <meta name="image" content={image} />
23
+ <meta property="og:image" content={image} />
24
+ <meta name="twitter:image" content={image} />
25
+ )}
26
+
27
+ <!-- Other Meta Tags -->
28
+ <meta property="og:type" content="website" />
29
+ <meta name="twitter:card" content="summary_large_image" />
30
+
31
+ {jsonLdString && (
32
+ <script type="application/ld+json" set:html={ jsonLdString } />
33
+ )}
@@ -0,0 +1,2 @@
1
+ import MetaInfo from "./MetaInfo.astro";
2
+ export default MetaInfo;
@@ -0,0 +1,13 @@
1
+ ---
2
+ import { Entity } from '@flyo/nitro-typescript';
3
+ import MetaInfo from './MetaInfo.astro';
4
+
5
+
6
+ interface Props {
7
+ response: Entity;
8
+ }
9
+
10
+ const { response } = Astro.props
11
+
12
+ ---
13
+ <MetaInfo title={response.entity?.entity_title} description={response.entity?.entity_teaser} image={response.entity?.entity_image} jsonld={response.jsonld} />
@@ -0,0 +1,2 @@
1
+ import MetaInfoEntity from "./MetaInfoEntity.astro";
2
+ export default MetaInfoEntity;
@@ -0,0 +1,13 @@
1
+ ---
2
+ import { Page } from '@flyo/nitro-typescript';
3
+ import MetaInfo from './MetaInfo.astro';
4
+
5
+
6
+ interface Props {
7
+ page: Page;
8
+ }
9
+
10
+ const { page } = Astro.props
11
+
12
+ ---
13
+ <MetaInfo title={page.meta_json?.title} description={page.meta_json?.description} image={page.meta_json?.image}/>
@@ -0,0 +1,2 @@
1
+ import MetaInfoPage from "./MetaInfoPage.astro";
2
+ export default MetaInfoPage;
@@ -0,0 +1,2 @@
1
+ import MetaInfo from "./MetaInfo.astro";
2
+ export default MetaInfo;
@@ -0,0 +1,2 @@
1
+ import MetaInfoEntity from "./MetaInfoEntity.astro";
2
+ export default MetaInfoEntity;
@@ -0,0 +1,2 @@
1
+ import MetaInfoPage from "./MetaInfoPage.astro";
2
+ export default MetaInfoPage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flyo/nitro-astro",
3
- "version": "1.3.4",
3
+ "version": "1.4.0",
4
4
  "description": "Astro Framework",
5
5
  "main": "./dist/nitro-astro.js",
6
6
  "module": "./dist/nitro-astro.mjs",
@@ -30,6 +30,21 @@
30
30
  "import": "./components/BlockSlot.ts",
31
31
  "require": "./components/BlockSlot.ts"
32
32
  },
33
+ "./MetaInfo.astro": {
34
+ "types": "./components/MetaInfo.ts",
35
+ "import": "./components/MetaInfo.ts",
36
+ "require": "./components/MetaInfo.ts"
37
+ },
38
+ "./MetaInfoEntity.astro": {
39
+ "types": "./components/MetaInfoEntity.ts",
40
+ "import": "./components/MetaInfoEntity.ts",
41
+ "require": "./components/MetaInfoEntity.ts"
42
+ },
43
+ "./MetaInfoPage.astro": {
44
+ "types": "./components/MetaInfoPage.ts",
45
+ "import": "./components/MetaInfoPage.ts",
46
+ "require": "./components/MetaInfoPage.ts"
47
+ },
33
48
  "./sitemap.ts": "./sitemap.ts",
34
49
  "./cdn.ts": "./cdn.ts"
35
50
  },
@@ -49,10 +64,10 @@
49
64
  "build": "vite build"
50
65
  },
51
66
  "devDependencies": {
52
- "astro": "^4.1.3",
67
+ "astro": "^4.2.4",
53
68
  "typescript": "5.3.3",
54
- "vite": "^5.0.11",
55
- "vite-plugin-dts": "^3.7.1"
69
+ "vite": "^5.0.12",
70
+ "vite-plugin-dts": "^3.7.2"
56
71
  },
57
72
  "repository": {
58
73
  "type": "git",