diff --git a/components/post/PostBlog.vue b/components/post/PostBlog.vue new file mode 100644 index 0000000..a3bd56b --- /dev/null +++ b/components/post/PostBlog.vue @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + {{ page?.category.title }} + + + + + + {{ calculateReadTime(page?.content) }} + + + + {{ getRelativeTime(page?.date_published) }} + + + + + + + + + + + + + + + + + + + + + + {{ calculateReadTime(page?.content) }} + + + + {{ getRelativeTime(page?.date_published) }} + + + + {{ page?.category.title }} + + + + + + + + + + + diff --git a/components/post/PostCard.vue b/components/post/PostCard.vue new file mode 100644 index 0000000..ed3af47 --- /dev/null +++ b/components/post/PostCard.vue @@ -0,0 +1,67 @@ + + + + + + + + {{ post.category.title }} + + + + + + + + + + + {{ post?.summary }} + + + + + + + diff --git a/components/post/PostProject.vue b/components/post/PostProject.vue new file mode 100644 index 0000000..07100c4 --- /dev/null +++ b/components/post/PostProject.vue @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/post/PostVideo.vue b/components/post/PostVideo.vue new file mode 100644 index 0000000..bee14e3 --- /dev/null +++ b/components/post/PostVideo.vue @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + {{ page?.category.title }} + + + + + {{ calculateReadTime(page?.content) }} + + + + {{ getRelativeTime(page?.date_published) }} + + + + + + + + + + diff --git a/pages/posts/[slug].vue b/pages/posts/[slug].vue index dc03cbe..85fabad 100644 --- a/pages/posts/[slug].vue +++ b/pages/posts/[slug].vue @@ -1,12 +1,15 @@ - - - - - - - - - - - - - - - - {{ page.category.title }} - - - - - - {{ calculateReadTime(page.content) }} - - - - {{ getRelativeTime(page.date_published) }} - - - - +// JSON-LD +useSchemaOrg([ + defineArticle({ + headline: unref(metadata)?.title, + description: unref(metadata)?.description, + image: unref(metadata)?.image, + datePublished: unref(page)?.date_published ?? undefined, + author: [ + { + name: unref(metadata)?.authorName, + url: unref(page)?.author?.slug ? `https://directus.io/team/${unref(page)?.author?.slug}` : undefined, + image: unref(metadata)?.authorImage, + }, + ], + }), +]); - - - - - - - - - +// Page Title +useHead({ + title: () => unref(metadata)?.title, +}); - - - - - - - {{ calculateReadTime(page.content) }} - - - - {{ getRelativeTime(page.date_published) }} - - - - {{ page.category.title }} - - - - +// SEO Meta +useServerSeoMeta({ + title: () => unref(metadata)?.title, + description: () => unref(metadata)?.description, + ogTitle: () => unref(metadata)?.title, + ogDescription: () => unref(metadata)?.description, +}); + - - - - - + + + + + diff --git a/pages/posts/categories/[category].vue b/pages/posts/categories/[category].vue index b20380b..3b557b0 100644 --- a/pages/posts/categories/[category].vue +++ b/pages/posts/categories/[category].vue @@ -1,49 +1,118 @@ - Agency Blog - + {{ category.title }} + @@ -57,18 +126,13 @@ useHead({ - Articles for Category: {{ deslugify(params.category) }} - {{}} + Items for Category: {{ deslugify(params.category as string) }} diff --git a/pages/posts/index.vue b/pages/posts/index.vue index 6150367..0325019 100644 --- a/pages/posts/index.vue +++ b/pages/posts/index.vue @@ -1,23 +1,19 @@ - {{ data?.page.title }} - + {{ page?.title }} + Featured Article - + Latest & Greatest - +
+ + {{ calculateReadTime(page?.content) }} +
+ + {{ getRelativeTime(page?.date_published) }} +
- - {{ calculateReadTime(page.content) }} -
- - {{ getRelativeTime(page.date_published) }} -