Skip to content

Commit

Permalink
fix: hash for route name, allow caching
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Dec 16, 2022
1 parent 402530c commit c78d7f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ declare module 'nitropack' {

// check if the route path is not for a file
const screenshotPath = ctx._contents.match(new RegExp(`<link id="${LinkPrerenderId}" rel="prerender" href="(.*?)">`))?.[1]
const fileName = `${hash({ route: ctx.route, time: Date.now() })}.png`
const fileName = `${hash({ route: ctx.route })}.png`
const absoluteUrl = withBase(`${config.outputDir}/${fileName}`, config.host)
const entry: OgImageRouteEntry = {
fileName,
Expand Down

0 comments on commit c78d7f0

Please sign in to comment.