Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the current rendering HTTP path in the _renderer.tsx #132

Closed
p1ass opened this issue Apr 2, 2024 · 0 comments · Fixed by honojs/hono#2459
Closed

Get the current rendering HTTP path in the _renderer.tsx #132

p1ass opened this issue Apr 2, 2024 · 0 comments · Fixed by honojs/hono#2459
Labels
enhancement New feature or request

Comments

@p1ass
Copy link

p1ass commented Apr 2, 2024

What is the feature you are proposing?

I would like to get the current rendering HTTP path in the _renderer.tsx.

In my use case, the OGP metadata is set in the renderer.
However, there is no easy way to get the HTTP path to set the og:url property.

Sample Code

export default jsxRenderer(({ children }) => {
    return (
      <html lang='ja'>
        <head>
          <meta charset='utf-8' />
          <meta property='og:url' content='???' // this url changes dynamically for each path
          />
      // ....
    )
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant