Skip to content

Commit

Permalink
the project supports list view for each article
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitardanailov committed Dec 16, 2023
1 parent 7f18179 commit 356eafc
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 9 deletions.
9 changes: 9 additions & 0 deletions apps/website/src/app/articles/2023/11/28/[slug]/db.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {canonical, title} from './seo'

const listItem = {
href: canonical,
title: title,
text: title,
}

export default listItem
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ export const tags = [

export const description =
'Resources about system design, distributed systems, microservices and monolith'

export const listItem = {
canonical,
slogan: title,
}
4 changes: 3 additions & 1 deletion apps/website/src/app/articles/2023/12/01/[slug]/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ import HoldingPerformancePromises from '@/blog/lectures/holding-performance-prom
import RailsConf2015StrongCodeReviewCulture from '@/blog/lectures/rails-2015-implementing-strong-code-review-culture'
import DockerKubernetes from '@/blog/courses/docker-kubernetes-fundamentals'

import {slogan} from './seo'

const Content = () => {
const listStyle = 'list-disc mx-6 mt-0 mb-5'

return (
<>
<Slogan>The art of onboarding of a new backend engineer</Slogan>
<Slogan>{slogan}</Slogan>

<p>
My manager gave me as a task to help of onboarding of a new team member
Expand Down
9 changes: 9 additions & 0 deletions apps/website/src/app/articles/2023/12/01/[slug]/db.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {slogan, canonical} from './seo'

const listItem = {
href: canonical,
title: slogan,
text: slogan,
}

export default listItem
2 changes: 2 additions & 0 deletions apps/website/src/app/articles/2023/12/01/[slug]/seo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export const title = 'Backend nodejs engineering onboarding'

export const canonical = folder + sanitizeUrl(title)

export const slogan = 'The art of onboarding of a new backend engineer'

export const tags = [
'nodejs',
'agile',
Expand Down
22 changes: 14 additions & 8 deletions apps/website/src/app/articles/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@

import Link from 'next/link'

import {title, canonical} from './2023/11/28/[slug]/seo'

const Content = () => {
return (
<>
<Link href={canonical}>{title}</Link>
</>
)
import articles from './articles'

const Content = async () => {
const listStyle = 'list-disc mx-6 mt-0 mb-5'

const listItems = articles.map((article, i) => (
<li key={i}>
<Link key={i} title={article.title} href={article.href}>
{article.text}
</Link>
</li>
))

return <ul className={listStyle}>{listItems}</ul>
}

export default Content
6 changes: 6 additions & 0 deletions apps/website/src/app/articles/articles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import systemDesign from '../articles/2023/11/28/[slug]/db'
import onboardingNodejs from '../articles/2023/12/01/[slug]/db'

const articles = [systemDesign, onboardingNodejs]

export default articles

1 comment on commit 356eafc

@vercel
Copy link

@vercel vercel bot commented on 356eafc Dec 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

portfolio-website – ./apps/website

ddanailov.dev
portfolio-website-git-main-dimityrdanailov.vercel.app
portfolio-website-dimityrdanailov.vercel.app

Please sign in to comment.