nextra icon indicating copy to clipboard operation
nextra copied to clipboard

Allow overwriting theme-color meta tag

Open alii opened this issue 3 years ago • 4 comments

I would like to overwrite the value of theme-color for our docs, but it's hard coded here and providing it yourself in the theme.config.js will not override it (I presume Next.js chooses the first "version" of it).

Would it be possible to perhaps have another config property that would be

metaThemeColor?: string | {
  dark: string;
  light: string;
};

Or even better, maybe it would be possible to detect when we are reimplementing it and allow it to use the value we overwrite?

Thank you !! :heart: :D

alii avatar Sep 02 '22 10:09 alii

Placing it in _document.js will in fact write it to the DOM, but safari for example will still fallback to the initial <meta />.

alii avatar Sep 02 '22 10:09 alii

For which reason you need to override these properties?

dimaMachina avatar Oct 14 '22 03:10 dimaMachina

We were changing the theme of the Nextra top navigation bar and the browser navbar color did not match as it was being overwritten. Would be great if we could change it somehow :)

alii avatar Oct 14 '22 15:10 alii

why you can't configure the theme via primaryHue/primaryHue.dark/primaryHue.light theme options for it?

dimaMachina avatar Oct 14 '22 16:10 dimaMachina

Closing due silence

dimaMachina avatar Jan 23 '23 03:01 dimaMachina