mirror of
https://github.com/Fluffy-Bean/website.git
synced 2024-12-28 02:16:10 +00:00
style: format code with Prettier
This commit fixes the style issues introduced in 291552c
according to the output
from Prettier.
Details: None
This commit is contained in:
parent
291552c340
commit
60ff51d459
|
@ -26,8 +26,8 @@ const tags = defineCollection({
|
||||||
type: "content",
|
type: "content",
|
||||||
schema: z.object({
|
schema: z.object({
|
||||||
name: z.string(),
|
name: z.string(),
|
||||||
})
|
}),
|
||||||
})
|
});
|
||||||
|
|
||||||
export const collections = {
|
export const collections = {
|
||||||
posts,
|
posts,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
name: "Math"
|
name: "Math"
|
||||||
---
|
---
|
||||||
|
|
||||||
``
|
``
|
10
src/utils.ts
10
src/utils.ts
|
@ -1,4 +1,8 @@
|
||||||
import {type CollectionEntry, type ContentEntryMap, getCollection} from "astro:content";
|
import {
|
||||||
|
type CollectionEntry,
|
||||||
|
type ContentEntryMap,
|
||||||
|
getCollection,
|
||||||
|
} from "astro:content";
|
||||||
|
|
||||||
// https://github.com/hellotham/hello-astro/blob/e05706cf488bcec6e4c5494a622eedfc4e47d763/src/config.ts#L55C1-L62C2
|
// https://github.com/hellotham/hello-astro/blob/e05706cf488bcec6e4c5494a622eedfc4e47d763/src/config.ts#L55C1-L62C2
|
||||||
export async function getPosts(collection: keyof ContentEntryMap) {
|
export async function getPosts(collection: keyof ContentEntryMap) {
|
||||||
|
@ -44,7 +48,9 @@ export function getDaySuffix(date: Date): string {
|
||||||
return suffix;
|
return suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getTagsBySlug(postTags: string[]): Promise<CollectionEntry<"tags">[]> {
|
export async function getTagsBySlug(
|
||||||
|
postTags: string[],
|
||||||
|
): Promise<CollectionEntry<"tags">[]> {
|
||||||
const allTags: CollectionEntry<"tags">[] = await getCollection("tags");
|
const allTags: CollectionEntry<"tags">[] = await getCollection("tags");
|
||||||
const tags: CollectionEntry<"tags">[] = [];
|
const tags: CollectionEntry<"tags">[] = [];
|
||||||
postTags.forEach((postTag) => {
|
postTags.forEach((postTag) => {
|
||||||
|
|
Loading…
Reference in a new issue