Skip to content

Commit 19f6eda

Browse files
Fix util import location
* Fix bogus reference * Move the util out of src/pages/, so it doesn't generate an empty page
1 parent 1d86de2 commit 19f6eda

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

src/pages/posts/[...slug].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
import { getCollection, render } from 'astro:content'
33
4-
import { slugify } from './index.astro'
4+
import { slugify } from '../../utils/content'
55
66
export async function getStaticPaths() {
77
const blogEntries = await getCollection('posts')

src/pages/posts/index.astro

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2-
import Layout from '../../components/layouts/base.astro'
3-
import { slugify } from './slugify'
4-
5-
import type { CollectionEntry } from 'astro:content'
62
import { getCollection } from 'astro:content'
3+
import Layout from '../../components/layouts/base.astro'
4+
import { slugify } from '../../utils/content'
75
86
const frontmatter = {
97
title: 'Articles',

src/pages/rss.xml.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getCollection } from 'astro:content'
22
import rss from '@astrojs/rss'
33
import type { APIContext } from 'astro'
44
import { siteMetadata } from '../config/site'
5-
import { slugify } from './posts/slugify'
5+
import { slugify } from '../utils/content'
66

77
export async function GET(context: APIContext) {
88
const posts = await getCollection('posts')

0 commit comments

Comments
 (0)