Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/blog/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use client'

import { TextMorph } from '@/components/ui/text-morph'
import { ScrollProgress } from '@/components/ui/scroll-progress'
import { useEffect, useState } from 'react'
Expand Down
3 changes: 2 additions & 1 deletion app/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client'
import { AnimatedBackground } from '@/components/ui/animated-background'
import { TextLoop } from '@/components/ui/text-loop'
import dayjs from 'dayjs'
import { MonitorIcon, MoonIcon, SunIcon } from 'lucide-react'
import { useTheme } from 'next-themes'
import { useEffect, useState } from 'react'
Expand Down Expand Up @@ -72,7 +73,7 @@ export function Footer() {
<div className="flex items-center justify-between">
<a href="https://github.com/ibelick/nim" target="_blank">
<TextLoop className="text-xs text-zinc-500">
<span>© 2024 Nim.</span>
<span>© {dayjs().format('YYYY')} .</span>
<span>Built with Motion-Primitives.</span>
</TextLoop>
</a>
Expand Down
7 changes: 4 additions & 3 deletions app/header.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
'use client'
import { TextEffect } from '@/components/ui/text-effect'
import { constant } from '@/lib/constants'
import Link from 'next/link'

export function Header() {
return (
<header className="mb-8 flex items-center justify-between">
<div>
<Link href="/" className="font-medium text-black dark:text-white">
Julien Nim
<Link href={constant.website_url} className="font-medium text-black dark:text-white">
{constant.author.name}
</Link>
<TextEffect
as="p"
Expand All @@ -16,7 +17,7 @@ export function Header() {
className="text-zinc-600 dark:text-zinc-500"
delay={0.5}
>
Design Engineer
{constant.author.profession}
</TextEffect>
</div>
</header>
Expand Down
4 changes: 2 additions & 2 deletions app/robots.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { constant } from '@/lib/constants'
import type { MetadataRoute } from 'next'
import { WEBSITE_URL } from '@/lib/constants'

export default function robots(): MetadataRoute.Robots {
return {
Expand All @@ -8,6 +8,6 @@ export default function robots(): MetadataRoute.Robots {
allow: '/',
disallow: '/private/',
},
sitemap: `${WEBSITE_URL}/sitemap.xml`,
sitemap: `${constant.website_url}/sitemap.xml`,
}
}
30 changes: 30 additions & 0 deletions blog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

mkdir -p app/blog

while true; do
echo "Insert new blog post, example: Post One"
read FILE_NAME_INPUT

# replace space with dash symbol (-)
FILE_NAME_INPUT_MODIFIED=$(echo "$FILE_NAME_INPUT" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')

FOLDER_PATH="app/blog/$FILE_NAME_INPUT_MODIFIED"
FILE_NAME="$FOLDER_PATH/page.mdx"

if [ -d "$FOLDER_PATH" ]; then
echo -e "\033[31mA folder with the name $FOLDER_PATH already exists. Please choose a different name.\033[0m"
echo
else
mkdir -p "$FOLDER_PATH"

echo '<Cover' > "$FILE_NAME"
echo ' src="https://"' >> "$FILE_NAME"
echo ' alt=""' >> "$FILE_NAME"
echo ' caption=""' >> "$FILE_NAME"
echo '/>' >> "$FILE_NAME"

echo -e "✨ \033[32mSuccessfully created a new blog post"
break
fi
done
13 changes: 12 additions & 1 deletion lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
export const WEBSITE_URL = 'https://nim-fawn.vercel.app'
export const constant = {
website_url: "https://nim-fawn.vercel.app",
title: "NIM — Personal website template",
description: "Nim is a free and open-source personal website template built with Next.js 15, React 19, Tailwind CSS v4, and Motion-Primitives.",
image: "/cover.png",
author: {
name: "Julien Nim",
profession: "Design Engineer",
twitter: "https://x.com",
instagram: "https://instagram.com",
},
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@tailwindcss/typography": "^0.5.15",
"@types/mdx": "^2.0.13",
"clsx": "^2.1.1",
"dayjs": "^1.11.13",
"lucide-react": "^0.468.0",
"motion": "^11.15.0",
"next": "15.1.1",
Expand Down
Loading