Kremta-Website/src/types/index.d.ts

70 lines
1.7 KiB
TypeScript
Raw Normal View History

2025-10-06 12:54:47 +00:00
import type { CollectionEntry, CollectionKey } from "astro:content";
import type { MarkdownHeading } from "astro";
export type GenericEntry = CollectionEntry<CollectionKey>;
export type AboutEntry = CollectionEntry<"about">;
export type AuthorsEntry = CollectionEntry<"authors">;
export type BlogEntry = CollectionEntry<"blog">;
export type DocsEntry = CollectionEntry<"docs">;
export type HomeEntry = CollectionEntry<"home">;
export type IndexCardsEntry = CollectionEntry<"indexCards">;
export type PoetryEntry = CollectionEntry<"poetry">;
export type PortfolioEntry = CollectionEntry<"portfolio">;
export type RecipesEntry = CollectionEntry<"recipes">;
export type TermsEntry = CollectionEntry<"terms">;
export type SearchableEntry =
| AboutEntry
| AuthorsEntry
| BlogEntry
| DocsEntry
| PoetryEntry
| PortfolioEntry
| RecipesEntry
| TermsEntry;
export type SocialLinks = {
discord?: string;
email?: string;
facebook?: string;
github?: string;
instagram?: string;
linkedIn?: string;
pinterest?: string;
tiktok?: string;
website?: string;
youtube?: string;
2025-10-07 17:04:51 +00:00
rss?: string;
2025-10-06 12:54:47 +00:00
}
export type EntryReference = {
id: string;
collection: string;
};
// Define heading hierarchy so that we can generate ToC
export interface HeadingHierarchy extends MarkdownHeading {
subheadings: HeadingHierarchy[];
}
export type MenuItem = {
title?: string;
id: string;
children: MenuItem[];
};
// Define the type for menu items to created nested object
export type MenuItemWithDraft = {
title?: string;
id: string;
draft: boolean;
children: MenuItemWithDraft[];
};
// Define the props for the SideNavMenu component
export type SideNavMenuProps = {
items: MenuItemWithDraft[];
level: number;
};