Upgraded to Astro 5.2.5 and fixed content collections
This commit is contained in:
parent
298b91262e
commit
eec488ddff
28 changed files with 290 additions and 198 deletions
src
components/links
content.config.tsdata
blog
astro-usage.mdcernunnos-with-requiem.mdxdeploying-this-round-2.mddeploying-this.mdfgo-ta.mdhello-world.mdinstant-death.mdx
datafiles
layouts
pages
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
import LinkCard from './linkCard.astro'
|
||||
import socialData from '@content/data/socials.json'
|
||||
import socialData from '@datafiles/socials.json'
|
||||
import { socials } from './socials'
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { z, defineCollection } from 'astro:content'
|
||||
import { glob } from 'astro/loaders';
|
||||
|
||||
const blogCollection = defineCollection({
|
||||
type: 'content', // v2.5.0 and later
|
||||
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/data/blog" }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
tags: z.array(z.string()),
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: ../../layouts/blogPost.astro
|
||||
title: 'How Astro powers this site'
|
||||
pubDate: 2023-03-09
|
||||
description: 'Blog post talking about how Astro provides the basis for this website'
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: ../../layouts/blogPost.astro
|
||||
title: 'How to: TA Cernunnos'
|
||||
pubDate: 2023-07-14
|
||||
description: 'A handful of observations from the cernunnos fight'
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: ../../layouts/blogPost.astro
|
||||
title: 'Migrating to Forgejo'
|
||||
pubDate: 2023-12-23
|
||||
description: 'My short recollection of migrating this site + CI to Forgejo'
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: ../../layouts/blogPost.astro
|
||||
title: 'How to: Deploy this site'
|
||||
pubDate: 2023-03-17
|
||||
description: 'A summary of how this site is being deployed by diving into the gitlab-ci.yml'
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: ../../layouts/blogPost.astro
|
||||
title: 'FGO TA - How, what, why'
|
||||
pubDate: 2023-03-16
|
||||
description: 'What FGO TA is, what brought me to it and how you can do it yourself!'
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: ../../layouts/blogPost.astro
|
||||
title: 'Hello World!'
|
||||
pubDate: 2023-03-08
|
||||
description: 'First blog post, talking a bit about the site, the technologies behind it and the future ideas'
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
layout: ../../layouts/blogPost.astro
|
||||
title: 'FGO Mechanics: Instant Death'
|
||||
pubDate: 2023-08-19
|
||||
description: 'Blog post talking about instant death in FGO and how you can take advantage.'
|
|
@ -4,7 +4,7 @@ import workSans from '@fontsource-variable/work-sans/files/work-sans-latin-wght-
|
|||
|
||||
import Navbar from '@components/navbar/navbar.astro'
|
||||
import NavbarEntry from '@components/navbar/navbarEntry.astro'
|
||||
import navdata from '@content/data/navdata.json'
|
||||
import navdata from '@datafiles/navdata.json'
|
||||
import embed from '@assets/embed.png'
|
||||
import favicon from '@assets/favicon.ico'
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import ContactSection from '@layouts/contactSection.astro'
|
|||
|
||||
import CustomFooter from '@layouts/customFooter.astro'
|
||||
import TechnologyCard from '@components/cards/technologyCard.astro'
|
||||
import technologydata from '@content/data/technologydata.json'
|
||||
import technologydata from '@datafiles/technologydata.json'
|
||||
import SmallTitle from '@components/titles/smallTitle.astro'
|
||||
|
||||
const description =
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
---
|
||||
import { getCollection } from 'astro:content'
|
||||
import BlogPost from '@layouts/blogPost.astro'
|
||||
import { getCollection, render } from 'astro:content'
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const blogEntries = await getCollection('blog')
|
||||
const blogEntries = await getCollection('blog')
|
||||
|
||||
return blogEntries.map((entry) => ({
|
||||
params: { slug: entry.slug },
|
||||
props: { entry },
|
||||
}))
|
||||
return blogEntries.map((entry) => ({
|
||||
params: { slug: entry.id },
|
||||
props: { entry },
|
||||
}))
|
||||
}
|
||||
|
||||
const { entry } = Astro.props
|
||||
const { Content } = await entry.render()
|
||||
const { Content } = await render(entry)
|
||||
---
|
||||
|
||||
<Content />
|
||||
<BlogPost frontmatter={entry.data}>
|
||||
<Content />
|
||||
</BlogPost>
|
||||
|
|
|
@ -25,7 +25,7 @@ blogEntries.sort(
|
|||
blogEntries.map((post) => (
|
||||
<BlogCard
|
||||
url="blog"
|
||||
slug={post.slug}
|
||||
slug={post.id}
|
||||
title={post.data.title}
|
||||
pubdate={post.data.pubDate}
|
||||
description={post.data.description}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import AboutText from '@components/aboutText.astro'
|
||||
import FavouriteCard from '@components/cards/favouriteCard.astro'
|
||||
import Hi from '@components/titles/title.astro'
|
||||
import favouritesdata from '@content/data/favouritesdata.json'
|
||||
import favouritesdata from '@datafiles/favouritesdata.json'
|
||||
import Layout from '@layouts/Layout.astro'
|
||||
import BaseSection from '@layouts/baseSection.astro'
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@ import Layout from '@layouts/Layout.astro'
|
|||
import ServantSection from '@layouts/servantSection.astro'
|
||||
|
||||
import ServantCard from '@components/cards/servantCard.astro'
|
||||
import servantdata from '@content/data/servantdata.json'
|
||||
import servantdata from '@datafiles/servantdata.json'
|
||||
|
||||
import CeCard from '@components/cards/ceCard.astro'
|
||||
import cedata from '@content/data/cedata.json'
|
||||
import cedata from '@datafiles/cedata.json'
|
||||
import SmallTitle from '@components/titles/smallTitle.astro'
|
||||
|
||||
const description =
|
||||
|
|
|
@ -9,8 +9,8 @@ import Layout from '@layouts/Layout.astro'
|
|||
|
||||
import TaSection from '@layouts/taSection.astro'
|
||||
import TaCard from '@components/cards/taCard.astro'
|
||||
import tadata from '@content/data/tadata.json'
|
||||
import featured_data from '@content/data/featureddata.json'
|
||||
import tadata from '@datafiles/tadata.json'
|
||||
import featured_data from '@datafiles/featureddata.json'
|
||||
import FgotaHero from '@components/fgotaHero.astro'
|
||||
import SmallTitle from '@components/titles/smallTitle.astro'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue