Skip to content

Commit

Permalink
feat: add theme-color meta tag for browser address bar
Browse files Browse the repository at this point in the history
  • Loading branch information
psychobunny committed Sep 28, 2020
1 parent f69697b commit 5172d73
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/meta/tags.js
Expand Up @@ -31,6 +31,9 @@ Tags.parse = async (req, data, meta, link) => {
name: 'msapplication-badge',
content: 'frequency=30; polling-uri=' + nconf.get('url') + '/sitemap.xml',
noEscape: true,
}, {
name: 'theme-color',
content: meta.config.themeColor || '#ffffff',
}];

if (Meta.config.keywords) {
Expand Down

5 comments on commit 5172d73

@sweetppro
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be reverted, or at least exposed as a variable in the admin UI

@barisusakli
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not in the general settings?

image

@sweetppro
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, i havnt looked to be honest.
I have a use case where i use a light and dark theme however. I add the meta tags via a custom header.

would it be possible to add a dark them customisation to the UI

@sweetppro
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or checkbox to disable the tag in the UI would also work

@sweetppro
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need, I modified the response in the hook filter:meta.getMetaTags

Please sign in to comment.