/homepage

👋 My personal site built with Next.js,Tailwind CSS and Prisma

Primary LanguageHTMLMIT LicenseMIT

Ruislan.com

  • Framework: NextJS
  • Database: Sqlite
  • ORM: Prisma
  • Styling: Tailwind CSS

Running Locally

cd homepage
pnpm install
pnpm prisma db push
pnpm dev:turbo

Rename .env.example to .env

Running in Docker

cd homepage
pnpm prisma db push
cp ./prisma/data.db /path/to/data
docker build -t yourdomain/homepage:latest .
docker run -it --rm --name hp -v /path/to/data:/app/db -e DATABASE_URL=file:/app/db/data.db -p 3000:3000 yourdomain/homepage:latest

Add Post

  • create a html/md file, say 'test.html' or 'test.md', save it to the dir '/content/posts'。
  • mkdir -r '/public/images/posts/test', add a hero image, say 'hero.jpg', to the dir '/public/images/posts/test'
  • add an item in the lib/database.js => Post => data, e.g. { type: 'md', slug: 'test', title: 'test', summary: 'test', date: 'yyyy-MM-dd', hero: '/public/images/posts/test/hero.jpg', }。