Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #12 from thibaudcolas/feature/site-metadata
Browse files Browse the repository at this point in the history
Add website metadata for SEO and social sharing purposes
  • Loading branch information
jtiala committed Oct 2, 2018
2 parents e5713d0 + b1554ba commit a542176
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@
<link rel="preload" href="vendor.bundle.js" as="script"></script>
<link rel="preload" href="bundle.js" as="script"></script>
<title><%= htmlWebpackPlugin.options.title %></title>
<meta name="description" content="<%= htmlWebpackPlugin.options.description %>" />
<meta name="twitter:card" content="summary_large_image">
<meta property="og:url" content="<%= htmlWebpackPlugin.options.productionURL %>">
<meta property="og:type" content="article">
<meta property="og:site_name" content="<%= htmlWebpackPlugin.options.title %>">
<meta property="og:title" content="<%= htmlWebpackPlugin.options.title %>">
<meta property="og:description" content="<%= htmlWebpackPlugin.options.description %>">
<meta property="og:image" content="<%= htmlWebpackPlugin.options.productionURL %>/static/images/mobile-screenshot.png">
<meta property="og:image:width" content="603">
<meta property="og:image:height" content="389">
<meta name="twitter:image:alt" content="Screenshot of LunchWatch showing the menus of two restaurants">
<meta name="twitter:label1" value="Built with">
<meta name="twitter:data1" value="️❤️">
<meta name="twitter:label2" value="Also built with">
<meta name="twitter:data2" value="JavaScript">

<% if (htmlWebpackPlugin.options.googleMapsJsApiKey) { %>
<script defer src="https://maps.googleapis.com/maps/api/js?key=<%= htmlWebpackPlugin.options.googleMapsJsApiKey %>&libraries=places"></script>
<% } %>
Expand Down
Binary file added src/static/images/mobile-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ module.exports = {
new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', filename: 'vendor.bundle.js' }),
new HtmlWebpackPlugin({
title: 'LunchWatch',
description: 'Probably the best and most comprehensive lunch menu aggregator in Northern Finland',
productionURL: 'https://lunch.watch/',
template: 'index.html',
filename: 'index.html',
googleAnalyticsTrackingId: process.env.GOOGLE_ANALYTICS_TRACKING_ID || null,
Expand Down

0 comments on commit a542176

Please sign in to comment.