Skip to content

Commit c121cab

Browse files
committed
chore: fix html render
1 parent 4f9d017 commit c121cab

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/runtime/nitro/og-image/templates/html.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { createError } from 'h3'
44
import type { FontConfig, OgImageRenderEventContext } from '../../../types'
55
import { normaliseFontInput, useOgImageRuntimeConfig } from '../../../shared'
66
import { fetchIsland } from '../../util/kit'
7-
import { applyEmojis } from '~/src/runtime/nitro/og-image/satori/transforms/emojis'
7+
import { applyEmojis } from '../satori/transforms/emojis'
88
import { theme } from '#nuxt-og-image/unocss-config.mjs'
99

1010
export async function html(ctx: OgImageRenderEventContext) {

src/runtime/nitro/routes/image.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { H3Error, createError, defineEventHandler, getQuery, setHeader } from 'h
22
import { useOgImageBufferCache } from '../util/cache'
33
import { useOgImageRuntimeConfig } from '../../shared'
44
import { resolveContext } from '../og-image/context'
5+
import { html } from '../og-image/templates/html'
56

67
// /__og-image__/image/<path>/og.<extension
78
export default defineEventHandler(async (e): Promise<any> => {
@@ -36,7 +37,7 @@ export default defineEventHandler(async (e): Promise<any> => {
3637
setHeader(e, 'Content-Type', `text/html`)
3738
// if the user is loading the iframe we need to render a nicer template
3839
// also used for chromium screenshots
39-
return devIframeTemplate(ctx)
40+
return html(ctx)
4041
case 'svg':
4142
if (!debug && !import.meta.dev) {
4243
return createError({

0 commit comments

Comments
 (0)