nuxt-og-image 4.0.0 → 4.0.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/LICENSE.md +9 -9
- package/README.md +75 -75
- package/dist/client/200.html +25 -22
- package/dist/client/404.html +25 -22
- package/dist/client/_nuxt/BCzYJAay.js +1 -0
- package/dist/client/_nuxt/{BeUwqJEY.js → BD9UVO-6.js} +1 -1
- package/dist/client/_nuxt/BIguuW30.js +1 -0
- package/dist/client/_nuxt/{0qbUsQ6_.js → BJGgnGWZ.js} +1 -1
- package/dist/client/_nuxt/BLhTXw86.js +1 -0
- package/dist/client/_nuxt/BZ3P6AVf.js +1 -0
- package/dist/client/_nuxt/{Csvi84BS.js → BnfnAR_u.js} +1 -1
- package/dist/client/_nuxt/Bu73EIfS.js +1 -0
- package/dist/client/_nuxt/C4Ro8ZjH.js +1 -0
- package/dist/client/_nuxt/C5-9kuJc.js +1 -0
- package/dist/client/_nuxt/CGXjegLJ.js +1 -0
- package/dist/client/_nuxt/CMnybHwx.js +1 -0
- package/dist/client/_nuxt/COcR7UxN.js +1 -0
- package/dist/client/_nuxt/C_wU0A-3.js +3834 -0
- package/dist/client/_nuxt/DL4Dju3v.js +1 -0
- package/dist/client/_nuxt/DdAYiE08.js +1 -0
- package/dist/client/_nuxt/{JJNjxVar.js → DhRVplvY.js} +1 -1
- package/dist/client/_nuxt/{DwSUWO6N.js → I3KQ5pkt.js} +1 -1
- package/dist/client/_nuxt/XF954dHc.js +1 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/a938c56b-6345-454a-9e52-026adcc92670.json +1 -0
- package/dist/client/_nuxt/entry.CpT28PgB.css +1 -0
- package/dist/client/_nuxt/error-404.DNn2eSPw.css +1 -0
- package/dist/client/_nuxt/error-500.B_Aslu6N.css +1 -0
- package/dist/client/index.html +25 -22
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +21 -16
- package/dist/runtime/app/components/Templates/Community/BrandedLogo.vue +29 -29
- package/dist/runtime/app/components/Templates/Community/Frame.vue +64 -64
- package/dist/runtime/app/components/Templates/Community/Nuxt.vue +185 -185
- package/dist/runtime/app/components/Templates/Community/NuxtSeo.vue +137 -137
- package/dist/runtime/app/components/Templates/Community/Pergel.vue +103 -103
- package/dist/runtime/app/components/Templates/Community/SimpleBlog.vue +35 -35
- package/dist/runtime/app/components/Templates/Community/UnJs.vue +108 -108
- package/dist/runtime/app/components/Templates/Community/Wave.vue +34 -34
- package/dist/runtime/app/components/Templates/Community/WithEmoji.vue +28 -28
- package/dist/runtime/app/composables/defineOgImage.js +20 -7
- package/dist/runtime/app/utils/plugins.js +5 -1
- package/dist/runtime/logger.d.ts +2 -0
- package/dist/runtime/logger.js +8 -0
- package/dist/runtime/server/og-image/context.d.ts +1 -1
- package/dist/runtime/server/og-image/context.js +38 -23
- package/dist/runtime/server/og-image/satori/plugins/imageSrc.js +16 -9
- package/dist/runtime/server/og-image/satori/plugins/unocss.js +2 -10
- package/dist/runtime/server/plugins/prerender.js +6 -1
- package/dist/runtime/server/routes/debug.json.js +1 -1
- package/dist/runtime/server/tsconfig.json +3 -3
- package/dist/runtime/server/util/logger.d.ts +1 -1
- package/dist/runtime/shared.js +13 -3
- package/dist/runtime/types.d.ts +8 -1
- package/package.json +36 -36
- package/virtual.d.ts +71 -71
- package/dist/client/_nuxt/B1Z2YEe0.js +0 -1
- package/dist/client/_nuxt/BHpzmqOf.js +0 -1
- package/dist/client/_nuxt/C6J8XiCD.js +0 -1
- package/dist/client/_nuxt/CLXkKSjS.js +0 -1
- package/dist/client/_nuxt/Ce3NjAxN.js +0 -3834
- package/dist/client/_nuxt/Cm25um3E.js +0 -1
- package/dist/client/_nuxt/Cmhojp3q.js +0 -1
- package/dist/client/_nuxt/Cv7ZOjGq.js +0 -1
- package/dist/client/_nuxt/D0xWnrgR.js +0 -1
- package/dist/client/_nuxt/D9W_gRNE.js +0 -1
- package/dist/client/_nuxt/DMFdBl0X.js +0 -1
- package/dist/client/_nuxt/builds/meta/f8cf0c2a-d2c2-44be-94c5-481b139589cf.json +0 -1
- package/dist/client/_nuxt/entry.CGZ3zn-m.css +0 -1
- package/dist/client/_nuxt/error-404.CSJ9Dkgh.css +0 -1
- package/dist/client/_nuxt/error-500.BJcKCN8F.css +0 -1
package/dist/client/index.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html><html data-capo=""><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
|
-
<link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.
|
|
4
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
3
|
+
<link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.CpT28PgB.css" crossorigin>
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/C_wU0A-3.js">
|
|
5
5
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BwpQXVS2.js">
|
|
6
6
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Ci-La1BS.js">
|
|
7
7
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DOAn35dn.js">
|
|
@@ -33,9 +33,12 @@
|
|
|
33
33
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BWkuYGGO.js">
|
|
34
34
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Bmb0A568.js">
|
|
35
35
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D8nBeWSR.js">
|
|
36
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Bu73EIfS.js">
|
|
37
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BLhTXw86.js">
|
|
36
38
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BhsLqr-4.js">
|
|
37
39
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CEjiMJLT.js">
|
|
38
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
40
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/XF954dHc.js">
|
|
41
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CK56Z9cH.js">
|
|
39
42
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CXmV_HiI.js">
|
|
40
43
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/mLcCfA0-.js">
|
|
41
44
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DbXoA79R.js">
|
|
@@ -44,7 +47,7 @@
|
|
|
44
47
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Bdprqoiu.js">
|
|
45
48
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Cv3cJnDV.js">
|
|
46
49
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CQO4gZEw.js">
|
|
47
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
50
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BCzYJAay.js">
|
|
48
51
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CcPoRNJz.js">
|
|
49
52
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DoiKbUTj.js">
|
|
50
53
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CbUnruJU.js">
|
|
@@ -55,11 +58,11 @@
|
|
|
55
58
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DmZ-uG0V.js">
|
|
56
59
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DfpIq38s.js">
|
|
57
60
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/B5L7zzq-.js">
|
|
58
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
61
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/C4Ro8ZjH.js">
|
|
59
62
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/yA8e6OR-.js">
|
|
60
63
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DEIpsLCJ.js">
|
|
61
64
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dnfm4U7b.js">
|
|
62
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
65
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/COcR7UxN.js">
|
|
63
66
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DQxx3LPD.js">
|
|
64
67
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BMwgFBEQ.js">
|
|
65
68
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Bv_sPlCv.js">
|
|
@@ -78,9 +81,9 @@
|
|
|
78
81
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/B3Z_eaxm.js">
|
|
79
82
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BaLI2h1d.js">
|
|
80
83
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CNXuF1yM.js">
|
|
81
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
84
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BJGgnGWZ.js">
|
|
82
85
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BSHf-0eb.js">
|
|
83
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
86
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BIguuW30.js">
|
|
84
87
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DJEtsjbi.js">
|
|
85
88
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/-30QC5Em.js">
|
|
86
89
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BSPpinrx.js">
|
|
@@ -89,7 +92,7 @@
|
|
|
89
92
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BhC5s0V7.js">
|
|
90
93
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DvA-6Bhw.js">
|
|
91
94
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CmWLV2bY.js">
|
|
92
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
95
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/C5-9kuJc.js">
|
|
93
96
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/ClV7KpCc.js">
|
|
94
97
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CM4fc1WH.js">
|
|
95
98
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DqpEK-75.js">
|
|
@@ -116,7 +119,6 @@
|
|
|
116
119
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CpRrwcwt.js">
|
|
117
120
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DlYXzDlu.js">
|
|
118
121
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DUdzsfxe.js">
|
|
119
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CK56Z9cH.js">
|
|
120
122
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Cqv5JV-q.js">
|
|
121
123
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BZRbnyjI.js">
|
|
122
124
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/plSVBvJQ.js">
|
|
@@ -124,16 +126,16 @@
|
|
|
124
126
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BJNXdUBN.js">
|
|
125
127
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/yLioyJ2E.js">
|
|
126
128
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dk1rBueR.js">
|
|
127
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
129
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DL4Dju3v.js">
|
|
128
130
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/B4_rEpOs.js">
|
|
129
131
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dtn98rcr.js">
|
|
130
132
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DepYB8Ml.js">
|
|
131
133
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DNDvMORL.js">
|
|
132
134
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CodIOJDM.js">
|
|
133
135
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Kxp7UmFj.js">
|
|
134
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
136
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CMnybHwx.js">
|
|
135
137
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Bcw97oti.js">
|
|
136
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
138
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BZ3P6AVf.js">
|
|
137
139
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BzaEo2Du.js">
|
|
138
140
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/B2bjgU-v.js">
|
|
139
141
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/EZUUsui8.js">
|
|
@@ -185,13 +187,14 @@
|
|
|
185
187
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D-RymO5g.js">
|
|
186
188
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/-ALZ4IvE.js">
|
|
187
189
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DwU8c_yx.js">
|
|
188
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
190
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DhRVplvY.js">
|
|
189
191
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D2TqM893.js">
|
|
190
192
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DFQ4Xr-4.js">
|
|
191
193
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DA0ESIWO.js">
|
|
194
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CGXjegLJ.js">
|
|
192
195
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CQjiPCtT.js">
|
|
193
196
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/NUI3YrRW.js">
|
|
194
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
197
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BnfnAR_u.js">
|
|
195
198
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/rf8nNrOk.js">
|
|
196
199
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Dwo6uFCY.js">
|
|
197
200
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Db-JQHi3.js">
|
|
@@ -249,7 +252,7 @@
|
|
|
249
252
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CafNBF8u.js">
|
|
250
253
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CTRr51gU.js">
|
|
251
254
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CQWsIgnU.js">
|
|
252
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
255
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DdAYiE08.js">
|
|
253
256
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Ddv68eIx.js">
|
|
254
257
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/GBQ2dnAY.js">
|
|
255
258
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/PoHY5YXO.js">
|
|
@@ -272,9 +275,9 @@
|
|
|
272
275
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CVO1_9PV.js">
|
|
273
276
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CG6Dc4jp.js">
|
|
274
277
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/B6E6ObS_.js">
|
|
275
|
-
<link rel="prefetch" as="style" crossorigin href="/__nuxt-og-image/_nuxt/error-404.
|
|
276
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
277
|
-
<link rel="prefetch" as="style" crossorigin href="/__nuxt-og-image/_nuxt/error-500.
|
|
278
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/
|
|
279
|
-
<script type="module" src="/__nuxt-og-image/_nuxt/
|
|
280
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"
|
|
278
|
+
<link rel="prefetch" as="style" crossorigin href="/__nuxt-og-image/_nuxt/error-404.DNn2eSPw.css">
|
|
279
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/I3KQ5pkt.js">
|
|
280
|
+
<link rel="prefetch" as="style" crossorigin href="/__nuxt-og-image/_nuxt/error-500.B_Aslu6N.css">
|
|
281
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BD9UVO-6.js">
|
|
282
|
+
<script type="module" src="/__nuxt-og-image/_nuxt/C_wU0A-3.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1734919528945,false]</script>
|
|
283
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"a938c56b-6345-454a-9e52-026adcc92670",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.d.mts
CHANGED
|
@@ -17,7 +17,7 @@ interface ModuleOptions {
|
|
|
17
17
|
*
|
|
18
18
|
* You can use this to change the default template, image sizing and more.
|
|
19
19
|
*
|
|
20
|
-
* @default { component: '
|
|
20
|
+
* @default { component: 'NuxtSeo', width: 1200, height: 630, cache: true, cacheTtl: 24 * 60 * 60 * 1000 }
|
|
21
21
|
*/
|
|
22
22
|
defaults: OgImageOptions;
|
|
23
23
|
/**
|
package/dist/module.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ interface ModuleOptions {
|
|
|
17
17
|
*
|
|
18
18
|
* You can use this to change the default template, image sizing and more.
|
|
19
19
|
*
|
|
20
|
-
* @default { component: '
|
|
20
|
+
* @default { component: 'NuxtSeo', width: 1200, height: 630, cache: true, cacheTtl: 24 * 60 * 60 * 1000 }
|
|
21
21
|
*/
|
|
22
22
|
defaults: OgImageOptions;
|
|
23
23
|
/**
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as fs from 'node:fs';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
4
|
-
import { useNuxt, tryResolveModule, addTemplate, resolvePath, loadNuxtModuleInstance, createResolver, defineNuxtModule,
|
|
4
|
+
import { useNuxt, tryResolveModule, addTemplate, resolvePath, loadNuxtModuleInstance, createResolver, defineNuxtModule, addImports, addBuildPlugin, hasNuxtModule, addServerPlugin, addServerHandler, addComponentsDir, addComponent, addPlugin } from '@nuxt/kit';
|
|
5
5
|
import { defu } from 'defu';
|
|
6
6
|
import { installNuxtSiteConfig } from 'nuxt-site-config/kit';
|
|
7
7
|
import { hash } from 'ohash';
|
|
@@ -19,6 +19,7 @@ import { pathToFileURL } from 'node:url';
|
|
|
19
19
|
import MagicString from 'magic-string';
|
|
20
20
|
import { stripLiteral } from 'strip-literal';
|
|
21
21
|
import { createUnplugin } from 'unplugin';
|
|
22
|
+
import { logger } from '../dist/runtime/logger.js';
|
|
22
23
|
import { Launcher } from 'chrome-launcher';
|
|
23
24
|
import { $fetch } from 'ofetch';
|
|
24
25
|
|
|
@@ -205,6 +206,7 @@ async function setupBuildHandler(config, resolve, nuxt = useNuxt()) {
|
|
|
205
206
|
nitroConfig.alias.bufferutil = "unenv/runtime/mock/proxy-cjs";
|
|
206
207
|
nitroConfig.alias["utf-8-validate"] = "unenv/runtime/mock/proxy-cjs";
|
|
207
208
|
nitroConfig.alias.queue = "unenv/runtime/mock/proxy-cjs";
|
|
209
|
+
nitroConfig.alias["chromium-bidi"] = "unenv/runtime/mock/proxy-cjs";
|
|
208
210
|
});
|
|
209
211
|
nuxt.hooks.hook("nitro:init", async (nitro) => {
|
|
210
212
|
const target = resolveNitroPreset(nitro.options);
|
|
@@ -544,13 +546,12 @@ const module = defineNuxtModule({
|
|
|
544
546
|
},
|
|
545
547
|
async setup(config, nuxt) {
|
|
546
548
|
const { resolve } = createResolver(import.meta.url);
|
|
547
|
-
const {
|
|
548
|
-
const logger = useLogger(name);
|
|
549
|
+
const { version } = await readPackageJSON(resolve("../package.json"));
|
|
549
550
|
logger.level = config.debug || nuxt.options.debug ? 4 : 3;
|
|
550
551
|
if (config.enabled === false) {
|
|
551
552
|
logger.debug("The module is disabled, skipping setup.");
|
|
552
|
-
["defineOgImage", "defineOgImageComponent", "defineOgImageScreenshot"].forEach((
|
|
553
|
-
addImports({ name
|
|
553
|
+
["defineOgImage", "defineOgImageComponent", "defineOgImageScreenshot"].forEach((name) => {
|
|
554
|
+
addImports({ name, from: resolve(`./runtime/app/composables/mock`) });
|
|
554
555
|
});
|
|
555
556
|
return;
|
|
556
557
|
}
|
|
@@ -723,13 +724,17 @@ const module = defineNuxtModule({
|
|
|
723
724
|
route: "/__og-image__/static/**",
|
|
724
725
|
handler: resolve(`${basePath}/image`)
|
|
725
726
|
});
|
|
726
|
-
nuxt.options.
|
|
727
|
-
|
|
727
|
+
if (!nuxt.options.dev) {
|
|
728
|
+
nuxt.options.optimization.treeShake.composables.client["nuxt-og-image"] = [];
|
|
729
|
+
}
|
|
730
|
+
["defineOgImage", "defineOgImageComponent", "defineOgImageScreenshot"].forEach((name) => {
|
|
728
731
|
addImports({
|
|
729
|
-
name
|
|
730
|
-
from: resolve(`./runtime/app/composables/${
|
|
732
|
+
name,
|
|
733
|
+
from: resolve(`./runtime/app/composables/${name}`)
|
|
731
734
|
});
|
|
732
|
-
nuxt.options.
|
|
735
|
+
if (!nuxt.options.dev) {
|
|
736
|
+
nuxt.options.optimization.treeShake.composables.client["nuxt-og-image"].push(name);
|
|
737
|
+
}
|
|
733
738
|
});
|
|
734
739
|
if (!config.zeroRuntime || nuxt.options.dev) {
|
|
735
740
|
await addComponentsDir({
|
|
@@ -742,10 +747,10 @@ const module = defineNuxtModule({
|
|
|
742
747
|
// new
|
|
743
748
|
"OgImage",
|
|
744
749
|
"OgImageScreenshot"
|
|
745
|
-
].forEach((
|
|
750
|
+
].forEach((name) => {
|
|
746
751
|
addComponent({
|
|
747
|
-
name
|
|
748
|
-
filePath: resolve(`./runtime/app/components/OgImage/${
|
|
752
|
+
name,
|
|
753
|
+
filePath: resolve(`./runtime/app/components/OgImage/${name}`),
|
|
749
754
|
...config.componentOptions
|
|
750
755
|
});
|
|
751
756
|
});
|
|
@@ -809,10 +814,10 @@ const module = defineNuxtModule({
|
|
|
809
814
|
extendTypes("nuxt-og-image", ({ typesPath }) => {
|
|
810
815
|
const componentImports = ogImageComponentCtx.components.map((component) => {
|
|
811
816
|
const relativeComponentPath = relative$1(resolve(nuxt.options.rootDir, nuxt.options.buildDir, "module"), component.path);
|
|
812
|
-
const
|
|
813
|
-
return
|
|
817
|
+
const name = config.componentDirs.sort((a, b) => b.length - a.length).reduce((name2, dir) => {
|
|
818
|
+
return name2.replace(new RegExp(`^${dir}`), "");
|
|
814
819
|
}, component.pascalName);
|
|
815
|
-
return ` '${
|
|
820
|
+
return ` '${name}': typeof import('${relativeComponentPath}')['default']`;
|
|
816
821
|
}).join("\n");
|
|
817
822
|
return `
|
|
818
823
|
declare module 'nitropack' {
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* @credits Full Stack Heroes <https://fullstackheroes.com/>
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
withDefaults(defineProps<{
|
|
7
|
-
title?: string
|
|
8
|
-
logo?: string
|
|
9
|
-
}>(), {
|
|
10
|
-
title: 'title',
|
|
11
|
-
logo: 'https://nuxt.com/assets/design-kit/logo-white.png',
|
|
12
|
-
})
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<div
|
|
17
|
-
:style="{ backgroundImage: 'linear-gradient(to right, #24243e, #302b63, #0f0c29)' }"
|
|
18
|
-
class="h-full w-full flex items-start justify-start"
|
|
19
|
-
>
|
|
20
|
-
<div class="flex items-start justify-start h-full">
|
|
21
|
-
<div class="flex flex-col justify-between w-full h-full p-20">
|
|
22
|
-
<img :src="logo" height="50">
|
|
23
|
-
<h1 class="text-[60px] text-white font-bold text-left">
|
|
24
|
-
{{ title }}
|
|
25
|
-
</h1>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* @credits Full Stack Heroes <https://fullstackheroes.com/>
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
withDefaults(defineProps<{
|
|
7
|
+
title?: string
|
|
8
|
+
logo?: string
|
|
9
|
+
}>(), {
|
|
10
|
+
title: 'title',
|
|
11
|
+
logo: 'https://nuxt.com/assets/design-kit/logo-white.png',
|
|
12
|
+
})
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div
|
|
17
|
+
:style="{ backgroundImage: 'linear-gradient(to right, #24243e, #302b63, #0f0c29)' }"
|
|
18
|
+
class="h-full w-full flex items-start justify-start"
|
|
19
|
+
>
|
|
20
|
+
<div class="flex items-start justify-start h-full">
|
|
21
|
+
<div class="flex flex-col justify-between w-full h-full p-20">
|
|
22
|
+
<img :src="logo" height="50">
|
|
23
|
+
<h1 class="text-[60px] text-white font-bold text-left">
|
|
24
|
+
{{ title }}
|
|
25
|
+
</h1>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* @credits @arashsheyda <https://github.com/arashsheyda>
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
withDefaults(defineProps<{
|
|
7
|
-
title?: string
|
|
8
|
-
description?: string
|
|
9
|
-
bg?: string
|
|
10
|
-
icon?: string
|
|
11
|
-
logo?: string
|
|
12
|
-
image?: string
|
|
13
|
-
username?: string
|
|
14
|
-
socials?: { name: string, icon: string }[]
|
|
15
|
-
}>(), {
|
|
16
|
-
bg: 'linear-gradient(to bottom right, #171717, #131313)',
|
|
17
|
-
})
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<template>
|
|
21
|
-
<div
|
|
22
|
-
class="relative h-full w-full flex items-center justify-center bg-neutral-900 text-white border-2 border-white"
|
|
23
|
-
:style="{ backgroundImage: bg }"
|
|
24
|
-
>
|
|
25
|
-
<div
|
|
26
|
-
v-if="image"
|
|
27
|
-
class="absolute inset-0 w-full h-full bg-center opacity-10"
|
|
28
|
-
:style="{ backgroundImage: `url(${image})` }"
|
|
29
|
-
/>
|
|
30
|
-
<div class="flex flex-col items-center text-center">
|
|
31
|
-
<h1 class="flex gap-4 text-7xl font-bold">
|
|
32
|
-
<Icon
|
|
33
|
-
v-if="icon"
|
|
34
|
-
:name="icon"
|
|
35
|
-
/>
|
|
36
|
-
{{ title }}
|
|
37
|
-
</h1>
|
|
38
|
-
<p class="text-2xl max-w-3xl">
|
|
39
|
-
{{ description }}
|
|
40
|
-
</p>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
<img
|
|
44
|
-
v-if="logo"
|
|
45
|
-
:src="logo"
|
|
46
|
-
class="absolute bottom-0 left-0 p-5"
|
|
47
|
-
style="height: 125px; width: 153px;"
|
|
48
|
-
>
|
|
49
|
-
<div class="absolute bottom-5 right-5 flex gap-4">
|
|
50
|
-
<div
|
|
51
|
-
v-if="username"
|
|
52
|
-
class="absolute bottom-12 right-8 font-bold"
|
|
53
|
-
>
|
|
54
|
-
{{ username }}
|
|
55
|
-
</div>
|
|
56
|
-
<Icon
|
|
57
|
-
v-for="social of socials"
|
|
58
|
-
:key="social.name"
|
|
59
|
-
:name="social.icon!"
|
|
60
|
-
class="w-7 h-7"
|
|
61
|
-
/>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* @credits @arashsheyda <https://github.com/arashsheyda>
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
withDefaults(defineProps<{
|
|
7
|
+
title?: string
|
|
8
|
+
description?: string
|
|
9
|
+
bg?: string
|
|
10
|
+
icon?: string
|
|
11
|
+
logo?: string
|
|
12
|
+
image?: string
|
|
13
|
+
username?: string
|
|
14
|
+
socials?: { name: string, icon: string }[]
|
|
15
|
+
}>(), {
|
|
16
|
+
bg: 'linear-gradient(to bottom right, #171717, #131313)',
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div
|
|
22
|
+
class="relative h-full w-full flex items-center justify-center bg-neutral-900 text-white border-2 border-white"
|
|
23
|
+
:style="{ backgroundImage: bg }"
|
|
24
|
+
>
|
|
25
|
+
<div
|
|
26
|
+
v-if="image"
|
|
27
|
+
class="absolute inset-0 w-full h-full bg-center opacity-10"
|
|
28
|
+
:style="{ backgroundImage: `url(${image})` }"
|
|
29
|
+
/>
|
|
30
|
+
<div class="flex flex-col items-center text-center">
|
|
31
|
+
<h1 class="flex gap-4 text-7xl font-bold">
|
|
32
|
+
<Icon
|
|
33
|
+
v-if="icon"
|
|
34
|
+
:name="icon"
|
|
35
|
+
/>
|
|
36
|
+
{{ title }}
|
|
37
|
+
</h1>
|
|
38
|
+
<p class="text-2xl max-w-3xl">
|
|
39
|
+
{{ description }}
|
|
40
|
+
</p>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<img
|
|
44
|
+
v-if="logo"
|
|
45
|
+
:src="logo"
|
|
46
|
+
class="absolute bottom-0 left-0 p-5"
|
|
47
|
+
style="height: 125px; width: 153px;"
|
|
48
|
+
>
|
|
49
|
+
<div class="absolute bottom-5 right-5 flex gap-4">
|
|
50
|
+
<div
|
|
51
|
+
v-if="username"
|
|
52
|
+
class="absolute bottom-12 right-8 font-bold"
|
|
53
|
+
>
|
|
54
|
+
{{ username }}
|
|
55
|
+
</div>
|
|
56
|
+
<Icon
|
|
57
|
+
v-for="social of socials"
|
|
58
|
+
:key="social.name"
|
|
59
|
+
:name="social.icon!"
|
|
60
|
+
class="w-7 h-7"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|