Move types definition under src directory

This commit is contained in:
Sat Naing
2022-09-22 20:39:51 +06:30
parent f367e05793
commit 9e351fe26d
7 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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<Frontmatter>[], tag: string) =>
posts.filter((post) => slufigyAll(post.frontmatter.tags).includes(tag));
+1 -1
View File
@@ -1,5 +1,5 @@
import type { MarkdownInstance } from "astro";
import type { Frontmatter } from "./types";
import type { Frontmatter } from "../types";
const getSortedPosts = (posts: MarkdownInstance<Frontmatter>[]) =>
posts.sort(
+1 -1
View File
@@ -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<Frontmatter>[]) => {
let tags: string[] = [];
-10
View File
@@ -1,10 +0,0 @@
export interface Frontmatter {
title: string;
ogImage?: string;
description: string;
author: string;
datetime: string;
slug: string;
featured: boolean;
tags: string[];
}