diff --git a/src/components/ErrorPage/ErrorPage.js b/src/components/ErrorPage/ErrorPage.js
index ca40c3b60..0ea869b5b 100644
--- a/src/components/ErrorPage/ErrorPage.js
+++ b/src/components/ErrorPage/ErrorPage.js
@@ -18,7 +18,7 @@ export function ErrorPage({ error }) {
let errorMessage = null;
if (error.status === 404) {
- title = 'Page Not Found';
+ title = 'Page not found';
content = 'Sorry, the page you were trying to view does not exist.';
} else if (process.env.NODE_ENV !== 'production') {
errorMessage =
{error.stack}
;
diff --git a/src/routes/helpers/render404.js b/src/routes/helpers/render404.js
index eb8f388a6..6d2fe5a19 100644
--- a/src/routes/helpers/render404.js
+++ b/src/routes/helpers/render404.js
@@ -2,7 +2,7 @@ import React from 'react';
import LayoutContainer from '../../components/Layout/LayoutContainer';
import NotFound from '../not-found/NotFound';
-const title = 'Page Not Found';
+const title = 'Page not found';
export default (context) => ({
chunks: ['not-found'],
diff --git a/src/routes/helpers/rootAction.js b/src/routes/helpers/rootAction.js
index eb80e77ad..6dbf8d3f0 100644
--- a/src/routes/helpers/rootAction.js
+++ b/src/routes/helpers/rootAction.js
@@ -4,7 +4,9 @@ export default async ({ next }) => {
// Provide default values for title, description etc.
const title = 'Lunch';
- if (route.title) {
+ if (route.fullTitle) {
+ route.title = route.fullTitle;
+ } else if (route.title) {
route.title = `${title} | ${route.title}`;
} else {
route.title = title;
diff --git a/src/routes/login/index.js b/src/routes/login/index.js
index a996300ac..902b4495d 100644
--- a/src/routes/login/index.js
+++ b/src/routes/login/index.js
@@ -25,6 +25,7 @@ function action(context) {
),
+ title: 'Log in',
}));
}
diff --git a/src/routes/main/invitation/create/index.js b/src/routes/main/invitation/create/index.js
index 2e88f9ac6..80a9fa419 100644
--- a/src/routes/main/invitation/create/index.js
+++ b/src/routes/main/invitation/create/index.js
@@ -27,5 +27,6 @@ export default (context) => {
),
+ title: 'Invitation',
};
};
diff --git a/src/routes/main/invitation/new/index.js b/src/routes/main/invitation/new/index.js
index 18bb55348..85421e844 100644
--- a/src/routes/main/invitation/new/index.js
+++ b/src/routes/main/invitation/new/index.js
@@ -20,5 +20,6 @@ export default (context) => {
),
+ title: 'Invitation',
};
};
diff --git a/src/routes/main/landing/index.js b/src/routes/main/landing/index.js
index a7cd3081b..8d06819b9 100644
--- a/src/routes/main/landing/index.js
+++ b/src/routes/main/landing/index.js
@@ -22,5 +22,6 @@ export default (context) => {
),
+ fullTitle: 'Lunch – Team voting for nearby restaurants',
}));
};
diff --git a/src/routes/main/new-team/index.js b/src/routes/main/new-team/index.js
index db657a96d..4eba4748b 100644
--- a/src/routes/main/new-team/index.js
+++ b/src/routes/main/new-team/index.js
@@ -12,7 +12,7 @@ import LayoutContainer from '../../../components/Layout/LayoutContainer';
import renderIfHasName from '../../helpers/renderIfHasName';
import NewTeamContainer from './NewTeamContainer';
-const title = 'New Team';
+const title = 'New team';
export default (context) => renderIfHasName(context, () => ({
title,
diff --git a/src/routes/main/password/create/index.js b/src/routes/main/password/create/index.js
index 68ebf41f0..8a29b97c4 100644
--- a/src/routes/main/password/create/index.js
+++ b/src/routes/main/password/create/index.js
@@ -30,6 +30,7 @@ export default (context) => {
),
+ title: 'Reset password',
};
});
};
diff --git a/src/routes/main/password/edit/index.js b/src/routes/main/password/edit/index.js
index 86ff1ede3..6e5fd3432 100644
--- a/src/routes/main/password/edit/index.js
+++ b/src/routes/main/password/edit/index.js
@@ -30,6 +30,7 @@ export default (context) => {
),
+ title: 'Reset password',
};
});
};
diff --git a/src/routes/main/password/new/index.js b/src/routes/main/password/new/index.js
index fe9b01f33..44622b26c 100644
--- a/src/routes/main/password/new/index.js
+++ b/src/routes/main/password/new/index.js
@@ -23,5 +23,6 @@ export default (context) => {
),
+ title: 'Reset password',
}));
};
diff --git a/src/routes/main/teams/index.js b/src/routes/main/teams/index.js
index 9258a285c..9aab8a387 100644
--- a/src/routes/main/teams/index.js
+++ b/src/routes/main/teams/index.js
@@ -8,4 +8,5 @@ import TeamsContainer from './TeamsContainer';
export default (context) => renderIfHasName(context, () => ({
chunks: ['teams'],
component: ,
+ title: 'My teams',
}));
diff --git a/src/routes/main/users/create/index.js b/src/routes/main/users/create/index.js
index 078eb4fab..5aef6ecd0 100644
--- a/src/routes/main/users/create/index.js
+++ b/src/routes/main/users/create/index.js
@@ -23,6 +23,7 @@ export default (context) => {
),
+ title: 'New user',
};
}
diff --git a/src/routes/main/users/new/index.js b/src/routes/main/users/new/index.js
index ca0946153..0f6c47390 100644
--- a/src/routes/main/users/new/index.js
+++ b/src/routes/main/users/new/index.js
@@ -24,7 +24,8 @@ export default (context) => {
- )
+ ),
+ title: 'New user',
};
}
diff --git a/src/server.js b/src/server.js
index 9e87c6c76..81395ca28 100644
--- a/src/server.js
+++ b/src/server.js
@@ -358,7 +358,7 @@ const render = async (req, res, next) => {
const data = { ...route,
apikey: process.env.GOOGLE_CLIENT_APIKEY || '',
title: route.title || 'Lunch',
- description: 'An app for groups to decide on nearby lunch options.',
+ description: 'A simple lunch voting app for you and your team. Search nearby restaurants, add them to your list, vote for as many as you like, and decide on today’s pick!',
body: '',
root: generateUrl(req, req.get('host')),
};
diff --git a/test/integration/other.spec.js b/test/integration/other.spec.js
index 814c09ec1..e3854d27c 100644
--- a/test/integration/other.spec.js
+++ b/test/integration/other.spec.js
@@ -83,7 +83,7 @@ describe('other pages', () => {
await page.goto('http://local.lunch.pink:3000/404');
await page.waitForSelector('#app', helpers.waitOptions);
const content = await page.content();
- expect(content).to.contain('Page Not Found');
+ expect(content).to.contain('Page not found');
});
});
});