Added conditional copy of robots files and build of META tags.

This commit is contained in:
David Soulayrol 2018-11-19 22:53:37 +01:00
commit 027a3cdeae
5 changed files with 15 additions and 2 deletions

View file

@ -10,6 +10,9 @@
<meta name="description" content="Association de théâtre à Combaillaux" />
<meta name="keywords" content="association, théatre, combaillaux" />
<meta name="viewport" content="width=device-width, initial-scale=1">
{% if not production %}
<meta name="robots" content="noindex, nofollow">
{% endif %}
<link rel="stylesheet" href="/css/mini-tes.css" />
<link rel="stylesheet" href="/css/style.css" />
<link rel="stylesheet" href="/css/style-desktop.css" />

View file

@ -11,7 +11,8 @@
"clean": "rimraf dist",
"dev": "npm run build && DEBUG=metalsmith* nodemon --watch src/scripts --exec node src/scripts/run-dev-server.js",
"server": "npm run build && http-server dist",
"deploy": "npm run build:prod && cd dist && rsync -v -rlptz --relative * david@soulayrol.net:/var/www/tests.soulayrol.net",
"deploy": "npm run build && cd dist && rsync -v -rlptz --relative * david@soulayrol.net:/var/www/tests.soulayrol.net",
"deploy:prod": "npm run build:prod && cd dist && rsync -v -rlptz --relative * david@soulayrol.net:/var/www/tousenscene34.fr",
"lint": "npm run lint:js && npm run lint:css",
"lint:js": "eslint src test",
"lint:css": "stylelint src/assets/css/**/*.css",

View file

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

View file

@ -0,0 +1 @@
google-site-verification: googlef401a8e740dee0de.html

View file

@ -37,6 +37,10 @@ module.exports = new Metalsmith(paths.projectRoot)
includePaths: [path.join(paths.miniCss, 'src', 'flavors')],
outputStyle: 'compressed'
}))
.use(assets({
source: './src/robots/' + (process.env.NODE_ENV || 'dev'),
destination: './'
}))
.use(shows())
.use(function (files, metalsmith, done) {
/**
@ -105,7 +109,8 @@ module.exports = new Metalsmith(paths.projectRoot)
}
},
globals: {
moment: moment
moment: moment,
production: __PROD__
}
}
}))