Giter Site home page Giter Site logo

hongducdev / blog Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 509 KB

A personal blog by hongdudev. I write about web development, programming, and tech.

Home Page: https://blog.hongducdev.com/

TypeScript 96.63% CSS 3.17% JavaScript 0.20%
blog nextjs14 shadcn-ui tailwindcss

blog's Introduction

๐ŸŒŸ Hongdudev's Personal Blog ๐ŸŒŸ

wakatime

A personal blog by hongdudev. I write about web development, programming, and tech.

๐Ÿš€ Features

  • Framework: Built with Next.js for server-side rendering and static site generation.
  • Styling: Styled using Tailwind CSS for a highly customizable and responsive design.
  • UI Components: Utilizes Shadcn UI for accessible and beautiful UI components.
  • CMS: Integrated with Notion as the content management system for easy blog post creation and management.

๐Ÿ› ๏ธ Getting Started

๐Ÿ“‹ Prerequisites

  • Node.js (v14.x or later)
  • pnpm

๐Ÿ“ฅ Installation

  1. Clone the repository:

    git clone https://github.com/hongdudev/blog.git
    cd blog
  2. Install the dependencies:

    pnpm install
  3. Create a .env file in the root directory and add your Notion access token, blog database ID, and base URL:

    NOTION_ACCESS_TOKEN=your-notion-access-token
    NOTION_BLOG_DATABASE_ID=your-notion-database-id
    BASE_URL=your-base-url

๐Ÿ”‘ Getting Notion Access Token and Database ID

To obtain your Notion access token and database ID:

  1. Go to Notion Developers.
  2. Create an integration to get your Notion access token.
  3. Share your Notion database with the integration to get the database ID.

โ–ถ๏ธ Running the Development Server

To start the development server, run:

pnpm dev

Open http://localhost:3000 with your browser to see the result.

๐Ÿ—๏ธ Building for Production

To create an optimized production build, run:

pnpm build

This will generate a /.next directory containing the optimized build output.

๐ŸŒ Starting the Production Server

To start the production server, run:

pnpm start

๐ŸŒ Environment Variables

  • NOTION_ACCESS_TOKEN: The token for accessing the Notion API. You can obtain this by creating an integration on Notion.
  • NOTION_BLOG_DATABASE_ID: The ID of the Notion database where your blog posts are stored.
  • BASE_URL: The base URL of your blog (e.g., https://yourdomain.com).

๐Ÿšข Deployment

You can deploy your Next.js application to a variety of hosting providers, such as Vercel, Netlify, or any other platform that supports Node.js applications.

๐Ÿš€ Deploying to Vercel

To deploy your app to Vercel, follow these steps:

  1. Install the Vercel CLI:

    npm install -g vercel
  2. Deploy your application:

    vercel

Follow the prompts to link your project with Vercel, configure your settings, and deploy your app.

๐Ÿค Contributing

Contributions are welcome! If you have any ideas or suggestions, feel free to open an issue or submit a pull request.

๐Ÿ“„ License

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

๐Ÿ“ง Contact

If you have any questions or feedback, feel free to reach out to me at [email protected].


Happy coding!

Hongdudev ๐ŸŒŸ

blog's People

Contributors

hongducdev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.