Skip to content

benthecoder/blog

Repository files navigation

Blog

home

A minimalistic blog made with Next.js and Tailwind CSS.

Design inspired by James Quiambao and Lee Robinson

Tutorial on how to build this blog can be found here.

OpenAI code taken from magic-text

TODO

Improvements

New features

Inspirations

Setting up Planetscale for /thoughts page

brew install planetscale/tap/pscale
brew install mysql-client
pscale shell <DB_NAME> main

Run this to create table

CREATE TABLE tweets (
  id INT AUTO_INCREMENT PRIMARY KEY,
  content TEXT NOT NULL,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

Setting up Neon for embedding search

Create pgvector extension

CREATE EXTENSION vector;
CREATE TABLE blog_posts (
  id SERIAL PRIMARY KEY,
  title TEXT NOT NULL,
  slug TEXT NOT NULL UNIQUE,
  date TIMESTAMP NOT NULL,
  tags TEXT,
  wordcount INTEGER,
  content TEXT,
  embedding VECTOR(1536)
);

Run generate embeddings

npm run generate:embeddings