Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
7efa375427 |
@@ -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"
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "site-profile",
|
||||
"type": "module",
|
||||
"version": "0.5.2",
|
||||
"version": "0.5.3",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"start": "astro dev",
|
||||
|
@@ -18,7 +18,7 @@ const global = await directus.request(readSingleton("global"));
|
||||
|
||||
const posts = await directus.request(
|
||||
readItems("posts", {
|
||||
fields: ['*', { author: ['*'] }],
|
||||
fields: ['*'],
|
||||
sort: ["-published_date"],
|
||||
})
|
||||
);
|
||||
|
@@ -13,7 +13,7 @@ const global = await directus.request(readSingleton("global"));
|
||||
|
||||
const posts = await directus.request(
|
||||
readItems("posts", {
|
||||
fields: ['*', { author: ['*'] }],
|
||||
fields: ['*'],
|
||||
sort: ["-published_date"],
|
||||
})
|
||||
);
|
||||
|
@@ -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(
|
||||
<a class="back-link" href="/projects/"><Icon icon="arrow-left" /> Projects</a>
|
||||
<Hero
|
||||
title={post.title}
|
||||
tagline=`Published by ${post.author.name} on ${published_date}`
|
||||
tagline=`Published on ${published_date}`
|
||||
align="start"
|
||||
>
|
||||
<div class="details">
|
||||
|
Reference in New Issue
Block a user