refactor: moves util functions into their respective library file
This commit is contained in:
parent
98ac61a6c8
commit
38b5413a37
11 changed files with 23 additions and 27 deletions
|
|
@ -3,9 +3,8 @@ import { getCollection } from 'astro:content';
|
|||
import Layout from '../layouts/Layout.astro';
|
||||
import { getApprovedEntries, type GuestbookEntry } from '../lib/db';
|
||||
import { formatDate, extractDomain } from '../lib/format';
|
||||
import { organizePostsByCategory } from '../lib/posts';
|
||||
import { organizePostsByCategory, getSlug } from '../lib/posts';
|
||||
import { getTxtFiles } from '../lib/txt';
|
||||
import { getSlug } from '../utils';
|
||||
|
||||
const posts = await getCollection('md', ({ data }) => data.draft !== true);
|
||||
const { grouped, categories: sortedCategories } = organizePostsByCategory(posts);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue