Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
generateur-slogans
Commits
4a692562
Verified
Commit
4a692562
authored
Oct 23, 2017
by
Thibaut Broggi
Browse files
Add a subdir parameter in config
parent
4c59e788
Pipeline
#1441
passed with stage
in 36 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
config.json.default
View file @
4a692562
{
"port": "3000"
"port": "3000",
"subdir": "generateur-slogans/"
}
srv.js
View file @
4a692562
...
...
@@ -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
);
views/index.ejs
View file @
4a692562
...
...
@@ -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"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment