Skip to content

Feature request: wildcard support for path-based OG images #280

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

Open
gskril opened this issue Mar 31, 2025 · 0 comments
Open

Feature request: wildcard support for path-based OG images #280

gskril opened this issue Mar 31, 2025 · 0 comments

Comments

@gskril
Copy link

gskril commented Mar 31, 2025

The below example from the docs works well if everything is in a /docs directory, but in practice it seems weird to require that all pages be under a directory. For example, ENS has https://docs.ens.domains/faq

import { defineConfig } from 'vocs'
 
export default defineConfig({
  ogImageUrl: { 
    '/': 'https://vocs.dev/og-image.png', 
    '/docs': 'https://vocs.dev/api/og?logo=%logo&title=%title&description=%description', 
  }, 
  title: 'Viem'
})

An ideal solution would allow for something like this:

export default defineConfig({
  ogImageUrl: { 
    '/': 'https://vocs.dev/og-image.png', 
    '/*': 'https://vocs.dev/api/og?logo=%logo&title=%title&description=%description', 
  }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant