Skip to content

Commit

Permalink
ajout DC meta tags
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-chmbn committed Oct 19, 2023
1 parent 0e293fa commit 6c02998
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 7 deletions.
13 changes: 11 additions & 2 deletions components/organismes/OrganismeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,17 @@ getName(props.id).then(result => {
ogDescription: () => t("meta.descPersonne") + name.value,
ogImage: "https://beta.theses.fr/logo-theses-beta.png",
ogImageAlt: 'Logo Theses.fr',
twitterCard: 'summary_large_image',
})
twitterCard: 'summary',
ogType: 'website',
});
useHead({
meta: [
{ name: 'DC.title', content: `${name.value} | Theses.fr` },
{ name: 'DC.description.abstract', content: `${name.value} | Theses.fr` },
{ name: 'DC.source', content: `theses.fr` }
]
});
}).catch(error => {
if (error.response) {
displayError(error.response.data.message, { isSticky: true });
Expand Down
13 changes: 11 additions & 2 deletions components/personnes/PersonneView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,17 @@ getPersonne(props.id).then(result => {
ogDescription: () => t("meta.descPersonne") + item.prenom + " " + item.nom,
ogImage: "https://beta.theses.fr/logo-theses-beta.png",
ogImageAlt: 'Logo Theses.fr',
twitterCard: 'summary_large_image',
})
twitterCard: 'summary',
ogType: 'website',
});
useHead({
meta: [
{ name: 'DC.title', content: `${item.value.prenom} ${item.value.nom} | Theses.fr` },
{ name: 'DC.description.abstract', content: `${item.value.prenom} ${item.value.nom} | Theses.fr` },
{ name: 'DC.source', content: `theses.fr` }
]
});
}).catch(error => {
if (error.response) {
Expand Down
32 changes: 30 additions & 2 deletions components/theses/ThesisComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,36 @@ watchEffect(() => {
ogDescription: () => props.these.resumes.fr,
ogImage: "https://beta.theses.fr/logo-theses-beta.png",
ogImageAlt: 'Logo Theses.fr',
twitterCard: 'summary_large_image',
})
twitterCard: 'summary',
ogType: 'website',
author: () => props.these.auteurs[0].prenom + " " + props.these.auteurs[0].nom,
creator: () => props.these.auteurs[0].prenom + " " + props.these.auteurs[0].nom
});
let listeSujetsFR = "";
props.these.mapSujets.fr.forEach(element => {
listeSujetsFR += element.keyword + ", ";
});
useHead({
meta: [
{ name: 'DC.type', content: 'thesis' },
{ name: 'citation_dissertation_name', content: 'thesis' },
{ name: 'DC.title', content: `${titleThese} | Theses.fr` },
{ name: 'citation_title', content: `${titleThese} | Theses.fr` },
{ name: 'DC.description.abstract', content: props.these.resumes.fr },
{ name: 'citation_abstract', content: props.these.resumes.fr },
{ name: 'DC.subject', content: listeSujetsFR },
{ name: 'citation_keywords', content: listeSujetsFR },
{ name: 'DC.creator', content: props.these.auteurs[0].prenom + " " + props.these.auteurs[0].nom },
{ name: 'citation_author', content: props.these.auteurs[0].prenom + " " + props.these.auteurs[0].nom },
{ name: 'DC.contributor', content: props.these.directeurs[0].prenom + " " + props.these.directeurs[0].nom },
{ name: 'DC.publisher', content: props.these.etabSoutenance.nom },
{ name: 'citation_dissertation_institution', content: props.these.etabSoutenance.nom },
{ name: 'DC.date', content: props.these.dateSoutenance },
{ name: 'citation_publication_date', content: props.these.dateSoutenance }
]
});
});
</script>

Expand Down
2 changes: 1 addition & 1 deletion pages/resultats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ onMounted(async () => {
ogDescription: () => `Résultats pour ${request.value} | Theses.fr`,
ogImage: "https://beta.theses.fr/logo-theses-beta.png",
ogImageAlt: 'Logo Theses.fr',
twitterCard: 'summary_large_image',
twitterCard: 'summary',
})
});
});
Expand Down

0 comments on commit 6c02998

Please sign in to comment.