Skip to content

Populate opengraph/twitter meta tags from package.json#180

Merged
lmorchard merged 1 commit intomozilla:masterfrom
pdehaan:webpack-html
Mar 16, 2018
Merged

Populate opengraph/twitter meta tags from package.json#180
lmorchard merged 1 commit intomozilla:masterfrom
pdehaan:webpack-html

Conversation

@pdehaan
Copy link
Contributor

@pdehaan pdehaan commented Mar 15, 2018

No doubt this will be useless when we add l10n, but until then... 🎉

<meta property="og:type" content="website" />
<!-- Twitter card meta tags-->
<meta name="twitter:card" content="themer" />
<meta name="twitter:card" content="summary" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure "themer" is a valid card type here. I stole "summary" from the TestPilot site's <meta> tags.

<meta name="twitter:title" content="Grab your parachute and get access to experimental Firefox features." />
<meta name="twitter:description" content="Theming demo for Firefox Quantum and beyond." />
<title>Firefox Themer</title>
<meta name="twitter:title" content="<%= htmlWebpackPlugin.options.title %>" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll have to re-read the docs to try and understand the difference betwixt a twitter:title and twitter:description, but tweak will change the twitter:title to "Firefox Themer" (versus the current parachute reference, which may have been a TestPilot relic).

chunks: ["index"],
title: pkg.title,
description: pkg.description,
homepage: pkg.homepage
Copy link
Contributor Author

@pdehaan pdehaan Mar 15, 2018

Choose a reason for hiding this comment

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

Conversely, I could just shim all of package.json values into the options (a la pkg: pkg), but that felt a wee bit heavy handed, so I just injected the 3 params I "cared" about.

Copy link

@chuckharmston chuckharmston left a comment

Choose a reason for hiding this comment

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

Not 100% sure of our l10n plans, so I won't merge it, but this works great and the code looks good.

@pdehaan
Copy link
Contributor Author

pdehaan commented Mar 16, 2018

This is all I know about l10n. I should probably file a separate bug about l10n status so we can discuss there, and put it in a milestone (if we're doing it for v1 or waiting)...

https://github.com/mozilla/Themer/blob/620412840e461a77c6c89df858731558e407e4e0/src/web/lib/components/AppHeader/index.scss#L71


UPDATE: Submitted #182 to discuss potential localization plans.

@pdehaan pdehaan mentioned this pull request Mar 16, 2018
@lmorchard
Copy link
Contributor

No localization plans yet, wanted to get to feature complete since things were kind of in experimental flux and strings would have been anything but stable

@lmorchard lmorchard merged commit e727ee2 into mozilla:master Mar 16, 2018
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

Successfully merging this pull request may close these issues.

3 participants