Add a subdir parameter in config

parent 4c59e788
Pipeline #1441 passed with stage
in 36 seconds
{
"port": "3000"
"port": "3000",
"subdir": "generateur-slogans/"
}
......@@ -107,7 +107,9 @@ app.get('/generate.png', function (req, res) {
});
app.get('/', function(req, res) {
res.render('index', {host: req.headers.host, imageParams: req._parsedUrl.query});
res.render('index', {host: req.headers.host,
imageParams: req._parsedUrl.query,
subdir: config.subdir});
})
app.listen(process.env.PORT || config.port || 80);
......@@ -6,8 +6,8 @@
<meta name="twitter:card" content="summary_large_image" />
<meta property="og:title" content="Soutenez La Quadrature du Net !" />
<meta property="og:description" content="Soutenez La Quadrature du Net !" />
<meta property="og:url" content="http://<%= host %>?<%= imageParams %>" />
<meta property="og:image" content="http://<%= host %>/generate.png?<%= imageParams %>" />
<meta property="og:url" content="http://<%= host %>/<%= subdir %>?<%= imageParams %>" />
<meta property="og:image" content="http://<%= host %>/<%= subdir %>/generate.png?<%= imageParams %>" />
<meta property="og:image:width" content="600" />
<meta property="og:image:height" content="413" />
<meta property="og:type" content="website" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment