added robots meta tag

This commit is contained in:
Danny Coates 2019-03-14 11:40:01 -07:00
parent 7413a3336a
commit 4e26c6ab75
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
3 changed files with 6 additions and 2 deletions

View File

@ -1,2 +0,0 @@
User-agent: *
Disallow: /download/

View File

@ -9,6 +9,11 @@ module.exports = function(state, body = '') {
<head>
<title>${state.title}</title>
<base href="/" />
<meta
name="robots"
content="${state.route === 'download/:id' ? 'none' : 'all'},noarchive"
/>
<meta name="google" content="nositelinkssearchbox" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

View File

@ -33,6 +33,7 @@ module.exports = async function(req) {
fileInfo: {},
cspNonce: req.cspNonce,
user: { avatar: assets.get('user.svg'), loggedIn: false },
route: req.route.path,
authConfig,
layout
};