Changed project structure
@ -4,7 +4,7 @@ import {usePathname} from 'next/navigation'
|
|||||||
import {Container} from './Container'
|
import {Container} from './Container'
|
||||||
import {formatDate} from '@/lib/formatDate'
|
import {formatDate} from '@/lib/formatDate'
|
||||||
import {Prose} from './Prose'
|
import {Prose} from './Prose'
|
||||||
import {Views} from '@/components/Views'
|
import {Views} from './Views'
|
||||||
|
|
||||||
type ArticleLayout = {
|
type ArticleLayout = {
|
||||||
children?: ReactNode
|
children?: ReactNode
|
@ -6,7 +6,7 @@ import {Popover, Transition} from '@headlessui/react'
|
|||||||
import clsx from 'clsx'
|
import clsx from 'clsx'
|
||||||
|
|
||||||
import {Container} from './Container'
|
import {Container} from './Container'
|
||||||
import avatar from '@/images/avatar.jpg'
|
import avatar from '@/public/static/images/avatar.jpg'
|
||||||
|
|
||||||
import type {Props} from 'types'
|
import type {Props} from 'types'
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": [
|
"@/*": [
|
||||||
"src/*"
|
"*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import * as path from 'path'
|
|||||||
|
|
||||||
async function importArticle(articleFilename: string) {
|
async function importArticle(articleFilename: string) {
|
||||||
let {meta, default: component} = await import(
|
let {meta, default: component} = await import(
|
||||||
`../pages/writing/${articleFilename}`
|
`/pages/writing/${articleFilename}`
|
||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
slug: articleFilename.replace(/(\/index)?\.mdx$/, ''),
|
slug: articleFilename.replace(/(\/index)?\.mdx$/, ''),
|
||||||
@ -14,7 +14,7 @@ async function importArticle(articleFilename: string) {
|
|||||||
|
|
||||||
export async function getAllArticles() {
|
export async function getAllArticles() {
|
||||||
let articleFilenames = await glob(['*.mdx', '*/index.mdx'], {
|
let articleFilenames = await glob(['*.mdx', '*/index.mdx'], {
|
||||||
cwd: path.join(process.cwd(), 'src/pages/writing'),
|
cwd: path.join(process.cwd(), './pages/writing'),
|
||||||
})
|
})
|
||||||
|
|
||||||
let articles = await Promise.all(articleFilenames.map(importArticle))
|
let articles = await Promise.all(articleFilenames.map(importArticle))
|
@ -3,7 +3,7 @@ import type {AppProps} from 'next/app'
|
|||||||
import {Header} from '@/components/Header'
|
import {Header} from '@/components/Header'
|
||||||
import {Footer} from '@/components/Footer'
|
import {Footer} from '@/components/Footer'
|
||||||
|
|
||||||
import '../../styles/tailwind.css'
|
import '../styles/tailwind.css'
|
||||||
import 'focus-visible'
|
import 'focus-visible'
|
||||||
|
|
||||||
function usePrevious(value: string): string | null {
|
function usePrevious(value: string): string | null {
|
@ -11,8 +11,8 @@ import {
|
|||||||
TwitterIcon
|
TwitterIcon
|
||||||
} from '@/components/SocialIcons'
|
} from '@/components/SocialIcons'
|
||||||
import {Props} from 'types'
|
import {Props} from 'types'
|
||||||
import photoOfMeLg from '@/images/photo-of-me-lg.jpg'
|
import photoOfMe from '@/public/static/images/photo-of-me.jpg'
|
||||||
import awsCCPBadge from '@/images/aws-certified-cloud-practitioner-badge.png'
|
import awsCCPBadge from '@/public/static/images/aws-certified-cloud-practitioner-badge.png'
|
||||||
|
|
||||||
function SocialLink({
|
function SocialLink({
|
||||||
className,
|
className,
|
||||||
@ -73,7 +73,7 @@ export default function About() {
|
|||||||
<div className="lg:pl-20">
|
<div className="lg:pl-20">
|
||||||
<div className="max-w-xs px-2.5 lg:max-w-none">
|
<div className="max-w-xs px-2.5 lg:max-w-none">
|
||||||
<Image
|
<Image
|
||||||
src={photoOfMeLg}
|
src={photoOfMe}
|
||||||
alt=""
|
alt=""
|
||||||
sizes="(min-width: 1024px) 32rem, 20rem"
|
sizes="(min-width: 1024px) 32rem, 20rem"
|
||||||
className="aspect-square shadow-inner rounded-2xl bg-zinc-100 object-cover dark:bg-zinc-800 rotate-3"
|
className="aspect-square shadow-inner rounded-2xl bg-zinc-100 object-cover dark:bg-zinc-800 rotate-3"
|
@ -199,7 +199,7 @@ export default function Home({articles}: { articles: Article[] }) {
|
|||||||
/>
|
/>
|
||||||
<meta
|
<meta
|
||||||
property="og:image"
|
property="og:image"
|
||||||
content="/static/images/photo-of-me-lg.jpg"
|
content="/static/images/photo-of-me-og.jpg"
|
||||||
/>
|
/>
|
||||||
<meta
|
<meta
|
||||||
name="twitter:card"
|
name="twitter:card"
|
||||||
@ -219,7 +219,7 @@ export default function Home({articles}: { articles: Article[] }) {
|
|||||||
content="Full-stack software engineer who enjoys building cloud-native applications."/>
|
content="Full-stack software engineer who enjoys building cloud-native applications."/>
|
||||||
<meta
|
<meta
|
||||||
name="twitter:image"
|
name="twitter:image"
|
||||||
content="/static/images/photo-of-me-lg.jpg"
|
content="/static/images/photo-of-me-og.jpg"
|
||||||
/>
|
/>
|
||||||
</Head>
|
</Head>
|
||||||
<Container className="mt-9">
|
<Container className="mt-9">
|
Before Width: | Height: | Size: 291 KiB After Width: | Height: | Size: 291 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 166 KiB |
Before Width: | Height: | Size: 482 KiB After Width: | Height: | Size: 482 KiB |
@ -1,6 +1,6 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
content: ['./src/**/*.{js,jsx,tsx}'],
|
content: ['./pages/**/*.{js,jsx,tsx}', './components/**/*.{js,jsx,tsx}'],
|
||||||
darkMode: 'class',
|
darkMode: 'class',
|
||||||
plugins: [
|
plugins: [
|
||||||
require('@tailwindcss/typography'),
|
require('@tailwindcss/typography'),
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": [
|
"@/*": [
|
||||||
"src/*"
|
"*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|