Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"John Gruen <john.gruen@gmail.com>"
],
"private": true,
"title": "Firefox Themer",
"homepage": "https://mozilla.github.io/Themer/",
"main": "src/web/index.js",
"config": {
"GA_TRACKING_ID": "UA-114768519-1"
Expand Down
14 changes: 7 additions & 7 deletions src/web/index.html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<meta name="description" content="Theming demo for Firefox Quantum and beyond." />
<meta name="description" content="<%= htmlWebpackPlugin.options.description %>" />
<!-- Open Graph meta tags-->
<meta property="og:title" content="Firefox Themer" />
<meta property="og:url" content="https://mozilla.github.io/Themer/" />
<meta property="og:title" content="<%= htmlWebpackPlugin.options.title %>" />
<meta property="og:url" content="<%= htmlWebpackPlugin.options.homepage %>" />
<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:site" content="@FxTestPilot" />
<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).

<meta name="twitter:description" content="<%= htmlWebpackPlugin.options.description %>" />
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="icon" type="image/svg+xml" href="images/icon.svg" />
</head>
<body>
Expand Down
6 changes: 5 additions & 1 deletion webpack.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const merge = require("webpack-merge");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");

const pkg = require("./package.json");
const common = require("./webpack.common.js");

module.exports = merge(common.webpackConfig, {
Expand All @@ -24,7 +25,10 @@ module.exports = merge(common.webpackConfig, {
new HtmlWebpackPlugin({
template: "./src/web/index.html.ejs",
filename: "index.html",
chunks: ["index"]
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.

}),
new CopyWebpackPlugin([
{ from: "./src/images", to: "images" },
Expand Down