Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
monnaie-libre-fr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Léo El Amri
monnaie-libre-fr
Commits
79a2aa44
Commit
79a2aa44
authored
3 years ago
by
Emmanuel Salomon
Browse files
Options
Downloads
Patches
Plain Diff
fix: meta tag for home + og image
parent
901748d9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
libs/helpers.js
+21
-6
21 additions, 6 deletions
libs/helpers.js
pages/index.vue
+11
-0
11 additions, 0 deletions
pages/index.vue
static/img/og-home.jpeg
+0
-0
0 additions, 0 deletions
static/img/og-home.jpeg
with
32 additions
and
6 deletions
libs/helpers.js
+
21
−
6
View file @
79a2aa44
...
...
@@ -60,31 +60,46 @@ export function reduceResults(results) {
* @return {Object} An object with meta good for SEO :)
*/
export
function
headDocument
()
{
const
title
=
this
.
document
.
title
||
this
.
$config
.
site_title
const
content
=
this
.
document
.
description
||
this
.
$config
.
site_description
const
image
=
this
.
document
.
image
||
`
${
this
.
$config
.
site_url
}
/img/og-home.jpeg`
return
{
title
:
this
.
document
.
title
,
title
,
meta
:
[
{
hid
:
'
description
'
,
name
:
'
description
'
,
content
:
this
.
document
.
description
,
content
,
},
// Open Graph
{
hid
:
'
og:title
'
,
property
:
'
og:title
'
,
content
:
this
.
document
.
title
},
{
hid
:
'
og:title
'
,
property
:
'
og:title
'
,
content
:
title
},
{
hid
:
'
og:description
'
,
property
:
'
og:description
'
,
content
:
this
.
document
.
description
,
content
,
},
{
hid
:
'
og:image
'
,
property
:
'
og:image
'
,
content
:
image
,
},
// Twitter Card
{
hid
:
'
twitter:title
'
,
name
:
'
twitter:title
'
,
content
:
this
.
document
.
title
,
content
:
title
,
},
{
hid
:
'
twitter:description
'
,
name
:
'
twitter:description
'
,
content
:
this
.
document
.
description
,
content
,
},
{
hid
:
'
twitter:image
'
,
name
:
'
twitter:image
'
,
content
:
image
,
},
],
}
...
...
This diff is collapsed.
Click to expand it.
pages/index.vue
+
11
−
0
View file @
79a2aa44
...
...
@@ -42,6 +42,8 @@
</
template
>
<
script
>
import
{
headDocument
as
head
}
from
'
~/libs/helpers
'
export
default
{
name
:
'
HomePage
'
,
async
asyncData
({
$content
})
{
...
...
@@ -55,6 +57,15 @@ export default {
sections
,
}
},
data
()
{
return
{
// for head meta tags
document
:
{
title
:
"
Repenser la création monétaire...et l'expérimenter !
"
,
},
}
},
head
,
}
</
script
>
...
...
This diff is collapsed.
Click to expand it.
static/img/og-home.jpeg
0 → 100644
+
0
−
0
View file @
79a2aa44
145 KiB
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment