A personal blog by hongdudev. I write about web development, programming, and tech.
- 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.
- Node.js (v14.x or later)
- pnpm
-
Clone the repository:
git clone https://github.com/hongdudev/blog.git cd blog
-
Install the dependencies:
pnpm install
-
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
To obtain your Notion access token and database ID:
- Go to Notion Developers.
- Create an integration to get your Notion access token.
- Share your Notion database with the integration to get the database ID.
To start the development server, run:
pnpm dev
Open http://localhost:3000 with your browser to see the result.
To create an optimized production build, run:
pnpm build
This will generate a /.next
directory containing the optimized build output.
To start the production server, run:
pnpm start
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
).
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.
To deploy your app to Vercel, follow these steps:
-
Install the Vercel CLI:
npm install -g vercel
-
Deploy your application:
vercel
Follow the prompts to link your project with Vercel, configure your settings, and deploy your app.
Contributions are welcome! If you have any ideas or suggestions, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have any questions or feedback, feel free to reach out to me at hey@hongducdev.com.
Happy coding!
Hongdudev 🌟