Skip to content
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

Open graph + favicons #40

Merged
merged 14 commits into from Feb 4, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -31,6 +31,7 @@
"isomorphic-unfetch": "^3.0.0",
"next": "^9.1.3",
"next-images": "^1.2.0",
"next-seo": "0.0",
kilemensi marked this conversation as resolved.
Show resolved Hide resolved
"prop-types": "^15.7.2",
"react": "^16.11.0",
"react-apollo": "^3.1.3",
Expand Down
Binary file modified public/favicon.ico
Binary file not shown.
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
10 changes: 0 additions & 10 deletions public/manifest.json
Expand Up @@ -6,16 +6,6 @@
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
kilemensi marked this conversation as resolved.
Show resolved Hide resolved
}
],
"start_url": ".",
Expand Down
Binary file added src/assets/images/openGraph.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions src/pages/_app.js
Expand Up @@ -7,6 +7,30 @@ import theme from 'theme';
import { MuiThemeProvider } from '@material-ui/core';
import CssBaseline from '@material-ui/core/CssBaseline';

import NextSeo from 'next-seo';
import openGraph from 'assets/images/openGraph.png';

const SEO_METATAGS = {
kilemensi marked this conversation as resolved.
Show resolved Hide resolved
title: 'Promise Tracker App',
description:
'PromiseTracker is a platform-based promise tracker where Kenyan citizens can track various promises made by governors in their manifestos and during the campaigns leading up to the 2017 general election',
openGraph: {
type: 'website',
locale: 'en_IE',
url: 'https://promisetracker.codeforafrica.org/',
title: 'Promise tracker',
description:
'PromiseTracker, is a tool to help journalists and civil society watchdogs more easily track campaign promises and other political / government pledges',
image: { openGraph },
site_name: 'promise-tracker',
imageWidth: 1200,
imageHeight: 1200
},
twitter: {
handle: '@Code4Africa'
}
};

class PromiseTrackerApp extends App {
componentDidMount() {
// Remove the server-side injected CSS.
Expand All @@ -22,6 +46,7 @@ class PromiseTrackerApp extends App {
<>
<MuiThemeProvider theme={theme}>
<CssBaseline />
<NextSeo config={SEO_METATAGS} />
<Component {...pageProps} />
</MuiThemeProvider>
</>
Expand Down
1 change: 1 addition & 0 deletions src/pages/_document.js
Expand Up @@ -18,6 +18,7 @@ export default class PromiseTrackerDocument extends Document {
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
<link rel="manifest" href="/manifest.json" />
</Head>
<body>
<Main />
Expand Down