Personal blog to share my learning, thoughts and experience.
- Clone the starter template:
git clone https://github.com/schardev/nextjs-contentlayer-blog
- Add site information and relevant data to
lib/siteConfig.ts
. - Add your blog posts to
content/blog
directory with proper front-matter (see available fields here) - Build your blog with:
pnpm build
- Deploy to your hosting provider 🎉
Starting a development server isn't different either, just run:
pnpm dev
Now open http://localhost:3000
to view changes to your blog as it happens.
Directory/File | Notes |
---|---|
app/ |
Defines your site/blog's routes |
components/ |
All react component code lives here |
content/ |
Directory where your MDX or Markdown file lives |
public/ |
Static assets goes here (e.g., put all your images inside public/images and fonts inside public/fonts etc) |
styles/ |
Find all styling files here |
schema/ |
Contains schema-related files |
contentlayer.config.ts |
Contentlayer configuration file (you can change your content directory here) |
lib/siteConfig.ts |
Holds config related to the site itself |
using this doc added support DOC
turbo type-check build
turbo dev