mirror of
https://github.com/go-task/task.git
synced 2026-02-24 12:10:47 +01:00
chore(website): improve home page title, including on opengraph
This commit is contained in:
@@ -90,12 +90,16 @@ export default defineConfig({
|
||||
head.push(['link', { rel: 'canonical', href: canonicalUrl }])
|
||||
|
||||
// Dynamic Open Graph and Twitter meta tags
|
||||
const pageTitle = pageData.frontmatter.title || pageData.title || taskName
|
||||
const isHome = pageData.relativePath === 'index.md';
|
||||
var pageTitle = pageData.frontmatter.title || pageData.title || taskName;
|
||||
if (!isHome) {
|
||||
pageTitle = `${pageTitle} | ${taskName}`;
|
||||
}
|
||||
const pageDescription = pageData.frontmatter.description || pageData.description || taskDescription
|
||||
head.push(['meta', { property: 'og:title', content: `${pageTitle} | Task` }])
|
||||
head.push(['meta', { property: 'og:title', content: pageTitle }])
|
||||
head.push(['meta', { property: 'og:description', content: pageDescription }])
|
||||
head.push(['meta', { property: 'og:url', content: canonicalUrl }])
|
||||
head.push(['meta', { name: 'twitter:title', content: `${pageTitle} | Task` }])
|
||||
head.push(['meta', { name: 'twitter:title', content: pageTitle }])
|
||||
head.push(['meta', { name: 'twitter:description', content: pageDescription }])
|
||||
|
||||
// Noindex pour 404
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
---
|
||||
title: "Task: The Modern Task Runner"
|
||||
layout: home
|
||||
hero:
|
||||
name: Task
|
||||
|
||||
Reference in New Issue
Block a user