Skip to content

Commit

Permalink
add CNAME
Browse files Browse the repository at this point in the history
  • Loading branch information
teplostanski committed May 16, 2024
1 parent cb9746e commit fabc0d5
Show file tree
Hide file tree
Showing 14 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions public/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blog.teplostanski.dev
Empty file removed public/static-recipe-blog.txt
Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ProjectPageProps, Slug } from '@/types'
import { ArticlePageProps, Slug } from '@/types'
import MarkdownRender from '@/app/components/MarkdownRender/MarkdownRender'
import { getPostContent } from '@/utils/getPostContent'
import getPostMetadata from '@/utils/getPostMetadata'
Expand All @@ -11,16 +11,16 @@ export async function generateMetadata({
const id = params?.slug ? params?.slug + ' ⋅ ' : ''

return {
title: `${id.replaceAll('_', ' ').toUpperCase()}Projects`,
title: `${id.replaceAll('_', ' ').toUpperCase()}articles`,
}
}

export async function generateStaticParams() {
const posts = getPostMetadata('src/projects')
const posts = getPostMetadata('src/articles')
return posts.map((post: { slug: Slug }) => ({ slug: post.slug }))
}

export default function projectPage({ params }: ProjectPageProps) {
export default function articlePage({ params }: ArticlePageProps) {
const slug = params.slug
const { content } = getPostContent(slug)
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/PostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { basePath } from '@/constants'

export default function PostCard({ post }: PostMetadata) {
return (
<Link className='unstyled' href={`/project/${post.slug}`}>
<Link className='unstyled' href={`/articles/${post.slug}`}>
<div className='postCard'>
<h3>{post.title}</h3>
<Image
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const inter = Inter({ subsets: ['latin'] })

export const metadata = {
title: 'The kitchen of World of Warcraft',
description: 'My amazing project app',
description: 'My amazing article app',
}

export default function RootLayout({ children }: { children: ReactNode }) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Preview from '@/app/components/Preview'
import getPostMetadata from '@/utils/getPostMetadata'

export default function Home() {
const postMetadata = getPostMetadata('src/projects')
const postMetadata = getPostMetadata('src/articles')
console.log(postMetadata)

return (
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/types/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface ChildrenProps {
children: ReactNode
}

export interface ProjectPageProps {
export interface ArticlePageProps {
params: { slug: Slug }
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/getPostContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs'
import matter from 'gray-matter'

export function getPostContent(slug: Slug) {
const folder = 'src/projects/'
const folder = 'src/articles/'
const file = folder + `${slug}.md`
const content = fs.readFileSync(file, 'utf8')

Expand Down

0 comments on commit fabc0d5

Please sign in to comment.