From 7efa3754279658cd7ad84e5fe7591bc8f5eb587e Mon Sep 17 00:00:00 2001 From: alexlebens Date: Sat, 24 Aug 2024 02:09:34 -0500 Subject: [PATCH] remove author field --- Dockerfile | 2 +- lib/directus.ts | 5 ----- package.json | 2 +- src/pages/index.astro | 2 +- src/pages/projects.astro | 4 ++-- src/pages/projects/[slug].astro | 4 ++-- 6 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 16e6a62..5ee0bc8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM node:20.17.0-alpine3.20 AS base -LABEL version="0.5.2" +LABEL version="0.5.3" LABEL description="Astro based website to use as a profile" ENV PNPM_HOME="/pnpm" diff --git a/lib/directus.ts b/lib/directus.ts index 3f601b2..5e13be7 100644 --- a/lib/directus.ts +++ b/lib/directus.ts @@ -26,17 +26,12 @@ type Skills = { skill_3_description: string; } -type Author = { - name: string -} - export type Post = { slug: string; title: string; content: string; image: string; published_date: string; - author: Author; tags: string[]; image_alt: string; } diff --git a/package.json b/package.json index 095e537..c644de7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "site-profile", "type": "module", - "version": "0.5.2", + "version": "0.5.3", "scripts": { "dev": "astro dev", "start": "astro dev", diff --git a/src/pages/index.astro b/src/pages/index.astro index 212cc78..3e3c028 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -18,7 +18,7 @@ const global = await directus.request(readSingleton("global")); const posts = await directus.request( readItems("posts", { - fields: ['*', { author: ['*'] }], + fields: ['*'], sort: ["-published_date"], }) ); diff --git a/src/pages/projects.astro b/src/pages/projects.astro index a07c2a7..e001ae1 100644 --- a/src/pages/projects.astro +++ b/src/pages/projects.astro @@ -13,7 +13,7 @@ const global = await directus.request(readSingleton("global")); const posts = await directus.request( readItems("posts", { - fields: ['*', { author: ['*'] }], + fields: ['*'], sort: ["-published_date"], }) ); @@ -37,7 +37,7 @@ const posts = await directus.request( )) - } + } diff --git a/src/pages/projects/[slug].astro b/src/pages/projects/[slug].astro index 0ab529e..d28806a 100644 --- a/src/pages/projects/[slug].astro +++ b/src/pages/projects/[slug].astro @@ -11,7 +11,7 @@ import { readItems } from "@directus/sdk"; export async function getStaticPaths() { const posts = await directus.request(readItems("posts", { - fields: ['*', { author: ['*'] }], + fields: ['*'], })); return posts.map((post) => ({ params: { slug: post.slug }, props: post })); } @@ -28,7 +28,7 @@ const published_date: string = new Date(post.published_date).toLocaleDateString( Projects