-
Notifications
You must be signed in to change notification settings - Fork 97
Populate opengraph/twitter meta tags from package.json #180
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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" /> | ||
| <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 %>" /> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| <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> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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, { | ||
|
|
@@ -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 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| }), | ||
| new CopyWebpackPlugin([ | ||
| { from: "./src/images", to: "images" }, | ||
|
|
||
There was a problem hiding this comment.
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.