Paranoia8972 / blog

Encryptopia Blog is a Next.js Blog utilizing Velite for static sitegeneration from Markdown files and with custom components like callouts and tabs.
https://ecyt.dev/blog
4 stars 0 forks source link
blog giscus mdx nextjs nextjs14 shadcn-ui velite

Encryptopia Blog

This blog is built using Next.js and supports markdown-based posts.

Features

Setup

Configuration

The blog configuration is managed in siteConfig inside config/site.ts:

export const siteConfig = {
  name: "Encryptopia Blog",
  url: "https://blog.encryptopia.dev",
  description: "My weird knowledge, noted down.",
  author: "Clemens Hoffmann",
  email: "contact@encryptopia.dev",
  links: {
    twitter: "https://twitter.com/paranoia8972",
    github: "https://github.com/Paranoia8972",
    personalSite: "https://encryptopia.dev",
    feed: "https://blog.encryptopia.dev/feed.xml",
    // Add more links if needed
  },
};

Ensure that the correct values are set for your blog’s name, URL, author details, and social links.

Installation

  1. Clone the repository:

    git clone https://github.com/Paranoia8972/blog.git
  2. Navigate into the project directory:

    cd blog
  3. Install dependencies:

    npm install
  4. Update the configuration:

    Edit the config/site.ts file to reflect your personal settings.

Running the Blog Locally

  1. Start the development server:

    npm run dev
  2. Access the blog:

    Open your browser and go to http://localhost:3000.

Creating New Posts

To create a new blog post:

  1. Navigate to the posts directory:

    cd content/post
  2. Create a new MDX file:

    touch my-new-post.mdx
  3. Write your post using frontmatter:

    ---
    title: My new Post
    description: Welcome to my new post.
    date: 2024-08-18
    tags:
        - post
        - test
    published: true <!-- Optionally -->
    img: /new-post.png
    ---

    # My New Post

    Welcome to my new post. Here’s some interesting content!
  1. Save and commit your changes:

    git add posts/my-new-post.md
    git commit -m "Add new post"
    git push origin main

Custom Components

Deployment

To deploy the blog, follow the Next.js deployment guide for your hosting platform (e.g., Vercel, Netlify, etc.).

For example, with Vercel:

  1. Install the Vercel CLI:

    npm i -g vercel
  2. Deploy the project:

    vercel

For other platforms, refer to the respective deployment guides.

License

This project is licensed under the MIT License. See the LICENSE file for more details.