diff --git a/src/components/Card.tsx b/src/components/Card.tsx index 2e7520e..9a99073 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -1,5 +1,5 @@ import Datetime from "./Datetime"; -import type { Frontmatter } from "@utils/types"; +import type { Frontmatter } from "src/types"; export interface Props { href?: string; diff --git a/src/components/Search.tsx b/src/components/Search.tsx index 3f05ae2..3abdeaf 100644 --- a/src/components/Search.tsx +++ b/src/components/Search.tsx @@ -2,7 +2,7 @@ import Fuse from "fuse.js"; import { useEffect, useState } from "react"; import Card from "@components/Card"; -import type { Frontmatter } from "@utils/types"; +import type { Frontmatter } from "src/types"; interface Props { searchList: { diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index ac7465b..63180a0 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -1,5 +1,5 @@ import rss from "@astrojs/rss"; -import type { Frontmatter } from "@utils/types"; +import type { Frontmatter } from "src/types"; import type { MarkdownInstance } from "astro"; const postImportResult = import.meta.glob>( diff --git a/src/utils/types.ts b/src/types.ts similarity index 100% rename from src/utils/types.ts rename to src/types.ts diff --git a/src/utils/getPostsByTag.ts b/src/utils/getPostsByTag.ts index a98aa7e..7e45299 100644 --- a/src/utils/getPostsByTag.ts +++ b/src/utils/getPostsByTag.ts @@ -1,6 +1,6 @@ import type { MarkdownInstance } from "astro"; import { slufigyAll } from "./slugify"; -import type { Frontmatter } from "./types"; +import type { Frontmatter } from "../types"; const getPostsByTag = (posts: MarkdownInstance[], tag: string) => posts.filter((post) => slufigyAll(post.frontmatter.tags).includes(tag)); diff --git a/src/utils/getSortedPosts.ts b/src/utils/getSortedPosts.ts index 213ed51..292547b 100644 --- a/src/utils/getSortedPosts.ts +++ b/src/utils/getSortedPosts.ts @@ -1,5 +1,5 @@ import type { MarkdownInstance } from "astro"; -import type { Frontmatter } from "./types"; +import type { Frontmatter } from "../types"; const getSortedPosts = (posts: MarkdownInstance[]) => posts.sort( diff --git a/src/utils/getUniqueTags.ts b/src/utils/getUniqueTags.ts index b83bb13..f4f0641 100644 --- a/src/utils/getUniqueTags.ts +++ b/src/utils/getUniqueTags.ts @@ -1,6 +1,6 @@ import slugify from "./slugify"; import type { MarkdownInstance } from "astro"; -import type { Frontmatter } from "./types"; +import type { Frontmatter } from "../types"; const getUniqueTags = (posts: MarkdownInstance[]) => { let tags: string[] = [];