Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
wesenbergg committed Nov 16, 2023
1 parent 4e5f727 commit 81dfe23
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
11 changes: 10 additions & 1 deletion src/components/ArticleNavigation.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
---
const { title, chapters } = Astro.props;
interface Props {
title: string;
chapters: {
slug: string;
data: {
title: string;
};
}[];
}
const { title, chapters }: Props = Astro.props;
const path = Astro.url.pathname;
let currentChapterIndex = chapters.findIndex((c) => path.includes(c.slug));
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/101-git/asennus.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Asennusohjeet
chapter: 1
description: Asennusohjeet Gitille
desc: Asennusohjeet Gitille
---

# Git asennusohjeet
Expand Down
2 changes: 1 addition & 1 deletion src/content/blogi/16-11-2023/npm-vs-pnpm.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: npm vs pnpm
author: wesenbergg
readTime: 4
puDate: '16.11.2023'
pubDate: '16.11.2023'
desc: '5 syytä miksi pnpm lyö npm:n kanvaasille'
tags: ['node', 'js', 'ohjelmistokehitys', 'package manager', 'vertailu', 'devex', 'dx']
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/blogi/17-11-2023/10-askelta-web-kehitykseen.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 10 askelta web kehitykseen
author: wesenbergg
readTime: 5
puDate: '17.11.2023'
pubDate: '17.11.2023'
desc: 'Web-kehityksen urapolun aloittaminen voi tuntua aluksi haastavalta, mutta se on saavutettavissa vaiheittain. Tässä on muutama askel, jotka voivat auttaa sinua aloittamaan web-kehityksen urapolun.'
tags: ['node', 'js', 'ohjelmistokehitys', 'package manager', 'vertailu', 'devex', 'dx']
---
Expand Down
7 changes: 4 additions & 3 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ const blogi = defineCollection({
// Type-check frontmatter using a schema
schema: z.object({
title: z.string(),
description: z.string(),
author: z.string(),
readTime: z.number(),
desc: z.string(),
// Transform string to Date object
pubDate: z.coerce.date(),
pubDate: z.string().optional(),
updatedDate: z.coerce.date().optional(),
heroImage: z.string().optional(),
}),
Expand All @@ -15,7 +17,6 @@ const blogi = defineCollection({
const testi = defineCollection({
schema: z.object({
title: z.string(),
pubDate: z.coerce.date(),
})
})

Expand Down
2 changes: 1 addition & 1 deletion src/content/ping/markdown-style-guide.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 'Markdown Style Guide'
description: 'Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.'
desc: 'Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.'
pubDate: 'Jul 01 2022'
heroImage: '/blog-placeholder.jpg'
---
Expand Down

0 comments on commit 81dfe23

Please sign in to comment.