Puto vscode

This commit is contained in:
Pablo Moyano 2023-10-08 03:02:02 +02:00
parent 05617a5302
commit 647ce41c7e
5 changed files with 43 additions and 2 deletions

View File

@ -1,7 +1,7 @@
---
title: 'Test Post 1'
description: 'Lorem ipsum dolor sit amet'
date: 'Jul 08 2022'
date: 2023-10-08
cover: '../../assets/gallery/junction2019-1.jpg'
coverAlt: 'Hacking'
---

View File

@ -0,0 +1,20 @@
---
title: 'Test Post 2'
description: 'Lorem ipsum dolor sit amet'
date: 2023-10-07
cover: '../../assets/gallery/junction2019-1.jpg'
coverAlt: 'Hacking'
---
# Title
This is a test
## Subtitle
### I have serious formatting issues
#### I think I need tailwind typography
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.

View File

@ -0,0 +1,20 @@
---
title: 'Test Post 3'
description: 'Lorem ipsum dolor sit amet'
date: 2022-08-07
cover: '../../assets/gallery/junction2019-1.jpg'
coverAlt: 'Hacking'
---
# Title
This is a test
## Subtitle
### I have serious formatting issues
#### I think I need tailwind typography
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.

View File

@ -3,6 +3,7 @@ import { defineCollection, z } from "astro:content";
const blogCollection = defineCollection({
schema: ({ image }) => z.object({
title: z.string(),
date: z.date(),
cover: image().refine((img) => img.width >= 1080, {
message: "Cover image must be at least 1080 pixels wide!",
}),

View File

@ -7,7 +7,7 @@ import Layout from "../../layouts/new.astro";
// Get blogposts from content folder
import { getCollection } from "astro:content";
const posts = (await getCollection("blog")).sort(
(a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf()
(a, b) => a.data.date.valueOf() + b.data.date.valueOf()
);
---