Skip to content

Commit

Permalink
fix: biome formating
Browse files Browse the repository at this point in the history
  • Loading branch information
Eveeifyeve committed Jul 7, 2024
1 parent 7a5b350 commit 1d982f9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 24 deletions.
8 changes: 6 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"organizeImports": {
"enabled": true
},
Expand All @@ -21,9 +21,13 @@
"indentWidth": 4
},
"parser": {
"allowWrongLineComments": false
"allowWrongLineComments": false,
}
},
"vcs": {
"enabled": true,
"clientKind": "git"
},
"files": {
"ignore": ["/nix/store/*", ".astro/*"]
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/head.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import { SEO } from "astro-seo";
const { title, customDescription, bannerPath } = Astro.props;
export interface Props {
title: string;
customDescription?: string;
bannerPath?: string;
title: string;
customDescription?: string;
bannerPath?: string;
}
// SEO SETTINGS
Expand Down
31 changes: 15 additions & 16 deletions src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
import { defineCollection, z } from 'astro:content';
import { defineCollection, z } from "astro:content";

const news = defineCollection({
type: 'content',
type: "content",
schema: z.object({
title: z.string(),
description: z.string(),
pubDate: z.coerce.date(),
heroImage: z.string().optional(),
authorBlog: z.object({
name: z.string(),
role: z.string(),
socials: z.object({
github: z.string().optional(),
})
})
authorBlog: z.object({
name: z.string(),
role: z.string(),
socials: z.object({
github: z.string().optional(),
}),
}),
}),
});


const wiki = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
}),
})
type: "content",
schema: z.object({
title: z.string(),
}),
});

export const collections = { news, wiki };
export const collections = { news, wiki };
6 changes: 3 additions & 3 deletions src/pages/news/index.xml.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { getCollection } from "astro:content";
import rss, {
pagesGlobToRssItems,
type RSSFeedItem,
type RSSOptions,
} from "@astrojs/rss";
import { getCollection } from "astro:content";

export async function GET(context: RSSOptions) {
const posts = await getCollection("news");
return rss({
title: "TeaClient News/Updates",
description: "Update your self on the latest news.",
site: context.site,
items: posts.map((post) => ({
items: posts.map((post) => ({
...post.data,
link: `/news/${post.slug}/`,
}))
})),
customData: "<language>en-us</language>",
trailingSlash: false,
});
Expand Down

0 comments on commit 1d982f9

Please sign in to comment.