mirror of
https://github.com/jaronpate/folio.git
synced 2026-10-19 01:07:39 +00:00
consolidate title and description vars
This commit is contained in:
@@ -59,7 +59,9 @@ if (!data.value) {
|
||||
const page = computed(() => data.value?.project ?? null);
|
||||
const isFolder = computed(() => data.value?.kind === 'folder');
|
||||
const projectTitle = page.value?.title ?? folderName.value;
|
||||
const projectDescription = page.value?.description ?? '';
|
||||
const projectDescription = page.value
|
||||
? page.value.description
|
||||
: `Projects from ${folderName.value}`;
|
||||
const liveHref = computed(() => page.value?.href ?? '');
|
||||
const ogImage = projectOgImage(
|
||||
page.value?.image,
|
||||
@@ -70,15 +72,15 @@ const ogImage = projectOgImage(
|
||||
useSeoMeta({
|
||||
title: projectTitle,
|
||||
ogTitle: projectTitle,
|
||||
description: projectDescription || projectTitle,
|
||||
ogDescription: projectDescription || projectTitle,
|
||||
description: projectDescription,
|
||||
ogDescription: projectDescription,
|
||||
ogUrl: pageUrl,
|
||||
ogType: isFolder.value ? 'website' : 'article',
|
||||
ogImage,
|
||||
ogImageAlt: projectTitle,
|
||||
twitterCard: 'summary',
|
||||
twitterTitle: projectTitle,
|
||||
twitterDescription: projectDescription || projectTitle,
|
||||
twitterDescription: projectDescription,
|
||||
twitterImage: ogImage,
|
||||
});
|
||||
|
||||
@@ -170,9 +172,7 @@ definePageMeta({
|
||||
<NuxtLayout
|
||||
name="main"
|
||||
:title="page ? page.title : folderName"
|
||||
:description="
|
||||
page ? page.description : `Projects from ${folderName}`
|
||||
"
|
||||
:description="projectDescription"
|
||||
>
|
||||
<article v-if="page">
|
||||
<div class="article-body">
|
||||
|
||||
@@ -18,7 +18,7 @@ const collectionId = `${projectsUrl}#collection`;
|
||||
const listId = `${projectsUrl}#list`;
|
||||
const projectsTitle = 'Projects';
|
||||
const projectsDescription =
|
||||
"Things I've made. Some for work, some because I wanted them to exist.";
|
||||
"Things I've made which you may find of some interest.";
|
||||
|
||||
useSeoMeta({
|
||||
title: projectsTitle,
|
||||
@@ -111,8 +111,8 @@ definePageMeta({
|
||||
<template>
|
||||
<NuxtLayout
|
||||
name="main"
|
||||
title="Projects"
|
||||
description="Things I've made which you may find of some interest."
|
||||
:title="projectsTitle"
|
||||
:description="projectsDescription"
|
||||
>
|
||||
<article>
|
||||
<ProjectList :pages="pages ?? []" />
|
||||
|
||||
Reference in New Issue
Block a user